diff options
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 897452d72d71..628e917f5338 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -8181,16 +8181,16 @@ static void i40e_remove(struct pci_dev *pdev) | |||
8181 | 8181 | ||
8182 | i40e_ptp_stop(pf); | 8182 | i40e_ptp_stop(pf); |
8183 | 8183 | ||
8184 | if (pf->flags & I40E_FLAG_SRIOV_ENABLED) { | ||
8185 | i40e_free_vfs(pf); | ||
8186 | pf->flags &= ~I40E_FLAG_SRIOV_ENABLED; | ||
8187 | } | ||
8188 | |||
8189 | /* no more scheduling of any task */ | 8184 | /* no more scheduling of any task */ |
8190 | set_bit(__I40E_DOWN, &pf->state); | 8185 | set_bit(__I40E_DOWN, &pf->state); |
8191 | del_timer_sync(&pf->service_timer); | 8186 | del_timer_sync(&pf->service_timer); |
8192 | cancel_work_sync(&pf->service_task); | 8187 | cancel_work_sync(&pf->service_task); |
8193 | 8188 | ||
8189 | if (pf->flags & I40E_FLAG_SRIOV_ENABLED) { | ||
8190 | i40e_free_vfs(pf); | ||
8191 | pf->flags &= ~I40E_FLAG_SRIOV_ENABLED; | ||
8192 | } | ||
8193 | |||
8194 | i40e_fdir_teardown(pf); | 8194 | i40e_fdir_teardown(pf); |
8195 | 8195 | ||
8196 | /* If there is a switch structure or any orphans, remove them. | 8196 | /* If there is a switch structure or any orphans, remove them. |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 9074f63a2447..7d133faad4cf 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | |||
@@ -1868,7 +1868,8 @@ int i40e_vc_process_vflr_event(struct i40e_pf *pf) | |||
1868 | /* clear the bit in GLGEN_VFLRSTAT */ | 1868 | /* clear the bit in GLGEN_VFLRSTAT */ |
1869 | wr32(hw, I40E_GLGEN_VFLRSTAT(reg_idx), (1 << bit_idx)); | 1869 | wr32(hw, I40E_GLGEN_VFLRSTAT(reg_idx), (1 << bit_idx)); |
1870 | 1870 | ||
1871 | i40e_reset_vf(vf, true); | 1871 | if (!test_bit(__I40E_DOWN, &pf->state)) |
1872 | i40e_reset_vf(vf, true); | ||
1872 | } | 1873 | } |
1873 | } | 1874 | } |
1874 | 1875 | ||