Skip to content

Commit f11ab2b

Browse files
author
CKI Backport Bot
committed
ixgbe: fix ixgbe_orom_civd_info struct layout
JIRA: https://issues.redhat.com/browse/RHEL-117603 commit ed913b3 Author: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Date: Thu Jul 31 14:45:33 2025 +0200 ixgbe: fix ixgbe_orom_civd_info struct layout The current layout of struct ixgbe_orom_civd_info causes incorrect data storage due to compiler-inserted padding. This results in issues when writing OROM data into the structure. Add the __packed attribute to ensure the structure layout matches the expected binary format without padding. Fixes: 70db078 ("ixgbe: read the OROM version information") Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
1 parent f197184 commit f11ab2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3094,7 +3094,7 @@ static int ixgbe_get_orom_ver_info(struct ixgbe_hw *hw,
30943094
if (err)
30953095
return err;
30963096

3097-
combo_ver = le32_to_cpu(civd.combo_ver);
3097+
combo_ver = get_unaligned_le32(&civd.combo_ver);
30983098

30993099
orom->major = (u8)FIELD_GET(IXGBE_OROM_VER_MASK, combo_ver);
31003100
orom->patch = (u8)FIELD_GET(IXGBE_OROM_VER_PATCH_MASK, combo_ver);

drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ struct ixgbe_orom_civd_info {
11361136
__le32 combo_ver; /* Combo Image Version number */
11371137
u8 combo_name_len; /* Length of the unicode combo image version string, max of 32 */
11381138
__le16 combo_name[32]; /* Unicode string representing the Combo Image version */
1139-
};
1139+
} __packed;
11401140

11411141
/* Function specific capabilities */
11421142
struct ixgbe_hw_func_caps {

0 commit comments

Comments
 (0)