aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-05-23 13:20:51 -0400
committerPaul Mackerras <paulus@samba.org>2007-06-14 08:29:55 -0400
commit858955bd572f0ca38b258e45c7dd743b9e44b04e (patch)
treef24ee25bc6e65c394c294e01cfffe6ba87cf46b3
parente1d04c9769398ae7df8c7ca2681b25f540b719d5 (diff)
[POWERPC] Show EEH per-device false positives
Track and report the number of times we read an all-1s value (0xff, 0xffff or 0xffffffff) from each device which is valid data, not indicating EEH isolation. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> ---- arch/powerpc/platforms/pseries/eeh.c | 5 +++++ arch/powerpc/platforms/pseries/eeh_sysfs.c | 3 +++ include/asm-powerpc/pci-bridge.h | 1 + 3 files changed, 9 insertions(+) Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c5
-rw-r--r--arch/powerpc/platforms/pseries/eeh_sysfs.c3
-rw-r--r--include/asm-powerpc/pci-bridge.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index d284a58c5b5f..ff33c150535e 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -505,6 +505,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
505 printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n", 505 printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n",
506 ret, dn->full_name); 506 ret, dn->full_name);
507 false_positives++; 507 false_positives++;
508 pdn->eeh_false_positives ++;
508 rc = 0; 509 rc = 0;
509 goto dn_unlock; 510 goto dn_unlock;
510 } 511 }
@@ -513,6 +514,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
513 * they are empty when they don't have children. */ 514 * they are empty when they don't have children. */
514 if ((rets[0] == 5) && (dn->child == NULL)) { 515 if ((rets[0] == 5) && (dn->child == NULL)) {
515 false_positives++; 516 false_positives++;
517 pdn->eeh_false_positives ++;
516 rc = 0; 518 rc = 0;
517 goto dn_unlock; 519 goto dn_unlock;
518 } 520 }
@@ -522,6 +524,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
522 printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n", 524 printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n",
523 ret, dn->full_name); 525 ret, dn->full_name);
524 false_positives++; 526 false_positives++;
527 pdn->eeh_false_positives ++;
525 rc = 0; 528 rc = 0;
526 goto dn_unlock; 529 goto dn_unlock;
527 } 530 }
@@ -529,6 +532,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
529 /* If not the kind of error we know about, punt. */ 532 /* If not the kind of error we know about, punt. */
530 if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) { 533 if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) {
531 false_positives++; 534 false_positives++;
535 pdn->eeh_false_positives ++;
532 rc = 0; 536 rc = 0;
533 goto dn_unlock; 537 goto dn_unlock;
534 } 538 }
@@ -921,6 +925,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
921 pdn->eeh_mode = 0; 925 pdn->eeh_mode = 0;
922 pdn->eeh_check_count = 0; 926 pdn->eeh_check_count = 0;
923 pdn->eeh_freeze_count = 0; 927 pdn->eeh_freeze_count = 0;
928 pdn->eeh_false_positives = 0;
924 929
925 if (status && strcmp(status, "ok") != 0) 930 if (status && strcmp(status, "ok") != 0)
926 return NULL; /* ignore devices with bad status */ 931 return NULL; /* ignore devices with bad status */
diff --git a/arch/powerpc/platforms/pseries/eeh_sysfs.c b/arch/powerpc/platforms/pseries/eeh_sysfs.c
index 0543cafec56b..15e13b568904 100644
--- a/arch/powerpc/platforms/pseries/eeh_sysfs.c
+++ b/arch/powerpc/platforms/pseries/eeh_sysfs.c
@@ -58,6 +58,7 @@ EEH_SHOW_ATTR(eeh_config_addr, eeh_config_addr, "0x%x");
58EEH_SHOW_ATTR(eeh_pe_config_addr, eeh_pe_config_addr, "0x%x"); 58EEH_SHOW_ATTR(eeh_pe_config_addr, eeh_pe_config_addr, "0x%x");
59EEH_SHOW_ATTR(eeh_check_count, eeh_check_count, "%d"); 59EEH_SHOW_ATTR(eeh_check_count, eeh_check_count, "%d");
60EEH_SHOW_ATTR(eeh_freeze_count, eeh_freeze_count, "%d"); 60EEH_SHOW_ATTR(eeh_freeze_count, eeh_freeze_count, "%d");
61EEH_SHOW_ATTR(eeh_false_positives, eeh_false_positives, "%d");
61 62
62void eeh_sysfs_add_device(struct pci_dev *pdev) 63void eeh_sysfs_add_device(struct pci_dev *pdev)
63{ 64{
@@ -67,6 +68,7 @@ void eeh_sysfs_add_device(struct pci_dev *pdev)
67 rc += device_create_file(&pdev->dev, &dev_attr_eeh_config_addr); 68 rc += device_create_file(&pdev->dev, &dev_attr_eeh_config_addr);
68 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); 69 rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
69 rc += device_create_file(&pdev->dev, &dev_attr_eeh_check_count); 70 rc += device_create_file(&pdev->dev, &dev_attr_eeh_check_count);
71 rc += device_create_file(&pdev->dev, &dev_attr_eeh_false_positives);
70 rc += device_create_file(&pdev->dev, &dev_attr_eeh_freeze_count); 72 rc += device_create_file(&pdev->dev, &dev_attr_eeh_freeze_count);
71 73
72 if (rc) 74 if (rc)
@@ -79,6 +81,7 @@ void eeh_sysfs_remove_device(struct pci_dev *pdev)
79 device_remove_file(&pdev->dev, &dev_attr_eeh_config_addr); 81 device_remove_file(&pdev->dev, &dev_attr_eeh_config_addr);
80 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr); 82 device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
81 device_remove_file(&pdev->dev, &dev_attr_eeh_check_count); 83 device_remove_file(&pdev->dev, &dev_attr_eeh_check_count);
84 device_remove_file(&pdev->dev, &dev_attr_eeh_false_positives);
82 device_remove_file(&pdev->dev, &dev_attr_eeh_freeze_count); 85 device_remove_file(&pdev->dev, &dev_attr_eeh_freeze_count);
83} 86}
84 87
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index 11537a07ca70..c49ce41cfa95 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -83,6 +83,7 @@ struct pci_dn {
83 int eeh_pe_config_addr; /* new-style partition endpoint address */ 83 int eeh_pe_config_addr; /* new-style partition endpoint address */
84 int eeh_check_count; /* # times driver ignored error */ 84 int eeh_check_count; /* # times driver ignored error */
85 int eeh_freeze_count; /* # times this device froze up. */ 85 int eeh_freeze_count; /* # times this device froze up. */
86 int eeh_false_positives; /* # times this device reported #ff's */
86 u32 config_space[16]; /* saved PCI config space */ 87 u32 config_space[16]; /* saved PCI config space */
87#endif 88#endif
88}; 89};