X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fpci%2Fiov.c;h=e3a87210e947cdce8d57ded76c63cfb2ba07e788;hb=687d680985b1438360a9ba470ece8b57cd205c3b;hp=415140499ffbc9ee33c79b27aa4ffac1f57014eb;hpb=008fe148cb0fb51d266baabe2c09997b21cf90c6;p=mv-sheeva.git diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 415140499ff..e3a87210e94 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -111,7 +111,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset) } if (reset) - pci_execute_reset_function(virtfn); + __pci_reset_function(virtfn); pci_device_add(virtfn, virtfn->bus); mutex_unlock(&iov->dev->sriov->lock); @@ -165,7 +165,7 @@ static void virtfn_remove(struct pci_dev *dev, int id, int reset) if (reset) { device_release_driver(&virtfn->dev); - pci_execute_reset_function(virtfn); + __pci_reset_function(virtfn); } sprintf(buf, "virtfn%u", id); @@ -488,6 +488,8 @@ found: 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);