lkml.org 
[lkml]   [2022]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.16 132/200] ethtool: Fix link extended state for big endian
    Date
    From: Moshe Tal <moshet@nvidia.com>

    [ Upstream commit e2f08207c558bc0bc8abaa557cdb29bad776ac7b ]

    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: ecc31c60240b ("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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    include/linux/ethtool.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
    index 845a0ffc16ee8..d8f07baf272ad 100644
    --- a/include/linux/ethtool.h
    +++ b/include/linux/ethtool.h
    @@ -95,7 +95,7 @@ struct ethtool_link_ext_state_info {
    enum ethtool_link_ext_substate_bad_signal_integrity bad_signal_integrity;
    enum ethtool_link_ext_substate_cable_issue cable_issue;
    enum ethtool_link_ext_substate_module module;
    - u8 __link_ext_substate;
    + u32 __link_ext_substate;
    };
    };

    --
    2.34.1


    \
     
     \ /
      Last update: 2022-01-31 13:09    [W:4.398 / U:1.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site