]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.117/net-mlx5-e-switch-fix-esw-manager-vport-indication-f.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 4.14.117 / net-mlx5-e-switch-fix-esw-manager-vport-indication-f.patch
CommitLineData
b28724f3
SL
1From f882b8519f47128ccdabe58a0e558742d7be51da Mon Sep 17 00:00:00 2001
2From: Omri Kahalon <omrik@mellanox.com>
3Date: Sun, 24 Feb 2019 16:31:08 +0200
4Subject: net/mlx5: E-Switch, Fix esw manager vport indication for more vport
5 commands
6
7[ Upstream commit eca4a928585ac08147e5cc8e2111ecbc6279ee31 ]
8
9Traditionally, the PF (Physical Function) which resides on vport 0 was
10the E-switch manager. Since the ECPF (Embedded CPU Physical Function),
11which resides on vport 0xfffe, was introduced as the E-Switch manager,
12the assumption that the E-switch manager is on vport 0 is incorrect.
13
14Since the eswitch code already uses the actual vport value, all we
15need is to always set other_vport=1.
16
17Signed-off-by: Omri Kahalon <omrik@mellanox.com>
18Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
19Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
20Signed-off-by: Sasha Levin <sashal@kernel.org>
21---
22 drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 6 ++----
23 1 file changed, 2 insertions(+), 4 deletions(-)
24
25diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
26index d2914116af8e..090d54275a7d 100644
27--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
28+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
29@@ -79,8 +79,7 @@ static int arm_vport_context_events_cmd(struct mlx5_core_dev *dev, u16 vport,
30 opcode, MLX5_CMD_OP_MODIFY_NIC_VPORT_CONTEXT);
31 MLX5_SET(modify_nic_vport_context_in, in, field_select.change_event, 1);
32 MLX5_SET(modify_nic_vport_context_in, in, vport_number, vport);
33- if (vport)
34- MLX5_SET(modify_nic_vport_context_in, in, other_vport, 1);
35+ MLX5_SET(modify_nic_vport_context_in, in, other_vport, 1);
36 nic_vport_ctx = MLX5_ADDR_OF(modify_nic_vport_context_in,
37 in, nic_vport_context);
38
39@@ -108,8 +107,7 @@ static int modify_esw_vport_context_cmd(struct mlx5_core_dev *dev, u16 vport,
40 MLX5_SET(modify_esw_vport_context_in, in, opcode,
41 MLX5_CMD_OP_MODIFY_ESW_VPORT_CONTEXT);
42 MLX5_SET(modify_esw_vport_context_in, in, vport_number, vport);
43- if (vport)
44- MLX5_SET(modify_esw_vport_context_in, in, other_vport, 1);
45+ MLX5_SET(modify_esw_vport_context_in, in, other_vport, 1);
46 return mlx5_cmd_exec(dev, in, inlen, out, sizeof(out));
47 }
48
49--
502.20.1
51