aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/eeh.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/kernel/eeh.c')
-rw-r--r--arch/ppc64/kernel/eeh.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c
index b23159464abb..0060934dffd2 100644
--- a/arch/ppc64/kernel/eeh.c
+++ b/arch/ppc64/kernel/eeh.c
@@ -617,7 +617,32 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
617 * In any case they must share a common PHB. 617 * In any case they must share a common PHB.
618 */ 618 */
619 ret = read_slot_reset_state(pdn, rets); 619 ret = read_slot_reset_state(pdn, rets);
620 if (!(ret == 0 && rets[1] == 1 && (rets[0] == 2 || rets[0] == 4))) { 620
621 /* If the call to firmware failed, punt */
622 if (ret != 0) {
623 printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n",
624 ret, dn->full_name);
625 __get_cpu_var(false_positives)++;
626 return 0;
627 }
628
629 /* If EEH is not supported on this device, punt. */
630 if (rets[1] != 1) {
631 printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n",
632 ret, dn->full_name);
633 __get_cpu_var(false_positives)++;
634 return 0;
635 }
636
637 /* If not the kind of error we know about, punt. */
638 if (rets[0] != 2 && rets[0] != 4 && rets[0] != 5) {
639 __get_cpu_var(false_positives)++;
640 return 0;
641 }
642
643 /* Note that config-io to empty slots may fail;
644 * we recognize empty because they don't have children. */
645 if ((rets[0] == 5) && (dn->child == NULL)) {
621 __get_cpu_var(false_positives)++; 646 __get_cpu_var(false_positives)++;
622 return 0; 647 return 0;
623 } 648 }
@@ -650,7 +675,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
650 /* Most EEH events are due to device driver bugs. Having 675 /* Most EEH events are due to device driver bugs. Having
651 * a stack trace will help the device-driver authors figure 676 * a stack trace will help the device-driver authors figure
652 * out what happened. So print that out. */ 677 * out what happened. So print that out. */
653 dump_stack(); 678 if (rets[0] != 5) dump_stack();
654 schedule_work(&eeh_event_wq); 679 schedule_work(&eeh_event_wq);
655 680
656 return 0; 681 return 0;