diff options
author | Shannon Nelson <shannon.nelson@intel.com> | 2014-06-04 01:23:14 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-06-24 18:15:58 -0700 |
commit | 23cfbe074da66305d992c663b778d12476eeefce (patch) | |
tree | b0bf76ae2b67f508f5cf00d9df48b41c13fa4c13 /drivers | |
parent | 17413a80bcff78ceb371fb6a34d888780ad7b7fa (diff) | |
download | linux-23cfbe074da66305d992c663b778d12476eeefce.tar.bz2 |
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>
Diffstat (limited to 'drivers')
-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) * * Close up the VFs and other things in prep for pf Reset. **/ -static int i40e_prep_for_reset(struct i40e_pf *pf) +static void i40e_prep_for_reset(struct i40e_pf *pf) { struct i40e_hw *hw = &pf->hw; i40e_status ret = 0; @@ -5619,7 +5619,7 @@ static int i40e_prep_for_reset(struct i40e_pf *pf) clear_bit(__I40E_RESET_INTR_RECEIVED, &pf->state); if (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state)) - return 0; + return; dev_dbg(&pf->pdev->dev, "Tearing down internal switch for reset\n"); @@ -5636,13 +5636,10 @@ static int i40e_prep_for_reset(struct i40e_pf *pf) /* call shutdown HMC */ if (hw->hmc.hmc_obj) { ret = i40e_shutdown_lan_hmc(hw); - if (ret) { + if (ret) dev_warn(&pf->pdev->dev, "shutdown_lan_hmc failed: %d\n", ret); - clear_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state); - } } - return ret; } /** @@ -5816,11 +5813,8 @@ end_core_reset: **/ static void i40e_handle_reset_warning(struct i40e_pf *pf) { - i40e_status ret; - - ret = i40e_prep_for_reset(pf); - if (!ret) - i40e_reset_and_rebuild(pf, false); + i40e_prep_for_reset(pf); + i40e_reset_and_rebuild(pf, false); } /** |