OSDN Git Service

mlxsw: ethtool: Remove max lanes filtering
authorDanielle Ratson <danieller@nvidia.com>
Tue, 2 Feb 2021 18:06:09 +0000 (20:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Feb 2021 02:37:29 +0000 (18:37 -0800)
commit5fc4053df3d9af1bf728feff90b8494dc036aae2
treea946806e0ce9e159cbed585a2dc0e985ef2fa8bf
parent7dc33f0914a9c8f992592cddfab2bab7faf162b9
mlxsw: ethtool: Remove max lanes filtering

Currently, when a speed can be supported by different number of lanes,
the supported link modes bitmask contains only link modes with a single
number of lanes.

This was done in order to prevent auto negotiation on number of
lanes after 50G-1-lane and 100G-2-lanes link modes were introduced.

For example, if a port's max width is 4, only link modes with 4 lanes
will be presented as supported by that port, so 100G is always achieved by
4 lanes of 25G.

After the previous patches that allow selection of the number of lanes,
auto negotiation on number of lanes becomes practical.

Remove that filtering of the maximum number of lanes supported link modes,
so indeed all the supported and advertised link modes will be shown.

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@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