net: add sriov debug info
Upstream: no Signed-off-by: Hongbo Li <herberthbli@tencent.com> Signed-off-by: katrinzhou <katrinzhou@tencent.com> Signed-off-by: Kairui Song <kasong@tencent.com>
This commit is contained in:
parent
18165d6697
commit
43eed9ba84
|
@ -447,6 +447,8 @@ static ssize_t sriov_numvfs_store(struct device *dev,
|
|||
|
||||
if (num_vfs == 0) {
|
||||
/* disable VFs */
|
||||
dev_info(&pdev->dev, "disable vfs. old vfs %d, new vfs %d\n",
|
||||
pdev->sriov->num_VFs, num_vfs);
|
||||
ret = pdev->driver->sriov_configure(pdev, 0);
|
||||
goto exit;
|
||||
}
|
||||
|
@ -459,6 +461,9 @@ static ssize_t sriov_numvfs_store(struct device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "enable vfs. old vfs %d, new vfs %d\n",
|
||||
pdev->sriov->num_VFs, num_vfs);
|
||||
|
||||
ret = pdev->driver->sriov_configure(pdev, num_vfs);
|
||||
if (ret < 0)
|
||||
goto exit;
|
||||
|
@ -720,6 +725,8 @@ static void sriov_disable(struct pci_dev *dev)
|
|||
if (!iov->num_VFs)
|
||||
return;
|
||||
|
||||
pr_info("disable %d sriov vfs\n", iov->num_VFs);
|
||||
|
||||
sriov_del_vfs(dev);
|
||||
iov->ctrl &= ~(PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE);
|
||||
pci_cfg_access_lock(dev);
|
||||
|
|
Loading…
Reference in New Issue