Commit 0325fca7 authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher

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.

Change-ID: I78c05d562c66e7b594b7e48d67860f49b3e5b6ec
Signed-off-by: default avatarMitch Williams <mitch.a.williams@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 1d5109d1
...@@ -872,6 +872,11 @@ void i40e_free_vfs(struct i40e_pf *pf) ...@@ -872,6 +872,11 @@ void i40e_free_vfs(struct i40e_pf *pf)
i40e_vsi_control_rings(pf->vsi[pf->vf[i].lan_vsi_idx], i40e_vsi_control_rings(pf->vsi[pf->vf[i].lan_vsi_idx],
false); false);
for (i = 0; i < pf->num_alloc_vfs; i++)
if (test_bit(I40E_VF_STAT_INIT, &pf->vf[i].vf_states))
i40e_vsi_control_rings(pf->vsi[pf->vf[i].lan_vsi_idx],
false);
/* Disable IOV before freeing resources. This lets any VF drivers /* Disable IOV before freeing resources. This lets any VF drivers
* running in the host get themselves cleaned up before we yank * running in the host get themselves cleaned up before we yank
* the carpet out from underneath their feet. * the carpet out from underneath their feet.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment