提交 71158bf2 编写于 作者: D Daniel Pieczko 提交者: David S. Miller

sfc: do not allow VFs to be destroyed if assigned to guests

Signed-off-by: NShradha Shah <sshah@solarflare.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f00bf230
......@@ -417,6 +417,15 @@ static int efx_ef10_pci_sriov_disable(struct efx_nic *efx)
{
struct pci_dev *dev = efx->pci_dev;
if (!efx->vf_count)
return 0;
if (pci_vfs_assigned(dev)) {
netif_err(efx, drv, efx->net_dev, "VFs are assigned to guests; "
"please detach them before disabling SR-IOV\n");
return -EBUSY;
}
pci_disable_sriov(dev);
efx_ef10_sriov_free_vf_vswitching(efx);
efx->vf_count = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册