diff options
author | Chris Mi <cmi@nvidia.com> | 2022-12-21 11:14:37 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-01-18 00:01:39 -0800 |
commit | 7c83d1f4c5adae9583e7fca1e3e830d6b061522d (patch) | |
tree | 1c4ed5288f09580e1ec5f73cb888e4656f4a5c32 /drivers/net | |
parent | e4d38c454ae57e649f09a354d5a9dae063a26ee3 (diff) | |
download | linux-stable-7c83d1f4c5adae9583e7fca1e3e830d6b061522d.tar.gz linux-stable-7c83d1f4c5adae9583e7fca1e3e830d6b061522d.tar.bz2 linux-stable-7c83d1f4c5adae9583e7fca1e3e830d6b061522d.zip |
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: f019679ea5f2 ("net/mlx5: E-switch, Remove dependency between sriov and eswitch mode")
Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index 0dfd5742c6fe..9daf55e90367 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -1464,6 +1464,7 @@ void mlx5_eswitch_disable(struct mlx5_eswitch *esw) mlx5_lag_disable_change(esw->dev); down_write(&esw->mode_lock); mlx5_eswitch_disable_locked(esw); + esw->mode = MLX5_ESWITCH_LEGACY; up_write(&esw->mode_lock); mlx5_lag_enable_change(esw->dev); } |