diff options
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index b167fc2c4abe..3f60976a0805 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -5611,7 +5611,7 @@ static void i40e_fdir_teardown(struct i40e_pf *pf) | |||
5611 | * | 5611 | * |
5612 | * Close up the VFs and other things in prep for pf Reset. | 5612 | * Close up the VFs and other things in prep for pf Reset. |
5613 | **/ | 5613 | **/ |
5614 | static int i40e_prep_for_reset(struct i40e_pf *pf) | 5614 | static void i40e_prep_for_reset(struct i40e_pf *pf) |
5615 | { | 5615 | { |
5616 | struct i40e_hw *hw = &pf->hw; | 5616 | struct i40e_hw *hw = &pf->hw; |
5617 | i40e_status ret = 0; | 5617 | i40e_status ret = 0; |
@@ -5619,7 +5619,7 @@ static int i40e_prep_for_reset(struct i40e_pf *pf) | |||
5619 | 5619 | ||
5620 | clear_bit(__I40E_RESET_INTR_RECEIVED, &pf->state); | 5620 | clear_bit(__I40E_RESET_INTR_RECEIVED, &pf->state); |
5621 | if (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state)) | 5621 | if (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state)) |
5622 | return 0; | 5622 | return; |
5623 | 5623 | ||
5624 | dev_dbg(&pf->pdev->dev, "Tearing down internal switch for reset\n"); | 5624 | dev_dbg(&pf->pdev->dev, "Tearing down internal switch for reset\n"); |
5625 | 5625 | ||
@@ -5636,13 +5636,10 @@ static int i40e_prep_for_reset(struct i40e_pf *pf) | |||
5636 | /* call shutdown HMC */ | 5636 | /* call shutdown HMC */ |
5637 | if (hw->hmc.hmc_obj) { | 5637 | if (hw->hmc.hmc_obj) { |
5638 | ret = i40e_shutdown_lan_hmc(hw); | 5638 | ret = i40e_shutdown_lan_hmc(hw); |
5639 | if (ret) { | 5639 | if (ret) |
5640 | dev_warn(&pf->pdev->dev, | 5640 | dev_warn(&pf->pdev->dev, |
5641 | "shutdown_lan_hmc failed: %d\n", ret); | 5641 | "shutdown_lan_hmc failed: %d\n", ret); |
5642 | clear_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state); | ||
5643 | } | ||
5644 | } | 5642 | } |
5645 | return ret; | ||
5646 | } | 5643 | } |
5647 | 5644 | ||
5648 | /** | 5645 | /** |
@@ -5816,11 +5813,8 @@ end_core_reset: | |||
5816 | **/ | 5813 | **/ |
5817 | static void i40e_handle_reset_warning(struct i40e_pf *pf) | 5814 | static void i40e_handle_reset_warning(struct i40e_pf *pf) |
5818 | { | 5815 | { |
5819 | i40e_status ret; | 5816 | i40e_prep_for_reset(pf); |
5820 | 5817 | i40e_reset_and_rebuild(pf, false); | |
5821 | ret = i40e_prep_for_reset(pf); | ||
5822 | if (!ret) | ||
5823 | i40e_reset_and_rebuild(pf, false); | ||
5824 | } | 5818 | } |
5825 | 5819 | ||
5826 | /** | 5820 | /** |