Skip to contentSkip to conversation

ice: fix 200G PHY types to link speed mapping

PATCH In review Paul Greenwalt 2 participants 2 messages Apr 19, 2024 – May 23, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: fix 200G PHY types to link speed mapping

Commit 24407a01e57c ("ice: Add 200G speed/phy type use") added support for 200G PHY speeds, but did not include the mapping of 200G PHY types to link speed. As a result the driver is returning UNKNOWN link speed when setting 200G ethtool advertised link modes.

To fix this add 200G PHY types to link speed mapping to ice_get_link_speed_based_on_phy_type().

Fixes 24407a01e57c ("ice: Add 200G speed/phy type use")
---
 drivers/net/ethernet/intel/ice/ice_common.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/net/ethernet/intel/ice/ice_common.c +10 -0
index d9f6cc71d900..e7d28432ba03 100644
@@ -3135,6 +3135,16 @@ ice_get_link_speed_based_on_phy_type(u64 phy_type_low, u64 phy_type_high)
 	case ICE_PHY_TYPE_HIGH_100G_AUI2:
 		speed_phy_type_high = ICE_AQ_LINK_SPEED_100GB;
 		break;
+	case ICE_PHY_TYPE_HIGH_200G_CR4_PAM4:
+	case ICE_PHY_TYPE_HIGH_200G_SR4:
+	case ICE_PHY_TYPE_HIGH_200G_FR4:
+	case ICE_PHY_TYPE_HIGH_200G_LR4:
+	case ICE_PHY_TYPE_HIGH_200G_DR4:
+	case ICE_PHY_TYPE_HIGH_200G_KR4_PAM4:
+	case ICE_PHY_TYPE_HIGH_200G_AUI4_AOC_ACC:
+	case ICE_PHY_TYPE_HIGH_200G_AUI4:
+		speed_phy_type_high = ICE_AQ_LINK_SPEED_200GB;
+		break;
 	default:
 		speed_phy_type_high = ICE_AQ_LINK_SPEED_UNKNOWN;
 		break;
Signature · 1 line
2.41.0
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Paul Greenwalt
Sent: Friday, April 19, 2024 9:05 PM
To: [email protected]
Cc: Michal Swiatkowski <[email protected]>; Greenwalt, Paul <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v1] ice: fix 200G PHY types to link speed mapping

Commit 24407a01e57c ("ice: Add 200G speed/phy type use") added support for 200G PHY speeds, but did not include the mapping of 200G PHY types to link speed. As a result the driver is returning UNKNOWN link speed when setting 200G ethtool advertised link modes.

Quoted 9 lines

To fix this add 200G PHY types to link speed mapping to ice_get_link_speed_based_on_phy_type().

Fixes 24407a01e57c ("ice: Add 200G speed/phy type use")
---
 drivers/net/ethernet/intel/ice/ice_common.c | 10 ++++++++++
 1 file changed, 10 insertions(+)