summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAya Levin <ayal@nvidia.com>2020-11-24 22:16:23 +0200
committerSaeed Mahameed <saeedm@nvidia.com>2021-01-07 12:22:48 -0800
commit9c9be85f6b59d80efe4705109c0396df18d4e11d (patch)
tree5f066c5a33a8944c30688f8be2543b999a47b72e /drivers
parentabf8ef953a43e74aac3c54a94975f21bd483199b (diff)
downloadlinux-9c9be85f6b59d80efe4705109c0396df18d4e11d.tar.bz2
net/mlx5e: Add missing capability check for uplink follow
Expose firmware indication that it supports setting eswitch uplink state to follow (follow the physical link). Condition setting the eswitch uplink admin-state with this capability bit. Older FW may not support the uplink state setting. Fixes: 7d0314b11cdd ("net/mlx5e: Modify uplink state on interface up/down") Signed-off-by: Aya Levin <ayal@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 7a79d330c075..6a852b4901aa 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3161,7 +3161,8 @@ static void mlx5e_modify_admin_state(struct mlx5_core_dev *mdev,
mlx5_set_port_admin_status(mdev, state);
- if (mlx5_eswitch_mode(mdev) != MLX5_ESWITCH_LEGACY)
+ if (mlx5_eswitch_mode(mdev) == MLX5_ESWITCH_OFFLOADS ||
+ !MLX5_CAP_GEN(mdev, uplink_follow))
return;
if (state == MLX5_PORT_UP)