Skip to content

Commit 921c467

Browse files
mawilli1Jeff Kirsher
authored andcommitted
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: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 8090f61 commit 921c467

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11395,6 +11395,11 @@ static void i40e_remove(struct pci_dev *pdev)
1139511395
if (pf->service_task.func)
1139611396
cancel_work_sync(&pf->service_task);
1139711397

11398+
/* Client close must be called explicitly here because the timer
11399+
* has been stopped.
11400+
*/
11401+
i40e_notify_client_of_netdev_close(pf->vsi[pf->lan_vsi], false);
11402+
1139811403
if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
1139911404
i40e_free_vfs(pf);
1140011405
pf->flags &= ~I40E_FLAG_SRIOV_ENABLED;
@@ -11635,6 +11640,11 @@ static void i40e_shutdown(struct pci_dev *pdev)
1163511640
cancel_work_sync(&pf->service_task);
1163611641
i40e_fdir_teardown(pf);
1163711642

11643+
/* Client close must be called explicitly here because the timer
11644+
* has been stopped.
11645+
*/
11646+
i40e_notify_client_of_netdev_close(pf->vsi[pf->lan_vsi], false);
11647+
1163811648
if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE))
1163911649
i40e_enable_mc_magic_wake(pf);
1164011650

0 commit comments

Comments
 (0)