diff options
author | Shannon Nelson <shannon.nelson@intel.com> | 2014-06-03 21:23:14 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-06-24 21:15:58 -0400 |
commit | 23cfbe074da66305d992c663b778d12476eeefce (patch) | |
tree | b0bf76ae2b67f508f5cf00d9df48b41c13fa4c13 | |
parent | 17413a80bcff78ceb371fb6a34d888780ad7b7fa (diff) |
i40e: make prep_for_reset void
The return from i40e_prep_for_reset() was being ignored by almost all
its callers. The one place it wasn't ignored could have caused a silent
and confusing failure of the driver to finish a reset. Since we really
are doing a rebuild anyway, ignore this last case as well and simply
make the function a void type.
Change-ID: Ia4fed7f903d39a6c47c5722625a53e59c3f7ed53
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-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 | /** |