aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2015-10-08 14:58:53 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2015-10-21 20:39:07 +1100
commitf2da4ccf8bd46d3ab0fac383decf5616ad362c17 (patch)
treec1b9490c3253c76a813db368ae2068b34ef51b1a /arch/powerpc/kernel
parentpowerpc/eeh: Don't unfreeze PHB PE after reset (diff)
downloadlinux-dev-f2da4ccf8bd46d3ab0fac383decf5616ad362c17.tar.xz
linux-dev-f2da4ccf8bd46d3ab0fac383decf5616ad362c17.zip
powerpc/eeh: More relaxed hotplug criterion
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>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/eeh_driver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 3a626edbb319..32178a43138f 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -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;
}