Skip to content

Commit e2f0820

Browse files
Moshe Taldavem330
authored andcommitted
ethtool: Fix link extended state for big endian
The link extended sub-states are assigned as enum that is an integer size but read from a union as u8, this is working for small values on little endian systems but for big endian this always give 0. Fix the variable in the union to match the enum size. Fixes: ecc31c6 ("ethtool: Add link extended state") Signed-off-by: Moshe Tal <moshet@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Gal Pressman <gal@nvidia.com> Reviewed-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d15c7e8 commit e2f0820

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/linux/ethtool.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct ethtool_link_ext_state_info {
111111
enum ethtool_link_ext_substate_bad_signal_integrity bad_signal_integrity;
112112
enum ethtool_link_ext_substate_cable_issue cable_issue;
113113
enum ethtool_link_ext_substate_module module;
114-
u8 __link_ext_substate;
114+
u32 __link_ext_substate;
115115
};
116116
};
117117

0 commit comments

Comments
 (0)