Commit 7c83d1f4 authored by Chris Mi's avatar Chris Mi Committed by Saeed Mahameed

net/mlx5: E-switch, Fix switchdev mode after devlink reload

The cited commit removes eswitch mode none. So after devlink reload
in switchdev mode, eswitch mode is not changed. But actually eswitch
is disabled during devlink reload.

Fix it by setting eswitch mode to legacy when disabling eswitch
which is called by reload_down.

Fixes: f019679e ("net/mlx5: E-switch, Remove dependency between sriov and eswitch mode")
Signed-off-by: default avatarChris Mi <cmi@nvidia.com>
Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent e4d38c45
...@@ -1464,6 +1464,7 @@ void mlx5_eswitch_disable(struct mlx5_eswitch *esw) ...@@ -1464,6 +1464,7 @@ void mlx5_eswitch_disable(struct mlx5_eswitch *esw)
mlx5_lag_disable_change(esw->dev); mlx5_lag_disable_change(esw->dev);
down_write(&esw->mode_lock); down_write(&esw->mode_lock);
mlx5_eswitch_disable_locked(esw); mlx5_eswitch_disable_locked(esw);
esw->mode = MLX5_ESWITCH_LEGACY;
up_write(&esw->mode_lock); up_write(&esw->mode_lock);
mlx5_lag_enable_change(esw->dev); mlx5_lag_enable_change(esw->dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment