|
@@ -448,11 +448,20 @@ int efx_ef10_sriov_init(struct efx_nic *efx)
|
|
void efx_ef10_sriov_fini(struct efx_nic *efx)
|
|
void efx_ef10_sriov_fini(struct efx_nic *efx)
|
|
{
|
|
{
|
|
struct efx_ef10_nic_data *nic_data = efx->nic_data;
|
|
struct efx_ef10_nic_data *nic_data = efx->nic_data;
|
|
|
|
+ unsigned int i;
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
if (!nic_data->vf)
|
|
if (!nic_data->vf)
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
+ /* Remove any VFs in the host */
|
|
|
|
+ for (i = 0; i < efx->vf_count; ++i) {
|
|
|
|
+ struct efx_nic *vf_efx = nic_data->vf[i].efx;
|
|
|
|
+
|
|
|
|
+ if (vf_efx)
|
|
|
|
+ vf_efx->pci_dev->driver->remove(vf_efx->pci_dev);
|
|
|
|
+ }
|
|
|
|
+
|
|
rc = efx_ef10_pci_sriov_disable(efx);
|
|
rc = efx_ef10_pci_sriov_disable(efx);
|
|
if (rc)
|
|
if (rc)
|
|
netif_dbg(efx, drv, efx->net_dev,
|
|
netif_dbg(efx, drv, efx->net_dev,
|