[PATCH 2/3]: powerpc eeh: drivers that need reset trump others
Linas Vepstas
linas at austin.ibm.com
Sat Nov 3 07:27:50 EST 2007
Bugfix: if a driver controlling one part of a multi-function
pci card has asked for a reset, honor that request above all
othres.
Signed-off-by: Linas Vepstas <linas at austin.ibm.com>
----
arch/powerpc/platforms/pseries/eeh_driver.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 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-10-16 11:46:30.000000000 -0500
+++ linux-2.6.23-rc8-mm1/arch/powerpc/platforms/pseries/eeh_driver.c 2007-10-16 11:54:27.000000000 -0500
@@ -105,9 +105,10 @@ static void eeh_report_error(struct pci_
return;
rc = driver->err_handler->error_detected (dev, pci_channel_io_frozen);
+
+ /* A driver that needs a reset trumps all others */
+ if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
if (*res == PCI_ERS_RESULT_NONE) *res = rc;
- if (*res == PCI_ERS_RESULT_DISCONNECT &&
- rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
}
/**
@@ -129,9 +130,10 @@ static void eeh_report_mmio_enabled(stru
return;
rc = driver->err_handler->mmio_enabled (dev);
+
+ /* A driver that needs a reset trumps all others */
+ if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
if (*res == PCI_ERS_RESULT_NONE) *res = rc;
- if (*res == PCI_ERS_RESULT_DISCONNECT &&
- rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
}
/**
More information about the Linuxppc-dev
mailing list