Commit 921c467c authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher

i40e: close client on remove and shutdown

When the driver is removed or shut down, close any attached clients
(i.e. i40iw). This prevents a panic seen sometimes on forced driver
removal or system shutdown when iWarp is running.

Change-ID: I4f6161e5a73ffbb2fd5883567b007310302bfcb5
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 8090f618
...@@ -11395,6 +11395,11 @@ static void i40e_remove(struct pci_dev *pdev) ...@@ -11395,6 +11395,11 @@ static void i40e_remove(struct pci_dev *pdev)
if (pf->service_task.func) if (pf->service_task.func)
cancel_work_sync(&pf->service_task); cancel_work_sync(&pf->service_task);
/* Client close must be called explicitly here because the timer
* has been stopped.
*/
i40e_notify_client_of_netdev_close(pf->vsi[pf->lan_vsi], false);
if (pf->flags & I40E_FLAG_SRIOV_ENABLED) { if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
i40e_free_vfs(pf); i40e_free_vfs(pf);
pf->flags &= ~I40E_FLAG_SRIOV_ENABLED; pf->flags &= ~I40E_FLAG_SRIOV_ENABLED;
...@@ -11635,6 +11640,11 @@ static void i40e_shutdown(struct pci_dev *pdev) ...@@ -11635,6 +11640,11 @@ static void i40e_shutdown(struct pci_dev *pdev)
cancel_work_sync(&pf->service_task); cancel_work_sync(&pf->service_task);
i40e_fdir_teardown(pf); i40e_fdir_teardown(pf);
/* Client close must be called explicitly here because the timer
* has been stopped.
*/
i40e_notify_client_of_netdev_close(pf->vsi[pf->lan_vsi], false);
if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE)) if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE))
i40e_enable_mc_magic_wake(pf); i40e_enable_mc_magic_wake(pf);
......
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