[POWERPC] EEH: multifunction recovery bugfix
authorLinas Vepstas <linas@austin.ibm.com>
Mon, 19 Mar 2007 19:55:51 +0000 (14:55 -0500)
committerPaul Mackerras <paulus@samba.org>
Thu, 22 Mar 2007 11:52:53 +0000 (22:52 +1100)
If the second or higher function of a multi-function device fails
to recover, this failure is not reported upwards. Fix this.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/pseries/eeh_driver.c

index d73c297b0234b5e750401d22975ceb383d59a03d..5ec6edf19ece5cd9fa8cf8f7dbb2c9ee4eaae69b 100644 (file)
@@ -158,7 +158,8 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata)
                return;
 
        rc = driver->err_handler->slot_reset(dev);
-       if (*res == PCI_ERS_RESULT_NONE) *res = rc;
+       if ((*res == PCI_ERS_RESULT_NONE) ||
+           (*res == PCI_ERS_RESULT_RECOVERED)) *res = rc;
        if (*res == PCI_ERS_RESULT_DISCONNECT &&
             rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
 }