diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index b497daab3d4a..e87fe95da814 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -487,6 +487,8 @@ static int sriov_init(struct pci_dev *dev, int pos) iov->self = dev; pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap); pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link); + if (dev->pcie_type == PCI_EXP_TYPE_RC_END) + iov->link = PCI_DEVFN(PCI_SLOT(dev->devfn), iov->link); if (pdev) iov->dev = pci_dev_get(pdev);