From: Brian Maly Date: Fri, 29 May 2015 21:41:21 +0000 (-0400) Subject: Revert "i40e: Add FW check to disable DCB and wrap autoneg workaround with FW check" X-Git-Tag: v4.1.12-92~322^2~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=949d1171a18680f77940f5d72dc6bb15436c0305;p=users%2Fjedix%2Flinux-maple.git Revert "i40e: Add FW check to disable DCB and wrap autoneg workaround with FW check" Orabug: 21111674 This commit was included in upstream driver version 1.2.10 however it caused a regression where the following error is logged when the driver loads: i40e 0000:90:00.3: get phy abilities failed, aq_err -7, advertised speed settings may not be correct Even the latest upstream driver is affected, so for now revert this commit until a proper fix is accepted upstream. This reverts commit 14a9015d3d98cb735fe304204a91ad2a24b979ac. Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 5b5bea159bd53..d9b8a97666c09 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -4591,11 +4591,6 @@ static int i40e_init_pf_dcb(struct i40e_pf *pf) struct i40e_hw *hw = &pf->hw; int err = 0; - /* Do not enable DCB for SW1 and SW2 images even if the FW is capable */ - if (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 33)) || - (pf->hw.aq.fw_maj_ver < 4)) - goto out; - /* Get the initial DCB configuration */ err = i40e_init_dcb(hw); if (!err) { @@ -6469,14 +6464,13 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit) } } - if (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 33)) || - (pf->hw.aq.fw_maj_ver < 4)) { - msleep(75); - ret = i40e_aq_set_link_restart_an(&pf->hw, true, NULL); - if (ret) - dev_info(&pf->pdev->dev, "link restart failed, aq_err=%d\n", - pf->hw.aq.asq_last_status); + msleep(75); + ret = i40e_aq_set_link_restart_an(&pf->hw, true, NULL); + if (ret) { + dev_info(&pf->pdev->dev, "link restart failed, aq_err=%d\n", + pf->hw.aq.asq_last_status); } + /* reinit the misc interrupt */ if (pf->flags & I40E_FLAG_MSIX_ENABLED) ret = i40e_setup_misc_vector(pf); @@ -9905,14 +9899,13 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (err) dev_info(&pf->pdev->dev, "set phy mask fail, aq_err %d\n", err); - if (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 33)) || - (pf->hw.aq.fw_maj_ver < 4)) { - msleep(75); - err = i40e_aq_set_link_restart_an(&pf->hw, true, NULL); - if (err) - dev_info(&pf->pdev->dev, "link restart failed, aq_err=%d\n", - pf->hw.aq.asq_last_status); + msleep(75); + err = i40e_aq_set_link_restart_an(&pf->hw, true, NULL); + if (err) { + dev_info(&pf->pdev->dev, "link restart failed, aq_err=%d\n", + pf->hw.aq.asq_last_status); } + /* The main driver is (mostly) up and happy. We need to set this state * before setting up the misc vector or we get a race and the vector * ends up disabled forever.