diff mbox series

PCI/IOV: export pci_vf_drivers_autoprobe() symbol

Message ID 20220805085639.1629653-1-KevinYang.Wang@amd.com
State New
Headers show
Series PCI/IOV: export pci_vf_drivers_autoprobe() symbol | expand

Commit Message

Yang Wang Aug. 5, 2022, 8:56 a.m. UTC
make pci_vf_drivers_autoprobe() as export symbol.

the external module have no way to control vf autoprobe flag
before pf driver call pci_enable_sriov().

Signed-off-by: Yang Wang <KevinYang.Wang@amd.com>
---
 drivers/pci/iov.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Christoph Hellwig Aug. 6, 2022, 8:14 a.m. UTC | #1
On Fri, Aug 05, 2022 at 04:56:39PM +0800, Yang Wang wrote:
> make pci_vf_drivers_autoprobe() as export symbol.
> 
> the external module have no way to control vf autoprobe flag
> before pf driver call pci_enable_sriov().

But this does not actually seem to be used by any potentially
modular driver.
Leon Romanovsky Aug. 16, 2022, 1:12 p.m. UTC | #2
On Sat, Aug 06, 2022 at 01:14:07AM -0700, Christoph Hellwig wrote:
> On Fri, Aug 05, 2022 at 04:56:39PM +0800, Yang Wang wrote:
> > make pci_vf_drivers_autoprobe() as export symbol.
> > 
> > the external module have no way to control vf autoprobe flag
> > before pf driver call pci_enable_sriov().
> 
> But this does not actually seem to be used by any potentially
> modular driver.

In addition, It is layer violation to control that flag from the driver.

Thanks
diff mbox series

Patch

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 952217572113..4d992424959a 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -1033,6 +1033,8 @@  void pci_vf_drivers_autoprobe(struct pci_dev *dev, bool auto_probe)
 	if (dev->is_physfn)
 		dev->sriov->drivers_autoprobe = auto_probe;
 }
+EXPORT_SYMBOL_GPL(pci_vf_drivers_autoprobe);
+
 
 /**
  * pci_iov_bus_range - find bus range used by Virtual Function