[SRU][G][PATCH 1/1] net/mlx5e: Add missing capability check for uplink follow

Krzysztof Kozlowski krzysztof.kozlowski at canonical.com
Fri Mar 26 16:27:50 UTC 2021


On 26/03/2021 17:21, frank.heimes at canonical.com wrote:
> From: Alexander Schmidt <alexschm at de.ibm.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1921104
> 
> 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 at nvidia.com>
> Reviewed-by: Moshe Shemesh <moshe at nvidia.com>
> Signed-off-by: Saeed Mahameed <saeedm at nvidia.com>
> Reported-and-Tested-by: Alexander Schmidt <alexschm at de.ibm.com>

Alexander's signed-off-by is missing here. Since his the author (From),
his SoB is expected to be the first.

> (backported from commit 9c9be85f6b59d80efe4705109c0396df18d4e11d)
> Signed-off-by: Frank Heimes <frank.heimes at canonical.com>
> 
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++-
>  include/linux/mlx5/mlx5_ifc.h                     | 4 +++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 6da50845f614..8076051d2b95 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -3160,7 +3160,8 @@ static void mlx5e_modify_admin_state(struct mlx5_core_dev *mdev,
>  
>  	mlx5_set_port_admin_status(mdev, state);
>  
> -	if (!MLX5_ESWITCH_MANAGER(mdev) ||  mlx5_eswitch_mode(esw) == MLX5_ESWITCH_OFFLOADS)
> +	if (!MLX5_ESWITCH_MANAGER(mdev) || mlx5_eswitch_mode(esw) == MLX5_ESWITCH_OFFLOADS ||
> +			!MLX5_CAP_GEN(mdev, uplink_follow))

A nit: changed indentation.


Best regards,
Krzysztof



More information about the kernel-team mailing list