From: Gavin Shan Date: Thu, 3 Mar 2016 23:53:13 +0000 (+1100) Subject: powerpc/eeh: Don't remove passed VFs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3fa7bf7229993eac65fd6ade2ffc5f75150b40e1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git powerpc/eeh: Don't remove passed VFs When we have partial hotplug as part of the error recovery on PF, the VFs that are bound with vfio-pci driver will experience hotplug. That's not allowed. This checks if the VF PE is passed or not. If it does, we leave the VF without removing it. Signed-off-by: Gavin Shan Reviewed-by: Russell Currey Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 6c59de8b9280..fb6207d2c604 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c @@ -454,6 +454,9 @@ static void *eeh_rmv_device(void *data, void *userdata) driver = eeh_pcid_get(dev); if (driver) { eeh_pcid_put(dev); + if (removed && + eeh_pe_passed(edev->pe)) + return NULL; if (removed && driver->err_handler && driver->err_handler->error_detected &&