]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: ethtool: Pass link mode in use to ethtool
authorDanielle Ratson <danieller@nvidia.com>
Tue, 2 Feb 2021 18:06:11 +0000 (20:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Feb 2021 02:37:29 +0000 (18:37 -0800)
commit313c5e1addfe52212995cfddb2e08b7dff7fd2a8
tree3234b5861265d434ca85e193c34478c5c03e31f9
parentfd83e1feb7bd8a2ac46285db83781483c1f51cd2
mlxsw: ethtool: Pass link mode in use to ethtool

Currently, when user space queries the link's parameters, as speed and
duplex, each parameter is passed from the driver to ethtool.

Instead, pass the link mode bit in use.
In Spectrum-1, simply pass the bit that is set to '1' from PTYS register.
In Spectrum-2, pass the first link mode bit in the mask of the used
link mode.

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c