i40e: Fix PHY type identifiers for 2.5G and 5G adapters
Subsystems (2)
PATCH v2 1/1 i40e: Fix PHY type identifiers for 2.5G and 5G adapters
Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. Introduce separate PHY identifiers for these two operation types.
---
v2: Added missing changes in i40e_ethtool.c file
--- drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 ++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +2 -0
@@ -1568,6 +1568,8 @@ enum i40e_aq_phy_type {I40E_PHY_TYPE_25GBASE_ACC =0x24 ,I40E_PHY_TYPE_2_5GBASE_T =0x30 ,I40E_PHY_TYPE_5GBASE_T =0x31 , +I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS =0x30 , +I40E_PHY_TYPE_5GBASE_T_LINK_STATUS =0x31 ,I40E_PHY_TYPE_MAX ,I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP =0xFD , I40E_PHY_TYPE_EMPTY = 0xFE,
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +2 -2
@@ -841,8 +841,8 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw, 10000baseT_Full);break ;case I40E_PHY_TYPE_10GBASE_T : -case I40E_PHY_TYPE_5GBASE_T : -case I40E_PHY_TYPE_2_5GBASE_T : +case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS : +case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS :case I40E_PHY_TYPE_1000BASE_T :case I40E_PHY_TYPE_100BASE_TX :ethtool_link_ksettings_add_link_mode (ks, supported, Autoneg);
Signature · 1 line
2.17.1
Nguyen
PATCH v2 1/1 i40e: Fix PHY type identifiers for 2.5G and 5G adapters
Quoted 6 lines · Mateusz Palczewski
Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. Introduce separate PHY identifiers for these two operation types.
Fixes 2e45d3f4677a("i40e: Add support for X710 B/P & SFP+ cards")
The Fixes formatting was correct on v1, but is wrong here.
Quoted 32 lines
Signed-off-by Dawid Lukwinski <[email protected]>Signed-off-by Mateusz Palczewski <[email protected]>Reviewed-by Aleksandr Loktionov <[email protected]>Reviewed-by Michal Maloszewski <[email protected]>Reviewed-by Sylwester Dziedziuch <[email protected]>---
v2: Added missing changes ini40e_ethtool.cfile--- drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 ++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +2
-0@@ -1568,6 +1568,8 @@ enum i40e_aq_phy_type {I40E_PHY_TYPE_25GBASE_ACC =0x24 ,I40E_PHY_TYPE_2_5GBASE_T =0x30 ,I40E_PHY_TYPE_5GBASE_T =0x31 , +I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS =0x30 , +I40E_PHY_TYPE_5GBASE_T_LINK_STATUS =0x31 ,I40E_PHY_TYPE_MAX ,I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP =0xFD , I40E_PHY_TYPE_EMPTY = 0xFE,drivers/net/ethernet/intel/i40e/i40e_ethtool.c +0
-0
drivers/net/ethernet/intel/i40e/i40e_ethtool.c static void i40e_get_settings_link_up(struct · line 847
Quoted 9 lines
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +2
-2@@ -841,8 +841,8 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw, 10000baseT _Full);break ;case I40E_PHY_TYPE_10GBASE_T : -case I40E_PHY_TYPE_5GBASE_T : -case I40E_PHY_TYPE_2_5GBASE_T : +case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS : +case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS :
There's nothing changing here. You've added new PHY types, but their values match the old ones. The net effect is no change.