]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/eeh: More relaxed hotplug criterion
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Thu, 8 Oct 2015 03:58:53 +0000 (14:58 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 21 Oct 2015 09:39:07 +0000 (20:39 +1100)
Currently, we rely on the existence of struct pci_driver::err_handler
to decide if the corresponding PCI device should be unplugged during
EEH recovery (partially hotplug case). However that check is not
sufficient. Some device drivers implement only some of the EEH error
handlers to collect diag-data. That means the driver still expects a
hotplug to recover from the EEH error.

This makes the hotplug criterion more relaxed: if the device driver
doesn't provide all necessary EEH error handlers, it will experience
hotplug during EEH recovery.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
[mpe: Minor change log rewording]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh_driver.c

index 3a626edbb3191429092092a1c269aed96d9d81dd..32178a43138ff3242fe2227c355c9eec069d140c 100644 (file)
@@ -416,7 +416,10 @@ static void *eeh_rmv_device(void *data, void *userdata)
        driver = eeh_pcid_get(dev);
        if (driver) {
                eeh_pcid_put(dev);
-               if (driver->err_handler)
+               if (driver->err_handler &&
+                   driver->err_handler->error_detected &&
+                   driver->err_handler->slot_reset &&
+                   driver->err_handler->resume)
                        return NULL;
        }