diff options
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r-- | drivers/pci/iov.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index b497daab3d4a..03c7706c0a09 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -110,7 +110,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset) | |||
110 | } | 110 | } |
111 | 111 | ||
112 | if (reset) | 112 | if (reset) |
113 | pci_execute_reset_function(virtfn); | 113 | __pci_reset_function(virtfn); |
114 | 114 | ||
115 | pci_device_add(virtfn, virtfn->bus); | 115 | pci_device_add(virtfn, virtfn->bus); |
116 | mutex_unlock(&iov->dev->sriov->lock); | 116 | mutex_unlock(&iov->dev->sriov->lock); |
@@ -164,7 +164,7 @@ static void virtfn_remove(struct pci_dev *dev, int id, int reset) | |||
164 | 164 | ||
165 | if (reset) { | 165 | if (reset) { |
166 | device_release_driver(&virtfn->dev); | 166 | device_release_driver(&virtfn->dev); |
167 | pci_execute_reset_function(virtfn); | 167 | __pci_reset_function(virtfn); |
168 | } | 168 | } |
169 | 169 | ||
170 | sprintf(buf, "virtfn%u", id); | 170 | sprintf(buf, "virtfn%u", id); |
@@ -487,6 +487,8 @@ found: | |||
487 | iov->self = dev; | 487 | iov->self = dev; |
488 | pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap); | 488 | pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap); |
489 | pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link); | 489 | pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link); |
490 | if (dev->pcie_type == PCI_EXP_TYPE_RC_END) | ||
491 | iov->link = PCI_DEVFN(PCI_SLOT(dev->devfn), iov->link); | ||
490 | 492 | ||
491 | if (pdev) | 493 | if (pdev) |
492 | iov->dev = pci_dev_get(pdev); | 494 | iov->dev = pci_dev_get(pdev); |