]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Show EEH per-device false positives
authorLinas Vepstas <linas@austin.ibm.com>
Wed, 23 May 2007 17:20:51 +0000 (03:20 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 14 Jun 2007 12:29:55 +0000 (22:29 +1000)
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>
arch/powerpc/platforms/pseries/eeh.c
arch/powerpc/platforms/pseries/eeh_sysfs.c
include/asm-powerpc/pci-bridge.h

index d284a58c5b5fa02f67f921e017fc0d8238b44aa4..ff33c150535edd95e4d092c6124d426085623096 100644 (file)
@@ -505,6 +505,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
                printk(KERN_WARNING "EEH: read_slot_reset_state() failed; rc=%d dn=%s\n",
                       ret, dn->full_name);
                false_positives++;
+               pdn->eeh_false_positives ++;
                rc = 0;
                goto dn_unlock;
        }
@@ -513,6 +514,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
         * they are empty when they don't have children. */
        if ((rets[0] == 5) && (dn->child == NULL)) {
                false_positives++;
+               pdn->eeh_false_positives ++;
                rc = 0;
                goto dn_unlock;
        }
@@ -522,6 +524,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
                printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n",
                       ret, dn->full_name);
                false_positives++;
+               pdn->eeh_false_positives ++;
                rc = 0;
                goto dn_unlock;
        }
@@ -529,6 +532,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
        /* If not the kind of error we know about, punt. */
        if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) {
                false_positives++;
+               pdn->eeh_false_positives ++;
                rc = 0;
                goto dn_unlock;
        }
@@ -921,6 +925,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
        pdn->eeh_mode = 0;
        pdn->eeh_check_count = 0;
        pdn->eeh_freeze_count = 0;
+       pdn->eeh_false_positives = 0;
 
        if (status && strcmp(status, "ok") != 0)
                return NULL;    /* ignore devices with bad status */
index 0543cafec56b1bc78c778717af249e3edfb28670..15e13b568904a4fb3eb7d533c3d4c0b650681d01 100644 (file)
@@ -58,6 +58,7 @@ EEH_SHOW_ATTR(eeh_config_addr, eeh_config_addr, "0x%x");
 EEH_SHOW_ATTR(eeh_pe_config_addr, eeh_pe_config_addr, "0x%x");
 EEH_SHOW_ATTR(eeh_check_count, eeh_check_count, "%d");
 EEH_SHOW_ATTR(eeh_freeze_count, eeh_freeze_count, "%d");
+EEH_SHOW_ATTR(eeh_false_positives, eeh_false_positives, "%d");
 
 void eeh_sysfs_add_device(struct pci_dev *pdev)
 {
@@ -67,6 +68,7 @@ void eeh_sysfs_add_device(struct pci_dev *pdev)
        rc += device_create_file(&pdev->dev, &dev_attr_eeh_config_addr);
        rc += device_create_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
        rc += device_create_file(&pdev->dev, &dev_attr_eeh_check_count);
+       rc += device_create_file(&pdev->dev, &dev_attr_eeh_false_positives);
        rc += device_create_file(&pdev->dev, &dev_attr_eeh_freeze_count);
 
        if (rc)
@@ -79,6 +81,7 @@ void eeh_sysfs_remove_device(struct pci_dev *pdev)
        device_remove_file(&pdev->dev, &dev_attr_eeh_config_addr);
        device_remove_file(&pdev->dev, &dev_attr_eeh_pe_config_addr);
        device_remove_file(&pdev->dev, &dev_attr_eeh_check_count);
+       device_remove_file(&pdev->dev, &dev_attr_eeh_false_positives);
        device_remove_file(&pdev->dev, &dev_attr_eeh_freeze_count);
 }
 
index 11537a07ca70e70745ddc9706e8a1e91884326d9..c49ce41cfa95819ae1202964c5fa170b44b69a09 100644 (file)
@@ -83,6 +83,7 @@ struct pci_dn {
        int     eeh_pe_config_addr; /* new-style partition endpoint address */
        int     eeh_check_count;        /* # times driver ignored error */
        int     eeh_freeze_count;       /* # times this device froze up. */
+       int     eeh_false_positives;    /* # times this device reported #ff's */
        u32     config_space[16];       /* saved PCI config space */
 #endif
 };