Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Aya Levin and committed by
Saeed Mahameed
9c9be85f abf8ef95

+4 -2
+2 -1
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
··· 3161 3161 3162 3162 mlx5_set_port_admin_status(mdev, state); 3163 3163 3164 - if (mlx5_eswitch_mode(mdev) != MLX5_ESWITCH_LEGACY) 3164 + if (mlx5_eswitch_mode(mdev) == MLX5_ESWITCH_OFFLOADS || 3165 + !MLX5_CAP_GEN(mdev, uplink_follow)) 3165 3166 return; 3166 3167 3167 3168 if (state == MLX5_PORT_UP)
+2 -1
include/linux/mlx5/mlx5_ifc.h
··· 1280 1280 u8 ece_support[0x1]; 1281 1281 u8 reserved_at_a4[0x7]; 1282 1282 u8 log_max_srq[0x5]; 1283 - u8 reserved_at_b0[0x2]; 1283 + u8 reserved_at_b0[0x1]; 1284 + u8 uplink_follow[0x1]; 1284 1285 u8 ts_cqe_to_dest_cqn[0x1]; 1285 1286 u8 reserved_at_b3[0xd]; 1286 1287