summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/pci.c
diff options
context:
space:
mode:
authorBryant G. Ly <bryantly@linux.vnet.ibm.com>2017-11-09 08:00:35 -0600
committerMichael Ellerman <mpe@ellerman.id.au>2017-12-11 13:03:36 +1100
commit608c0d8804ef3ca4cda8ec6ad914e47deb283d7b (patch)
tree72f7ed3e570c6a926601621f1af161ed65685fd0 /arch/powerpc/platforms/pseries/pci.c
parentdae7253f9f78a731755ca20c66b2d2c40b86baea (diff)
PCI/IOV: Add pci_vf_drivers_autoprobe() interface
Add a pci_vf_drivers_autoprobe() interface. Setting autoprobe to false on the PF prevents drivers from binding to VFs when they are enabled. Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com> Signed-off-by: Juan J. Alvarez <jjalvare@linux.vnet.ibm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/pseries/pci.c')
-rw-r--r--arch/powerpc/platforms/pseries/pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 14a90cf471cc..48d3af026f90 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -63,6 +63,7 @@ int pseries_pcibios_sriov_enable(struct pci_dev *pdev, u16 num_vfs)
{
/* Allocate PCI data */
add_dev_pci_data(pdev);
+ pci_vf_drivers_autoprobe(pdev, false);
return 0;
}
@@ -70,6 +71,7 @@ int pseries_pcibios_sriov_disable(struct pci_dev *pdev)
{
/* Release PCI data */
remove_dev_pci_data(pdev);
+ pci_vf_drivers_autoprobe(pdev, true);
return 0;
}
#endif