aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5
diff options
context:
space:
mode:
authorBodong Wang <bodong@mellanox.com>2019-02-17 21:04:42 -0600
committerSaeed Mahameed <saeedm@mellanox.com>2019-02-19 14:15:04 -0800
commit1c50d369f560809d45e75fa9d7d6b3901192c18b (patch)
tree4b0f6d7a701cdaba2b719d1610d1ee5dc1722597 /drivers/net/ethernet/mellanox/mlx5
parentnet/mlx5: E-Switch, Fix the warning on vport index out of range (diff)
downloadlinux-dev-1c50d369f560809d45e75fa9d7d6b3901192c18b.tar.xz
linux-dev-1c50d369f560809d45e75fa9d7d6b3901192c18b.zip
net/mlx5: E-Switch, Disable esw manager vport correctly
When disabling vport, relevant vport configurations will be cleaned up. These cleanups should be done to the vports which had these configs applied at vport enablement. As esw manager vport didn't have such vport config applied, cleanup should not touch it. Fixes: de9e6a8136c5 ("net/mlx5: E-Switch, Properly refer to host PF vport as other vport") Signed-off-by: Bodong Wang <bodong@mellanox.com> Reported-by: Eli Britstein <elibr@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5')
-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 d4f6859bf58c..6cb9710f76d5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -1606,7 +1606,8 @@ static void esw_disable_vport(struct mlx5_eswitch *esw,
esw_vport_change_handle_locked(vport);
vport->enabled_events = 0;
esw_vport_disable_qos(esw, vport_num);
- if (esw->mode == SRIOV_LEGACY) {
+ if (esw->manager_vport != vport_num &&
+ esw->mode == SRIOV_LEGACY) {
mlx5_modify_vport_admin_state(esw->dev,
MLX5_VPORT_STATE_OP_MOD_ESW_VPORT,
vport_num, 1,