Commit 53dd462a authored by Pierre Morel's avatar Pierre Morel Committed by Vasily Gorbik

s390/pci: Do not disable PF when VFs exist

The Physical function should not be disabled until no virtual
functions depends on it.
Let's force the user to first use echo 0 > sriov_numfs before
allowing to disable the PF with echo 0 > power.
Signed-off-by: default avatarPierre Morel <pmorel@linux.ibm.com>
Reviewed-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 44510d6f
......@@ -91,6 +91,9 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
pdev = pci_get_slot(zbus->bus, zdev->devfn);
if (pdev) {
if (pci_num_vf(pdev))
return -EBUSY;
pci_stop_and_remove_bus_device_locked(pdev);
pci_dev_put(pdev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment