if (dn->parent && (dn->parent->eeh_mode & EEH_MODE_SUPPORTED)) { 
if (dn->parent && dn->parent->data && (PCI_DN(dn->parent)->eeh_mode & EEH_MODE_SUPPORTED)) { 
static void *early_enable_eeh(struct device_node *dn, void *data){	struct eeh_early_enable_info *info = data;	int ret;	char *status = get_property(dn, "status", NULL);	u32 *class_code = (u32 *)get_property(dn, "class-code", NULL);	u32 *vendor_id = (u32 *)get_property(dn, "vendor-id", NULL);	u32 *device_id = (u32 *)get_property(dn, "device-id", NULL);	u32 *regs;	int enable;	dn->eeh_mode = 0;	if (status && strcmp(status, "ok") != 0)		return NULL;	/* ignore devices with bad status */	/* Ignore bad nodes. */	if (!class_code || !vendor_id || !device_id)		return NULL;	/* There is nothing to check on PCI to ISA bridges */	if (dn->type && !strcmp(dn->type, "isa")) {		dn->eeh_mode |= EEH_MODE_NOCHECK;		return NULL;	}	/*	 * Now decide if we are going to "Disable" EEH checking	 * for this device.  We still run with the EEH hardware active,	 * but we won't be checking for ff's.  This means a driver	 * could return bad data (very bad!), an interrupt handler could	 * hang waiting on status bits that won't change, etc.	 * But there are a few cases like display devices that make sense.	 */	enable = 1;	/* i.e. we will do checking */	if ((*class_code >> 16) == PCI_BASE_CLASS_DISPLAY)		enable = 0;	if (!enable)		dn->eeh_mode |= EEH_MODE_NOCHECK;	/* Ok... see if this device supports EEH.  Some do, some don't,	 * and the only way to find out is to check each and every one. */	regs = (u32 *)get_property(dn, "reg", NULL);	if (regs) {		/* First register entry is addr (00BBSS00)  */		/* Try to enable eeh */		ret = rtas_call(ibm_set_eeh_option, 4, 1, NULL,				regs[0], info->buid_hi, info->buid_lo,				EEH_ENABLE);		if (ret == 0) {			eeh_subsystem_enabled = 1;			dn->eeh_mode |= EEH_MODE_SUPPORTED;			dn->eeh_config_addr = regs[0];#ifdef DEBUG			printk(KERN_DEBUG "EEH: %s: eeh enabled\n", dn->full_name);#endif		} else {			/* This device doesn't support EEH, but it may have an			 * EEH parent, in which case we mark it as supported. */			if (dn->parent && (dn->parent->eeh_mode & EEH_MODE_SUPPORTED)) {				/* Parent supports EEH. */				dn->eeh_mode |= EEH_MODE_SUPPORTED;				dn->eeh_config_addr = dn->parent->eeh_config_addr;				return NULL;			}		}	} else {		printk(KERN_WARNING "EEH: %s: unable to get reg property.\n",		       dn->full_name);	}	return NULL; }
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1635317facea3094ddf34082cd86797efb1d9f7e/eeh.c/clean/arch/ppc64/kernel/eeh.c