Merge tag 'pci-v4.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[linux-2.6-block.git] / drivers / pci / iov.c
index ec69506bfde283ca37b379a1041f1160e6a8c1a8..677924ae03503e57ae7258cba3b2063316757a74 100644 (file)
@@ -636,6 +636,17 @@ void pci_restore_iov_state(struct pci_dev *dev)
                sriov_restore_state(dev);
 }
 
+/**
+ * pci_vf_drivers_autoprobe - set PF property drivers_autoprobe for VFs
+ * @dev: the PCI device
+ * @auto_probe: set VF drivers auto probe flag
+ */
+void pci_vf_drivers_autoprobe(struct pci_dev *dev, bool auto_probe)
+{
+       if (dev->is_physfn)
+               dev->sriov->drivers_autoprobe = auto_probe;
+}
+
 /**
  * pci_iov_bus_range - find bus range used by Virtual Function
  * @bus: the PCI bus