Skip to content

Commit 7c83d1f

Browse files
Chris MiSaeed Mahameed
authored andcommitted
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: f019679 ("net/mlx5: E-switch, Remove dependency between sriov and eswitch mode") Signed-off-by: Chris Mi <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent e4d38c4 commit 7c83d1f

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,7 @@ void mlx5_eswitch_disable(struct mlx5_eswitch *esw)
14641464
mlx5_lag_disable_change(esw->dev);
14651465
down_write(&esw->mode_lock);
14661466
mlx5_eswitch_disable_locked(esw);
1467+
esw->mode = MLX5_ESWITCH_LEGACY;
14671468
up_write(&esw->mode_lock);
14681469
mlx5_lag_enable_change(esw->dev);
14691470
}

0 commit comments

Comments
 (0)