]> git.baikalelectronics.ru Git - kernel.git/commit
s390/pci: create links between PFs and VFs
authorNiklas Schnelle <schnelle@linux.ibm.com>
Tue, 28 Apr 2020 09:54:46 +0000 (11:54 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 20 May 2020 08:22:51 +0000 (10:22 +0200)
commit0723d48d84c325c3a5c5e1ff48305bf314a852e8
treeb4985d95ac015bdbb63c4ce096f9a8bc3157bdde
parentd9f0a42b706deabc3b5935fd483e4ed40d0d3fe5
s390/pci: create links between PFs and VFs

On s390 PCI Virtual Functions (VFs) are scanned by firmware and are made
available to Linux via the hot-plug interface. As such the common code
path of doing the scan directly using the parent Physical Function (PF)
is not used and fenced off with the no_vf_scan attribute.

Even if the partition created the VFs itself e.g. using the sriov_numvfs
attribute of a PF, the PF/VF links thus need to be established after the
fact. To do this when a VF is plugged we scan through all functions on
the same zbus and test whether they are the parent PF in which case we
establish the necessary links.

With these links established there is now no more need to fence off
pci_iov_remove_virtfn() for pdev->no_vf_scan as the common code now
works fine.

Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Link: https://lore.kernel.org/r/20200506154139.90609-3-schnelle@linux.ibm.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/include/asm/pci_clp.h
arch/s390/pci/pci_bus.c
arch/s390/pci/pci_clp.c
drivers/pci/iov.c