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 <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Gavin Shan 2016-03-04 10:53:13 +11:00 committed by Michael Ellerman
parent 2311cca555
commit 3fa7bf7229
1 changed files with 3 additions and 0 deletions

View File

@ -454,6 +454,9 @@ static void *eeh_rmv_device(void *data, void *userdata)
driver = eeh_pcid_get(dev); driver = eeh_pcid_get(dev);
if (driver) { if (driver) {
eeh_pcid_put(dev); eeh_pcid_put(dev);
if (removed &&
eeh_pe_passed(edev->pe))
return NULL;
if (removed && if (removed &&
driver->err_handler && driver->err_handler &&
driver->err_handler->error_detected && driver->err_handler->error_detected &&