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
This commit is contained in:
Krzysztof Galazka
2025-12-05 23:02:45 +01:00
parent 112a6912e1
commit c6212b7da1
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -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];
+4 -3
View File
@@ -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;