Skip to contentSkip to conversation

ice: fix Get link status data length

PATCH In review Paul Greenwalt 2 participants 2 messages Dec 21, 2023 – Jan 1, 2024

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

PATCH 1/1 ice: fix Get link status data length

Get link status version 2 (opcode 0x0607) is returning an error because FW expects a data length of 56 bytes, and this is causing the driver to fail probe.

Update the get link status version 2 data length to 56 bytes by adding 5 byte reserved5 field to the end of struct ice_aqc_get_link_status_data and passing it as parameter to offsetofend() to the fix error.

Fixes 2777d24ec6d1 ("ice: Add ice_get_link_status_datalen")
---
 drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +2 -1
index d7fdb7ba7268..fbd5d92182d3 100644
@@ -1359,8 +1359,9 @@ struct ice_aqc_get_link_status_data {
 	u8 lp_flowcontrol;
 #define ICE_AQ_LINK_LP_PAUSE_ADV       BIT(0)
 #define ICE_AQ_LINK_LP_ASM_DIR_ADV     BIT(1)
+	u8 reserved5[5];
 #define ICE_AQC_LS_DATA_SIZE_V2 \
-	offsetofend(struct ice_aqc_get_link_status_data, lp_flowcontrol)
+	offsetofend(struct ice_aqc_get_link_status_data, reserved5)
 } __packed;
 
 /* Set event mask command (direct 0x0613) */
Signature · 6 lines
2.41.0

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Tested-by on v1 1/1
#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Paul Greenwalt
Sent: Friday, December 22, 2023 3:10 AM
To: [email protected]
Cc: Kitszel, Przemyslaw <[email protected]>; Greenwalt, Paul <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net] ice: fix Get link status data length

Get link status version 2 (opcode 0x0607) is returning an error because FW expects a data length of 56 bytes, and this is causing the driver to fail probe.

Update the get link status version 2 data length to 56 bytes by adding 5 byte reserved5 field to the end of struct ice_aqc_get_link_status_data and passing it as parameter to offsetofend() to the fix error.

Quoted 7 lines
Fixes 2777d24ec6d1 ("ice: Add ice_get_link_status_datalen")
---
 drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)