aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
diff options
context:
space:
mode:
authorGravatar Roi Dayan <roid@nvidia.com> 2023-04-02 14:13:25 +0300
committerGravatar Saeed Mahameed <saeedm@nvidia.com> 2023-05-19 10:50:29 -0700
commitc97c9fe48ae3ccca75fb6001a3bd2bfcb094dbd7 (patch)
tree19bb7d7319b57e495afbba7342ef952f701246e1 /drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
parentnet/mlx5e: Remove redundant __func__ arg from fs_err() calls (diff)
downloadlinux-c97c9fe48ae3ccca75fb6001a3bd2bfcb094dbd7.tar.gz
linux-c97c9fe48ae3ccca75fb6001a3bd2bfcb094dbd7.tar.bz2
linux-c97c9fe48ae3ccca75fb6001a3bd2bfcb094dbd7.zip
net/mlx5e: E-Switch, Update when to set other vport context
Other vport context should be set if vport number is not 0. In case of ECPF, vport 0 represents the host PF representor so also need to set other vport context. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index 901c53751b0a..bf97a593d1d4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -113,7 +113,8 @@ static int arm_vport_context_events_cmd(struct mlx5_core_dev *dev, u16 vport,
opcode, MLX5_CMD_OP_MODIFY_NIC_VPORT_CONTEXT);
MLX5_SET(modify_nic_vport_context_in, in, field_select.change_event, 1);
MLX5_SET(modify_nic_vport_context_in, in, vport_number, vport);
- MLX5_SET(modify_nic_vport_context_in, in, other_vport, 1);
+ if (vport || mlx5_core_is_ecpf(dev))
+ MLX5_SET(modify_nic_vport_context_in, in, other_vport, 1);
nic_vport_ctx = MLX5_ADDR_OF(modify_nic_vport_context_in,
in, nic_vport_context);