OSDN Git Service

mlxsw: spectrum_ethtool: Add link extended state
authorAmit Cohen <amitc@mellanox.com>
Mon, 29 Jun 2020 20:46:18 +0000 (23:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jun 2020 00:45:02 +0000 (17:45 -0700)
commit60f30cd6c24afc66c3e227af1363a40c07ff0307
treea15c034c28a33330f76366a7e9de4a0806e8b8ce
parent1bd06938dfccd87420178e7b3ea7bd13b9e11994
mlxsw: spectrum_ethtool: Add link extended state

Implement .get_down_ext_state() as part of ethtool_ops.
Query link down reason from PDDR register and convert it to ethtool
link_ext_state.

In case that more information than common link_ext_state is provided,
fill link_ext_substate also with the appropriate value.

Signed-off-by: Amit Cohen <amitc@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c