Commit a4866597 authored by Shannon Nelson's avatar Shannon Nelson Committed by Jeff Kirsher

i40e: delete netdev after deleting napi and vectors

We've been deleting the netdev before getting around to deleting the napi
structs.  Unfortunately, we then didn't delete the napi structs because we
have a check for netdev, thus we were leaving garbage around in the system.

Change-ID: Ife540176f6c9f801147495b3f2d2ac2e61ddcc58
Signed-off-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Signed-off-by: default avatarCatherine Sullivan <catherine.sullivan@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent b936136d
...@@ -6806,8 +6806,6 @@ int i40e_vsi_release(struct i40e_vsi *vsi) ...@@ -6806,8 +6806,6 @@ int i40e_vsi_release(struct i40e_vsi *vsi)
if (vsi->netdev) { if (vsi->netdev) {
/* results in a call to i40e_close() */ /* results in a call to i40e_close() */
unregister_netdev(vsi->netdev); unregister_netdev(vsi->netdev);
free_netdev(vsi->netdev);
vsi->netdev = NULL;
} }
} else { } else {
if (!test_and_set_bit(__I40E_DOWN, &vsi->state)) if (!test_and_set_bit(__I40E_DOWN, &vsi->state))
...@@ -6826,6 +6824,10 @@ int i40e_vsi_release(struct i40e_vsi *vsi) ...@@ -6826,6 +6824,10 @@ int i40e_vsi_release(struct i40e_vsi *vsi)
i40e_vsi_delete(vsi); i40e_vsi_delete(vsi);
i40e_vsi_free_q_vectors(vsi); i40e_vsi_free_q_vectors(vsi);
if (vsi->netdev) {
free_netdev(vsi->netdev);
vsi->netdev = NULL;
}
i40e_vsi_clear_rings(vsi); i40e_vsi_clear_rings(vsi);
i40e_vsi_clear(vsi); i40e_vsi_clear(vsi);
......
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