For Powervm SR-IOV (Pseries) enablement we dont want to match the virtual function's device drivers since firmware plans to load the device node in the device tree dynamically when Novalink assigns the VF to a partition. Signed-off-by: Bryant G. Ly <bryantly@xxxxxxxxxxxxxxxxxx> Signed-off-by: Juan J. Alvarez <jjalvare@xxxxxxxxxx> --- arch/powerpc/platforms/pseries/pci.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 09eba5a9929a..15d5145a622d 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c @@ -58,6 +58,23 @@ void pcibios_name_device(struct pci_dev *dev) DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_name_device); #endif +#ifdef CONFIG_PCI_IOV +void pci_bus_match_virtfn_driver(struct pci_dev *dev) +{ + /* + * Per PSeries SR-IOV requirement there is no need to + * match virtual function device driver as firmware + * will load the device node in the device tree dynamically. + * Since there is no matching of device driver there is + * no failure when attaching driver, therefore there is no + * need to remove sysfs file. Furthermore, the VF platform + * management still needs to exist in sysfs files to be used + * by management. + */ + dev->is_added = 1; +} +#endif + static void __init pSeries_request_regions(void) { if (!isa_io_base) -- 2.11.0 (Apple Git-81)