All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] powerpc: EEH: work with device endpoint, always
@ 2007-11-15 18:54 Linas Vepstas
  2007-11-15 18:56 ` [PATCH 1/3 v2] " Linas Vepstas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Linas Vepstas @ 2007-11-15 18:54 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: munsone, linuxppc-dev, Sandra Rhodes


Perform all error checking at the "partitonable endpoint" 
of the device.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
 arch/powerpc/platforms/pseries/eeh.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh.c	2007-11-09 16:54:04.000000000 -0600
+++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c	2007-11-09 16:56:39.000000000 -0600
@@ -482,6 +482,7 @@ int eeh_dn_check_failure(struct device_n
 		no_dn++;
 		return 0;
 	}
+	dn = find_device_pe (dn);
 	pdn = PCI_DN(dn);
 
 	/* Access to IO BARs might get this far and still not want checking. */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3 v2] powerpc: EEH: work with device endpoint, always
  2007-11-15 18:54 [PATCH 1/3] powerpc: EEH: work with device endpoint, always Linas Vepstas
@ 2007-11-15 18:56 ` Linas Vepstas
  2007-11-15 18:57 ` [PATCH 2/3] powerpc: EEH: careful when identifying "empty" slots Linas Vepstas
  2007-11-15 18:58 ` [PATCH 3/3]: powerpc/eeh: report errors as soon as possible Linas Vepstas
  2 siblings, 0 replies; 4+ messages in thread
From: Linas Vepstas @ 2007-11-15 18:56 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: munsone, linuxppc-dev, Sandra Rhodes


Perform all error checking at the "partitonable endpoint" 
of the device.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
version 2: I still can't get whitespace right the first time ...

 arch/powerpc/platforms/pseries/eeh.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh.c	2007-11-09 16:54:04.000000000 -0600
+++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c	2007-11-09 16:56:39.000000000 -0600
@@ -482,6 +482,7 @@ int eeh_dn_check_failure(struct device_n
 		no_dn++;
 		return 0;
 	}
+	dn = find_device_pe(dn);
 	pdn = PCI_DN(dn);
 
 	/* Access to IO BARs might get this far and still not want checking. */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] powerpc: EEH: careful when identifying "empty" slots.
  2007-11-15 18:54 [PATCH 1/3] powerpc: EEH: work with device endpoint, always Linas Vepstas
  2007-11-15 18:56 ` [PATCH 1/3 v2] " Linas Vepstas
@ 2007-11-15 18:57 ` Linas Vepstas
  2007-11-15 18:58 ` [PATCH 3/3]: powerpc/eeh: report errors as soon as possible Linas Vepstas
  2 siblings, 0 replies; 4+ messages in thread
From: Linas Vepstas @ 2007-11-15 18:57 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: munsone, linuxppc-dev, Sandra Rhodes


If an "empty" slot is failing, make sure its a permanent failure;
else process the error normally.

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

----
 arch/powerpc/platforms/pseries/eeh.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh.c	2007-11-09 16:56:39.000000000 -0600
+++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh.c	2007-11-09 17:02:39.000000000 -0600
@@ -548,7 +548,7 @@ int eeh_dn_check_failure(struct device_n
 
 	/* 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)) {
+	if ((rets[0] == 5) && (rets[2] == 0) && (dn->child == NULL)) {
 		false_positives++;
 		pdn->eeh_false_positives ++;
 		rc = 0;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3]: powerpc/eeh: report errors as soon as possible.
  2007-11-15 18:54 [PATCH 1/3] powerpc: EEH: work with device endpoint, always Linas Vepstas
  2007-11-15 18:56 ` [PATCH 1/3 v2] " Linas Vepstas
  2007-11-15 18:57 ` [PATCH 2/3] powerpc: EEH: careful when identifying "empty" slots Linas Vepstas
@ 2007-11-15 18:58 ` Linas Vepstas
  2 siblings, 0 replies; 4+ messages in thread
From: Linas Vepstas @ 2007-11-15 18:58 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: munsone, linuxppc-dev, Sandra Rhodes


Do not wait for the pci slot status before reporting an error
to the device driver. Some systems may take many seconds to
report the slot status, and this can confuse unsuspecting 
device drivers.

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

----
 arch/powerpc/platforms/pseries/eeh_driver.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

Index: linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/arch/powerpc/platforms/pseries/eeh_driver.c	2007-11-09 17:28:58.000000000 -0600
+++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c	2007-11-09 17:36:51.000000000 -0600
@@ -354,13 +354,6 @@ struct pci_dn * handle_eeh_events (struc
 	if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
 		goto excess_failures;
 
-	/* Get the current PCI slot state. */
-	rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
-	if (rc < 0) {
-		printk(KERN_WARNING "EEH: Permanent failure\n");
-		goto hard_fail;
-	}
-
 	printk(KERN_WARNING
 	   "EEH: This PCI device has failed %d times in the last hour:\n",
 		frozen_pdn->eeh_freeze_count);
@@ -376,6 +369,14 @@ struct pci_dn * handle_eeh_events (struc
 	 */
 	pci_walk_bus(frozen_bus, eeh_report_error, &result);
 
+	/* Get the current PCI slot state. This can take a long time,
+	 * sometimes over 3 seconds for certain systems. */
+	rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
+	if (rc < 0) {
+		printk(KERN_WARNING "EEH: Permanent failure\n");
+		goto hard_fail;
+	}
+
 	/* Since rtas may enable MMIO when posting the error log,
 	 * don't post the error log until after all dev drivers
 	 * have been informed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-15 18:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-15 18:54 [PATCH 1/3] powerpc: EEH: work with device endpoint, always Linas Vepstas
2007-11-15 18:56 ` [PATCH 1/3 v2] " Linas Vepstas
2007-11-15 18:57 ` [PATCH 2/3] powerpc: EEH: careful when identifying "empty" slots Linas Vepstas
2007-11-15 18:58 ` [PATCH 3/3]: powerpc/eeh: report errors as soon as possible Linas Vepstas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.