i40e: Fix overwriting flow control settings during driver loading
Subsystems (2)
PATCH 1/1 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 373149fc99a0 ("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]>
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 27 --------------------- 1 file changed, 27 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -27
@@ -10061,7 +10061,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;
@@ -10187,13 +10186,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.
@@ -14784,7 +14776,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)
@@ -15119,24 +15110,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 ) {
Signature · 7 lines
2.17.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN. Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.