• Amit Cohen's avatar
    ethtool: Add link extended state · ecc31c60
    Amit Cohen authored
    Currently, drivers can only tell whether the link is up/down using
    LINKSTATE_GET, but no additional information is given.
    
    Add attributes to LINKSTATE_GET command in order to allow drivers
    to expose the user more information in addition to link state to ease
    the debug process, for example, reason for link down state.
    
    Extended state consists of two attributes - link_ext_state and
    link_ext_substate. The idea is to avoid 'vendor specific' states in order
    to prevent drivers to use specific link_ext_state that can be in the future
    common link_ext_state.
    
    The substates allows drivers to add more information to the common
    link_ext_state. For example, vendor can expose 'Autoneg' as link_ext_state
    and add 'No partner detected during force mode' as link_ext_substate.
    
    If a driver cannot pinpoint the extended state with the substate
    accuracy, it is free to expose only the extended state and omit the
    substate attribute.
    Signed-off-by: default avatarAmit Cohen <amitc@mellanox.com>
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Reviewed-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ecc31c60
linkstate.c 4.78 KB