Commit 957ec2fa authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: be resilient against sysfs PCI config accesses

Check the EEH return code and dont warn or panic if we get a non fatal
error.  Also up the printk on EEH error.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ba5d8937
...@@ -414,7 +414,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) ...@@ -414,7 +414,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
dn->eeh_config_addr, BUID_HI(dn->phb->buid), dn->eeh_config_addr, BUID_HI(dn->phb->buid),
BUID_LO(dn->phb->buid)); BUID_LO(dn->phb->buid));
if (ret == 0 && rets[1] == 1 && rets[0] >= 2) { if (ret == 0 && rets[1] == 1 && (rets[0] == 2 || rets[0] == 4)) {
int log_event; int log_event;
spin_lock_irqsave(&slot_errbuf_lock, flags); spin_lock_irqsave(&slot_errbuf_lock, flags);
...@@ -434,8 +434,8 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) ...@@ -434,8 +434,8 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
spin_unlock_irqrestore(&slot_errbuf_lock, flags); spin_unlock_irqrestore(&slot_errbuf_lock, flags);
printk(KERN_ERR "EEH: MMIO failure (%d) on device:%s %s\n", printk(KERN_INFO "EEH: MMIO failure (%d) on device: %s %s\n",
rets[0], pci_name(dev), pci_pretty_name(dev)); rets[0], dn->name, dn->full_name);
WARN_ON(1); WARN_ON(1);
/* /*
...@@ -446,12 +446,10 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) ...@@ -446,12 +446,10 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
* can use it here. * can use it here.
*/ */
if (panic_on_oops) { if (panic_on_oops) {
panic("EEH: MMIO failure (%d) on device:%s %s\n", panic("EEH: MMIO failure (%d) on device: %s %s\n",
rets[0], dn->name, dn->full_name); rets[0], dn->name, dn->full_name);
} else { } else {
__get_cpu_var(ignored_failures)++; __get_cpu_var(ignored_failures)++;
printk(KERN_INFO "EEH: MMIO failure (%d) on device:%s %s\n",
rets[0], dn->name, dn->full_name);
} }
} else { } else {
__get_cpu_var(false_positives)++; __get_cpu_var(false_positives)++;
......
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