Commit 9c9be85f authored by Aya Levin's avatar Aya Levin Committed by Saeed Mahameed

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: 7d0314b1 ("net/mlx5e: Modify uplink state on interface up/down")
Signed-off-by: default avatarAya Levin <ayal@nvidia.com>
Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent abf8ef95
...@@ -3161,7 +3161,8 @@ static void mlx5e_modify_admin_state(struct mlx5_core_dev *mdev, ...@@ -3161,7 +3161,8 @@ static void mlx5e_modify_admin_state(struct mlx5_core_dev *mdev,
mlx5_set_port_admin_status(mdev, state); 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; return;
if (state == MLX5_PORT_UP) if (state == MLX5_PORT_UP)
......
...@@ -1280,7 +1280,8 @@ struct mlx5_ifc_cmd_hca_cap_bits { ...@@ -1280,7 +1280,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 ece_support[0x1]; u8 ece_support[0x1];
u8 reserved_at_a4[0x7]; u8 reserved_at_a4[0x7];
u8 log_max_srq[0x5]; u8 log_max_srq[0x5];
u8 reserved_at_b0[0x2]; u8 reserved_at_b0[0x1];
u8 uplink_follow[0x1];
u8 ts_cqe_to_dest_cqn[0x1]; u8 ts_cqe_to_dest_cqn[0x1];
u8 reserved_at_b3[0xd]; u8 reserved_at_b3[0xd];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment