net/mlx5e: Add ethtool extended link state
authorMoshe Tal <moshet@nvidia.com>
Tue, 23 Feb 2021 11:42:17 +0000 (13:42 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 16 Apr 2021 18:48:28 +0000 (11:48 -0700)
commitb3446acb2b9ae6128587cd2d311214950adfb68b
tree49368080a30f4bb2719b745540d333eaa503135f
parent36830159acbeb9896d7684b5f52db7b22efa197f
net/mlx5e: Add ethtool extended link state

In case the interface was set up but cannot establish the link, ethtool
will print more information to help the user troubleshoot the state.

For example, no link due to missing cable:
$ ethtool eth1
...
Link detected: no (No cable)

Beside the general extended state, drivers can pass additional
information about the link state using the sub-state field. For example:

$ ethtool eth1
...
Link detected: no (Autoneg, No partner detected)

The extended state is available only for specific cases, in other cases
ethtool with print only "Link detected: no" as before

Signed-off-by: Moshe Tal <moshet@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c