diff options
Diffstat (limited to 'drivers/pci/iov.c')
| -rw-r--r-- | drivers/pci/iov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index b2e8322755c1..132bd4447534 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -448,7 +448,9 @@ static ssize_t sriov_numvfs_store(struct device *dev, if (num_vfs == 0) { /* disable VFs */ + pci_lock_rescan_remove(); ret = pdev->driver->sriov_configure(pdev, 0); + pci_unlock_rescan_remove(); goto exit; } @@ -460,7 +462,9 @@ static ssize_t sriov_numvfs_store(struct device *dev, goto exit; } + pci_lock_rescan_remove(); ret = pdev->driver->sriov_configure(pdev, num_vfs); + pci_unlock_rescan_remove(); if (ret < 0) goto exit; |
