diff options
author | Anjali Singhai Jain <anjali.singhai@intel.com> | 2015-02-24 01:58:46 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-03-03 04:07:26 -0500 |
commit | 025b4a545fc4ef99fb44b32842c6bc30d3690a3f (patch) | |
tree | 7ee3bae1eb6c13bf779b5c170798386a67a0df41 /drivers/net/ethernet | |
parent | 9a3bd2f1e38e5f668200b5e720b4d87023f394d2 (diff) |
i40e: Add FW check to disable DCB and wrap autoneg workaround with FW check
For FW < 4.33 DCB should be disabled.
Also Autoneg workaround to avoid Rx stall is still needed for FW < 4.33.
Change-ID: Iff36ad86be2f597e7701096014d6d094332a9a21
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 849fec7fa7db..4fb05b4c02b3 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -4551,6 +4551,11 @@ static int i40e_init_pf_dcb(struct i40e_pf *pf) | |||
4551 | struct i40e_hw *hw = &pf->hw; | 4551 | struct i40e_hw *hw = &pf->hw; |
4552 | int err = 0; | 4552 | int err = 0; |
4553 | 4553 | ||
4554 | /* Do not enable DCB for SW1 and SW2 images even if the FW is capable */ | ||
4555 | if (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 33)) || | ||
4556 | (pf->hw.aq.fw_maj_ver < 4)) | ||
4557 | goto out; | ||
4558 | |||
4554 | /* Get the initial DCB configuration */ | 4559 | /* Get the initial DCB configuration */ |
4555 | err = i40e_init_dcb(hw); | 4560 | err = i40e_init_dcb(hw); |
4556 | if (!err) { | 4561 | if (!err) { |
@@ -6311,13 +6316,14 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit) | |||
6311 | } | 6316 | } |
6312 | } | 6317 | } |
6313 | 6318 | ||
6314 | msleep(75); | 6319 | if (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 33)) || |
6315 | ret = i40e_aq_set_link_restart_an(&pf->hw, true, NULL); | 6320 | (pf->hw.aq.fw_maj_ver < 4)) { |
6316 | if (ret) { | 6321 | msleep(75); |
6317 | dev_info(&pf->pdev->dev, "link restart failed, aq_err=%d\n", | 6322 | ret = i40e_aq_set_link_restart_an(&pf->hw, true, NULL); |
6318 | pf->hw.aq.asq_last_status); | 6323 | if (ret) |
6324 | dev_info(&pf->pdev->dev, "link restart failed, aq_err=%d\n", | ||
6325 | pf->hw.aq.asq_last_status); | ||
6319 | } | 6326 | } |
6320 | |||
6321 | /* reinit the misc interrupt */ | 6327 | /* reinit the misc interrupt */ |
6322 | if (pf->flags & I40E_FLAG_MSIX_ENABLED) | 6328 | if (pf->flags & I40E_FLAG_MSIX_ENABLED) |
6323 | ret = i40e_setup_misc_vector(pf); | 6329 | ret = i40e_setup_misc_vector(pf); |
@@ -9677,13 +9683,14 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
9677 | if (err) | 9683 | if (err) |
9678 | dev_info(&pf->pdev->dev, "set phy mask fail, aq_err %d\n", err); | 9684 | dev_info(&pf->pdev->dev, "set phy mask fail, aq_err %d\n", err); |
9679 | 9685 | ||
9680 | msleep(75); | 9686 | if (((pf->hw.aq.fw_maj_ver == 4) && (pf->hw.aq.fw_min_ver < 33)) || |
9681 | err = i40e_aq_set_link_restart_an(&pf->hw, true, NULL); | 9687 | (pf->hw.aq.fw_maj_ver < 4)) { |
9682 | if (err) { | 9688 | msleep(75); |
9683 | dev_info(&pf->pdev->dev, "link restart failed, aq_err=%d\n", | 9689 | err = i40e_aq_set_link_restart_an(&pf->hw, true, NULL); |
9684 | pf->hw.aq.asq_last_status); | 9690 | if (err) |
9691 | dev_info(&pf->pdev->dev, "link restart failed, aq_err=%d\n", | ||
9692 | pf->hw.aq.asq_last_status); | ||
9685 | } | 9693 | } |
9686 | |||
9687 | /* The main driver is (mostly) up and happy. We need to set this state | 9694 | /* The main driver is (mostly) up and happy. We need to set this state |
9688 | * before setting up the misc vector or we get a race and the vector | 9695 | * before setting up the misc vector or we get a race and the vector |
9689 | * ends up disabled forever. | 9696 | * ends up disabled forever. |