]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: ethtool: Add support for setting lanes when autoneg is off
authorDanielle Ratson <danieller@nvidia.com>
Tue, 2 Feb 2021 18:06:10 +0000 (20:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Feb 2021 02:37:29 +0000 (18:37 -0800)
commit604b21620b303994507f242caeb463b503013c9b
tree3779062d2138e28d882c187cddfd2c4083888398
parent2b645f7b8dbb03eb51e0a655bc970466abad4a54
mlxsw: ethtool: Add support for setting lanes when autoneg is off

Currently, when auto negotiation is set to off, the user can force a
specific speed or both speed and duplex. The user cannot influence the
number of lanes that will be forced.

Add support for setting speed along with lanes so one would be able
to choose how many lanes will be forced.

When lanes parameter is passed from user space, choose the link mode
that its actual width equals to it.
Otherwise, the default link mode will be the one that supports the width
of the port.

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