net/mlx5e: ethtool, Fix restriction of autoneg with 56G
authorAya Levin <ayal@nvidia.com>
Sun, 27 Dec 2020 14:33:19 +0000 (16:33 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 7 Jan 2021 20:22:50 +0000 (12:22 -0800)
commitb1c0aca3d3ddeebeec57ada9c2df9ed647939249
treeb4a45020f1d5d9d17dc01a65920f0b3015c426d9
parente13ed0ac064dd6ee964155ba9fdc2f3c3785934c
net/mlx5e: ethtool, Fix restriction of autoneg with 56G

Prior to this patch, configuring speed to 50G with autoneg off over
devices supporting 50G per lane failed.
Support for 50G per lane introduced a new set of link-modes, on which
driver always performed a speed validation as if only legacy link-modes
were configured. Fix driver speed validation to force setting autoneg
over 56G only if in legacy link-mode.

Fixes: 3d7cadae51f1 ("net/mlx5e: ethtool, Fix analysis of speed setting")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Eran Ben Elisha <eranbe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c