]>
Commit | Line | Data |
---|---|---|
b28724f3 SL |
1 | From f882b8519f47128ccdabe58a0e558742d7be51da Mon Sep 17 00:00:00 2001 |
2 | From: Omri Kahalon <omrik@mellanox.com> | |
3 | Date: Sun, 24 Feb 2019 16:31:08 +0200 | |
4 | Subject: net/mlx5: E-Switch, Fix esw manager vport indication for more vport | |
5 | commands | |
6 | ||
7 | [ Upstream commit eca4a928585ac08147e5cc8e2111ecbc6279ee31 ] | |
8 | ||
9 | Traditionally, the PF (Physical Function) which resides on vport 0 was | |
10 | the E-switch manager. Since the ECPF (Embedded CPU Physical Function), | |
11 | which resides on vport 0xfffe, was introduced as the E-Switch manager, | |
12 | the assumption that the E-switch manager is on vport 0 is incorrect. | |
13 | ||
14 | Since the eswitch code already uses the actual vport value, all we | |
15 | need is to always set other_vport=1. | |
16 | ||
17 | Signed-off-by: Omri Kahalon <omrik@mellanox.com> | |
18 | Reviewed-by: Max Gurtovoy <maxg@mellanox.com> | |
19 | Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> | |
20 | Signed-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 | ||
25 | diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | |
26 | index 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 | -- | |
50 | 2.20.1 | |
51 |