Skip to contentSkip to conversation

i40e: Fix PHY type identifiers for 2.5G and 5G adapters

PATCH Superseded Mateusz Palczewski 2 participants 2 messages Mar 31, 2021 – Apr 1, 2021

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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
index ce626ea..78ba6b0 100644
@@ -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
index 96d5202..fe5befa 100644
@@ -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
#1 lore raw

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

---
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
index ce626ea..78ba6b0 100644
@@ -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
index 96d5202..fe5befa 100644

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.