[PATCH 1/11] ppc64: EEH: modify order of EEH state checking

Linas Vepstas linas at austin.ibm.com
Tue Mar 20 06:51:00 EST 2007


Change the order in which pci error state is examined;
the "capabilites" is not valid if "reset state" is 5.

Signed-off-by: Linas Vepstas <linas at austin.ibm.com>

----
 arch/powerpc/platforms/pseries/eeh.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Index: linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6.21-rc4-git4.orig/arch/powerpc/platforms/pseries/eeh.c	2007-03-19 12:51:09.000000000 -0500
+++ linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh.c	2007-03-19 13:19:26.000000000 -0500
@@ -367,6 +367,14 @@ int eeh_dn_check_failure(struct device_n
 		goto dn_unlock;
 	}
 
+	/* Note that config-io to empty slots may fail;
+	 * they are empty when they don't have children. */
+	if ((rets[0] == 5) && (dn->child == NULL)) {
+		false_positives++;
+		rc = 0;
+		goto dn_unlock;
+	}
+
 	/* If EEH is not supported on this device, punt. */
 	if (rets[1] != 1) {
 		printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n",
@@ -383,14 +391,6 @@ int eeh_dn_check_failure(struct device_n
 		goto dn_unlock;
 	}
 
-	/* Note that config-io to empty slots may fail;
-	 * we recognize empty because they don't have children. */
-	if ((rets[0] == 5) && (dn->child == NULL)) {
-		false_positives++;
-		rc = 0;
-		goto dn_unlock;
-	}
-
 	slot_resets++;
  
 	/* Avoid repeated reports of this failure, including problems



More information about the Linuxppc-dev mailing list