aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2015-04-07 14:32:55 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-04-14 19:54:09 -0400
commit444346385249603f8970314dcdb058d84a2530a4 (patch)
tree4d5b6d4ffea64c6a802ef887709cdcff16747733 /drivers/net/ethernet
parentf4f88c6d3b6fe1632ddb567be155698733e857a1 (diff)
i40e: stop VF rings
Explicitly stop the rings belonging to each VF when disabling SR-IOV. Even though the VFs were gone, and the associated VSIs were removed, the rings were not stopped, and in some circumstances the hardware would continue to access the memory formerly used by the rings, causing memory corruption or DMAR errors, both of which would lead to general malaise of the kernel. To relieve this condition, explicitly stop all the rings associated with each VF before releasing its resources. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 4d69e1f04901..9b3fc83119fa 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -733,6 +733,11 @@ void i40e_free_vfs(struct i40e_pf *pf)
733 while (test_and_set_bit(__I40E_VF_DISABLE, &pf->state)) 733 while (test_and_set_bit(__I40E_VF_DISABLE, &pf->state))
734 usleep_range(1000, 2000); 734 usleep_range(1000, 2000);
735 735
736 for (i = 0; i < pf->num_alloc_vfs; i++)
737 if (test_bit(I40E_VF_STAT_INIT, &pf->vf[i].vf_states))
738 i40e_vsi_control_rings(pf->vsi[pf->vf[i].lan_vsi_idx],
739 false);
740
736 /* Disable IOV before freeing resources. This lets any VF drivers 741 /* Disable IOV before freeing resources. This lets any VF drivers
737 * running in the host get themselves cleaned up before we yank 742 * running in the host get themselves cleaned up before we yank
738 * the carpet out from underneath their feet. 743 * the carpet out from underneath their feet.