|
@@ -331,7 +331,6 @@ failed:
|
|
while (i--)
|
|
while (i--)
|
|
pci_iov_remove_virtfn(dev, i, 0);
|
|
pci_iov_remove_virtfn(dev, i, 0);
|
|
|
|
|
|
- pcibios_sriov_disable(dev);
|
|
|
|
err_pcibios:
|
|
err_pcibios:
|
|
iov->ctrl &= ~(PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE);
|
|
iov->ctrl &= ~(PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE);
|
|
pci_cfg_access_lock(dev);
|
|
pci_cfg_access_lock(dev);
|
|
@@ -339,6 +338,8 @@ err_pcibios:
|
|
ssleep(1);
|
|
ssleep(1);
|
|
pci_cfg_access_unlock(dev);
|
|
pci_cfg_access_unlock(dev);
|
|
|
|
|
|
|
|
+ pcibios_sriov_disable(dev);
|
|
|
|
+
|
|
if (iov->link != dev->devfn)
|
|
if (iov->link != dev->devfn)
|
|
sysfs_remove_link(&dev->dev.kobj, "dep_link");
|
|
sysfs_remove_link(&dev->dev.kobj, "dep_link");
|
|
|
|
|
|
@@ -357,14 +358,14 @@ static void sriov_disable(struct pci_dev *dev)
|
|
for (i = 0; i < iov->num_VFs; i++)
|
|
for (i = 0; i < iov->num_VFs; i++)
|
|
pci_iov_remove_virtfn(dev, i, 0);
|
|
pci_iov_remove_virtfn(dev, i, 0);
|
|
|
|
|
|
- pcibios_sriov_disable(dev);
|
|
|
|
-
|
|
|
|
iov->ctrl &= ~(PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE);
|
|
iov->ctrl &= ~(PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE);
|
|
pci_cfg_access_lock(dev);
|
|
pci_cfg_access_lock(dev);
|
|
pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl);
|
|
pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl);
|
|
ssleep(1);
|
|
ssleep(1);
|
|
pci_cfg_access_unlock(dev);
|
|
pci_cfg_access_unlock(dev);
|
|
|
|
|
|
|
|
+ pcibios_sriov_disable(dev);
|
|
|
|
+
|
|
if (iov->link != dev->devfn)
|
|
if (iov->link != dev->devfn)
|
|
sysfs_remove_link(&dev->dev.kobj, "dep_link");
|
|
sysfs_remove_link(&dev->dev.kobj, "dep_link");
|
|
|
|
|