Skip to content

Commit 4cdb9f8

Browse files
mpalczew96anguy11
authored andcommitted
i40e: Fix overwriting flow control settings during driver loading
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: 373149f ("i40e: Decrease the scope of rtnl lock") Signed-off-by: Dawid Lukwinski <[email protected]> Signed-off-by: Mateusz Palczewski <[email protected]> Reviewed-by: Aleksandr Loktionov <[email protected]> Tested-by: Tony Brelinski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent d2c788f commit 4cdb9f8

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10005,7 +10005,6 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
1000510005
int old_recovery_mode_bit = test_bit(__I40E_RECOVERY_MODE, pf->state);
1000610006
struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
1000710007
struct i40e_hw *hw = &pf->hw;
10008-
u8 set_fc_aq_fail = 0;
1000910008
i40e_status ret;
1001010009
u32 val;
1001110010
int v;
@@ -10131,13 +10130,6 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
1013110130
i40e_stat_str(&pf->hw, ret),
1013210131
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
1013310132

10134-
/* make sure our flow control settings are restored */
10135-
ret = i40e_set_fc(&pf->hw, &set_fc_aq_fail, true);
10136-
if (ret)
10137-
dev_dbg(&pf->pdev->dev, "setting flow control: ret = %s last_status = %s\n",
10138-
i40e_stat_str(&pf->hw, ret),
10139-
i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
10140-
1014110133
/* Rebuild the VSIs and VEBs that existed before reset.
1014210134
* They are still in our local switch element arrays, so only
1014310135
* 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)
1472014712
int err;
1472114713
u32 val;
1472214714
u32 i;
14723-
u8 set_fc_aq_fail;
1472414715

1472514716
err = pci_enable_device_mem(pdev);
1472614717
if (err)
@@ -15054,24 +15045,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1505415045
}
1505515046
INIT_LIST_HEAD(&pf->vsi[pf->lan_vsi]->ch_list);
1505615047

15057-
/* Make sure flow control is set according to current settings */
15058-
err = i40e_set_fc(hw, &set_fc_aq_fail, true);
15059-
if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_GET)
15060-
dev_dbg(&pf->pdev->dev,
15061-
"Set fc with err %s aq_err %s on get_phy_cap\n",
15062-
i40e_stat_str(hw, err),
15063-
i40e_aq_str(hw, hw->aq.asq_last_status));
15064-
if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_SET)
15065-
dev_dbg(&pf->pdev->dev,
15066-
"Set fc with err %s aq_err %s on set_phy_config\n",
15067-
i40e_stat_str(hw, err),
15068-
i40e_aq_str(hw, hw->aq.asq_last_status));
15069-
if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_UPDATE)
15070-
dev_dbg(&pf->pdev->dev,
15071-
"Set fc with err %s aq_err %s on get_link_info\n",
15072-
i40e_stat_str(hw, err),
15073-
i40e_aq_str(hw, hw->aq.asq_last_status));
15074-
1507515048
/* if FDIR VSI was set up, start it now */
1507615049
for (i = 0; i < pf->num_alloc_vsi; i++) {
1507715050
if (pf->vsi[i] && pf->vsi[i]->type == I40E_VSI_FDIR) {

0 commit comments

Comments
 (0)