net/mlx5e: Enable lanes configuration when auto-negotiation is off
authorShahar Shitrit <shshitrit@nvidia.com>
Tue, 4 Mar 2025 16:06:17 +0000 (18:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Mar 2025 01:53:34 +0000 (17:53 -0800)
commit7e959797f0218f8b8a5e38068a55661610eb935e
treec081721e66a41ef69e99ddeda616cc57938aa59b
parent65a5d3557184974608761b6abae0701f7e63a6de
net/mlx5e: Enable lanes configuration when auto-negotiation is off

Currently, when auto-negotiation is disabled, the driver retrieves
the speed and converts it into all link modes that correspond to
that speed. With this patch, we add the ability to set the number
of lanes, so that the combination of speed and lanes corresponds to
exactly one specific link mode for the extended bit map.

For the legacy bit map the driver sets all link modes correspond to
speed and lanes.

This change provides users with the option to set a specific link
mode, rather than enabling all link modes associated with a given
speed when auto-negotiation is off.

Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250304160620.417580-4-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/port.c