diff options
author | Filip Sadowski <filip.sadowski@intel.com> | 2017-08-22 06:57:43 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2017-10-02 15:46:35 -0400 |
commit | d60bcc798000e015940fb47eb23b79dd2fda5c9e (patch) | |
tree | dbd5c9d6da692ae7d9ca1ead8813b4d0dc89388e /drivers/net/ethernet/intel/i40e/i40e_common.c | |
parent | 54902349ee95045b67e2f0c39b75f5418540064b (diff) |
i40e: Fix reporting of supported link modes
This patch fixes incorrect reporting of supported link modes on some NICs.
Signed-off-by: Filip Sadowski <filip.sadowski@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_common.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_common.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index 7346d8850c8e..64c15f4c9d2b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c | |||
@@ -1821,7 +1821,7 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw, | |||
1821 | hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA | | 1821 | hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA | |
1822 | I40E_AQ_CONFIG_FEC_RS_ENA); | 1822 | I40E_AQ_CONFIG_FEC_RS_ENA); |
1823 | hw_link_info->ext_info = resp->ext_info; | 1823 | hw_link_info->ext_info = resp->ext_info; |
1824 | hw_link_info->loopback = resp->loopback; | 1824 | hw_link_info->loopback = resp->loopback & I40E_AQ_LOOPBACK_MASK; |
1825 | hw_link_info->max_frame_size = le16_to_cpu(resp->max_frame_size); | 1825 | hw_link_info->max_frame_size = le16_to_cpu(resp->max_frame_size); |
1826 | hw_link_info->pacing = resp->config & I40E_AQ_CONFIG_PACING_MASK; | 1826 | hw_link_info->pacing = resp->config & I40E_AQ_CONFIG_PACING_MASK; |
1827 | 1827 | ||
@@ -1852,6 +1852,15 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw, | |||
1852 | hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) | 1852 | hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) |
1853 | hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; | 1853 | hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; |
1854 | 1854 | ||
1855 | if (hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR && | ||
1856 | hw->aq.api_min_ver >= 7) { | ||
1857 | __le32 tmp; | ||
1858 | |||
1859 | memcpy(&tmp, resp->link_type, sizeof(tmp)); | ||
1860 | hw->phy.phy_types = le32_to_cpu(tmp); | ||
1861 | hw->phy.phy_types |= ((u64)resp->link_type_ext << 32); | ||
1862 | } | ||
1863 | |||
1855 | /* save link status information */ | 1864 | /* save link status information */ |
1856 | if (link) | 1865 | if (link) |
1857 | *link = *hw_link_info; | 1866 | *link = *hw_link_info; |