i40e: Fix overwriting flow control settings during driver loading
[ Upstream commit 4cdb9f80dcd46aab3c0020b4a6920c22735c5d6e ]
During driver loading flow control settings were written to FW
using a variable which was always zero, since it was being set
only by ethtool. This behavior has been corrected and driver
no longer overwrites the default FW/NVM settings.
Fixes: 373149fc99
("i40e: Decrease the scope of rtnl lock")
Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b57d0f5489
commit
0c6a8e35f4
@ -10005,7 +10005,6 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
|
||||
int old_recovery_mode_bit = test_bit(__I40E_RECOVERY_MODE, pf->state);
|
||||
struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
|
||||
struct i40e_hw *hw = &pf->hw;
|
||||
u8 set_fc_aq_fail = 0;
|
||||
i40e_status ret;
|
||||
u32 val;
|
||||
int v;
|
||||
@ -10131,13 +10130,6 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
|
||||
i40e_stat_str(&pf->hw, ret),
|
||||
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
|
||||
|
||||
/* make sure our flow control settings are restored */
|
||||
ret = i40e_set_fc(&pf->hw, &set_fc_aq_fail, true);
|
||||
if (ret)
|
||||
dev_dbg(&pf->pdev->dev, "setting flow control: ret = %s last_status = %s\n",
|
||||
i40e_stat_str(&pf->hw, ret),
|
||||
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
|
||||
|
||||
/* Rebuild the VSIs and VEBs that existed before reset.
|
||||
* They are still in our local switch element arrays, so only
|
||||
* need to rebuild the switch model in the HW.
|
||||
@ -14720,7 +14712,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
int err;
|
||||
u32 val;
|
||||
u32 i;
|
||||
u8 set_fc_aq_fail;
|
||||
|
||||
err = pci_enable_device_mem(pdev);
|
||||
if (err)
|
||||
@ -15054,24 +15045,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
}
|
||||
INIT_LIST_HEAD(&pf->vsi[pf->lan_vsi]->ch_list);
|
||||
|
||||
/* Make sure flow control is set according to current settings */
|
||||
err = i40e_set_fc(hw, &set_fc_aq_fail, true);
|
||||
if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_GET)
|
||||
dev_dbg(&pf->pdev->dev,
|
||||
"Set fc with err %s aq_err %s on get_phy_cap\n",
|
||||
i40e_stat_str(hw, err),
|
||||
i40e_aq_str(hw, hw->aq.asq_last_status));
|
||||
if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_SET)
|
||||
dev_dbg(&pf->pdev->dev,
|
||||
"Set fc with err %s aq_err %s on set_phy_config\n",
|
||||
i40e_stat_str(hw, err),
|
||||
i40e_aq_str(hw, hw->aq.asq_last_status));
|
||||
if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_UPDATE)
|
||||
dev_dbg(&pf->pdev->dev,
|
||||
"Set fc with err %s aq_err %s on get_link_info\n",
|
||||
i40e_stat_str(hw, err),
|
||||
i40e_aq_str(hw, hw->aq.asq_last_status));
|
||||
|
||||
/* if FDIR VSI was set up, start it now */
|
||||
for (i = 0; i < pf->num_alloc_vsi; i++) {
|
||||
if (pf->vsi[i] && pf->vsi[i]->type == I40E_VSI_FDIR) {
|
||||
|
Loading…
Reference in New Issue
Block a user