Skip to content

Commit

Permalink
ice: fix Get link status data length
Browse files Browse the repository at this point in the history
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: 2777d24 ("ice: Add ice_get_link_status_datalen")
Reviewed-by: Przemek Kitszel <[email protected]>
Signed-off-by: Paul Greenwalt <[email protected]>
Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
  • Loading branch information
pgreenwa authored and anguy11 committed Jan 3, 2024
1 parent 371e576 commit 9fb266d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down

0 comments on commit 9fb266d

Please sign in to comment.