aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Galazka <kgalazka@FreeBSD.org>2025-12-05 22:02:45 +0000
committerKrzysztof Galazka <kgalazka@FreeBSD.org>2025-12-05 22:02:51 +0000
commitc6212b7da110d82b1d0086ec525deb216993021e (patch)
treefefd60561dea4bd5e635205bbb913b39e58a70f9
parent112a6912e1c99439a7e2a75f3961e18f3b800c6e (diff)
ice(4): Add support for 40G maximal PMD speed
E823 backplane devices may support 40G as maximal PMD speed. Extend port topology reading logic to handle this case. While at that fix indentation according to FreeBSD style(9). Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Tested by: gowtham.kumar.ks_intel.com Approved by: kbowling (mentor), erj (mentor) Sponsored by: Intel Corporation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53587
-rw-r--r--sys/dev/ice/ice_adminq_cmd.h1
-rw-r--r--sys/dev/ice/ice_lib.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h
index 6225abc0f38b..b2dde986dd23 100644
--- a/sys/dev/ice/ice_adminq_cmd.h
+++ b/sys/dev/ice/ice_adminq_cmd.h
@@ -2131,6 +2131,7 @@ struct ice_aqc_get_port_options_elem {
#define ICE_AQC_PORT_OPT_MAX_LANE_50G 6
#define ICE_AQC_PORT_OPT_MAX_LANE_100G 7
#define ICE_AQC_PORT_OPT_MAX_LANE_200G 8
+#define ICE_AQC_PORT_OPT_MAX_LANE_40G 9
u8 global_scid[2];
u8 phy_scid[2];
u8 pf2port_cid[2];
diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c
index 8b6349f686eb..393726eb1f59 100644
--- a/sys/dev/ice/ice_lib.c
+++ b/sys/dev/ice/ice_lib.c
@@ -11344,10 +11344,10 @@ ice_get_port_topology(struct ice_hw *hw, u8 lport,
return err;
if (cage_type == 0x11 || /* SFP */
- cage_type == 0x12) { /* SFP28 */
+ cage_type == 0x12) { /* SFP28 */
port_topology->serdes_lane_count = 1;
} else if (cage_type == 0x13 || /* QSFP */
- cage_type == 0x14) { /* QSFP28 */
+ cage_type == 0x14) { /* QSFP28 */
u8 max_speed = 0;
err = ice_get_maxspeed(hw, port_topology->primary_serdes_lane,
@@ -11362,7 +11362,8 @@ ice_get_port_topology(struct ice_hw *hw, u8 lport,
if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_100G)
port_topology->serdes_lane_count = 4;
- else if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_50G)
+ else if (max_speed == ICE_AQC_PORT_OPT_MAX_LANE_50G ||
+ max_speed == ICE_AQC_PORT_OPT_MAX_LANE_40G)
port_topology->serdes_lane_count = 2;
else
port_topology->serdes_lane_count = 1;