summaryrefslogtreecommitdiffstats
path: root/arch/s390/pci/pci_clp.c
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2020-04-28 11:54:46 +0200
committerVasily Gorbik <gor@linux.ibm.com>2020-05-20 10:22:51 +0200
commite5794cf1a270d813a5b9373a6876487d4d154195 (patch)
treeb4985d95ac015bdbb63c4ce096f9a8bc3157bdde /arch/s390/pci/pci_clp.c
parentPCI/IOV: Introduce pci_iov_sysfs_link() function (diff)
downloadlinux-e5794cf1a270d813a5b9373a6876487d4d154195.tar.xz
linux-e5794cf1a270d813a5b9373a6876487d4d154195.zip
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>
Diffstat (limited to 'arch/s390/pci/pci_clp.c')
-rw-r--r--arch/s390/pci/pci_clp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c
index 9b318824a134..d7bd3c287cf7 100644
--- a/arch/s390/pci/pci_clp.c
+++ b/arch/s390/pci/pci_clp.c
@@ -159,6 +159,7 @@ static int clp_store_query_pci_fn(struct zpci_dev *zdev,
zdev->uid = response->uid;
zdev->fmb_length = sizeof(u32) * response->fmb_len;
zdev->rid_available = response->rid_avail;
+ zdev->is_physfn = response->is_physfn;
if (!s390_pci_no_rid && zdev->rid_available)
zdev->devfn = response->rid & ZPCI_RID_MASK_DEVFN;