Commit bade7631 authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] ppc64: enable EEH on PCI host bridges

On recent pSeries systems, EEH needs to be enabled even on PCI Host Bridges
(PHB's).  If not enabled, then ordinary PCI probing (config-space
reads/writes to the bridges) will generate firmware error messages,
possibly a very large number of messages for systems with large numbers of
pci slots.
Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6441582c
......@@ -485,16 +485,10 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
if (status && strcmp(status, "ok") != 0)
return NULL; /* ignore devices with bad status */
/* Weed out PHBs or other bad nodes. */
/* Ignore bad nodes. */
if (!class_code || !vendor_id || !device_id)
return NULL;
/* Ignore known PHBs and EADs bridges */
if (*vendor_id == PCI_VENDOR_ID_IBM &&
(*device_id == 0x0102 || *device_id == 0x008b ||
*device_id == 0x0188 || *device_id == 0x0302))
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;
......@@ -526,15 +520,8 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
dn->eeh_mode |= EEH_MODE_NOCHECK;
}
/* This device may already have an EEH parent. */
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;
}
/* Ok... see if this device supports EEH. */
/* 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", 0);
if (regs) {
/* First register entry is addr (00BBSS00) */
......@@ -547,12 +534,18 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
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);
printk(KERN_DEBUG "EEH: %s: eeh enabled\n", dn->full_name);
#endif
} else {
printk(KERN_WARNING "EEH: %s: could not enable EEH, rtas_call failed; rc=%d\n",
dn->full_name, ret);
/* 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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment