From: Roi Dayan Date: Sun, 2 Apr 2023 11:19:54 +0000 (+0300) Subject: net/mlx5e: E-Switch, Allow get vport api if esw exists X-Git-Tag: v6.6.17~4555^2~239^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99db5669f6635a9719beb2e78ebf5887cde03a26;p=platform%2Fkernel%2Flinux-rpi.git net/mlx5e: E-Switch, Allow get vport api if esw exists We could have an esw manager device which is not a vport group manager. Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index bf97a59..692cea3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -92,7 +92,7 @@ mlx5_eswitch_get_vport(struct mlx5_eswitch *esw, u16 vport_num) { struct mlx5_vport *vport; - if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager)) + if (!esw) return ERR_PTR(-EPERM); vport = xa_load(&esw->vports, vport_num);