Subject: [PATCH 7/11] ppc64: EEH: handle reset state high

From: [email-masked] (Linas Vepstas)
Date: Mon, 19 Mar 2007 14:56:43 -0500

Subject: [PATCH 7/11] ppc64: EEH: handle reset state high

Some firmware versions will return a slot reset state of "1"
when a slot is EEH frozen. Recognize this as a state that can be
handled.

Signed-off-by: Linas Vepstas <[email-masked]>

----
 arch/powerpc/platforms/pseries/eeh.c |    6 +++---
 1 file changed, 3 insertions(+), 3 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 13:21:21.000000000 -0500
+++ linux-2.6.21-rc4-git4/arch/powerpc/platforms/pseries/eeh.c	2007-03-19 13:21:43.000000000 -0500
@@ -386,7 +386,7 @@ int eeh_dn_check_failure(struct device_n
 	}
 
 	/* If not the kind of error we know about, punt. */
-	if (rets[0] != 2 && rets[0] != 4 && rets[0] != 5) {
+	if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) {
 		false_positives++;
 		rc = 0;
 		goto dn_unlock;
@@ -401,7 +401,7 @@ int eeh_dn_check_failure(struct device_n
 	spin_unlock_irqrestore(&confirm_error_lock, flags);
 
 	state = pci_channel_io_normal;
-	if ((rets[0] == 2) || (rets[0] == 4))
+	if ((rets[0] == 1) || (rets[0] == 2) || (rets[0] == 4))
 		state = pci_channel_io_frozen;
 	if (rets[0] == 5)
 		state = pci_channel_io_perm_failure;
@@ -410,7 +410,7 @@ int eeh_dn_check_failure(struct device_n
 	/* Most EEH events are due to device driver bugs.  Having
 	 * a stack trace will help the device-driver authors figure
 	 * out what happened.  So print that out. */
-	if (rets[0] != 5) dump_stack();
+	dump_stack();
 	return 1;
 
 dn_unlock: