Skip to content

Commit 5f9b2bf

Browse files
PatrisiousHaddadkuba-moo
authored andcommitted
net/mlx5: E-Switch, Fix switching to switchdev mode with IB device disabled
In case that IB device is already disabled when moving to switchdev mode, which can happen when working with LAG, need to do rescan_drivers() before leaving in order to add ethernet representor auxiliary device. Fixes: ab85ebf ("net/mlx5: E-switch, refactor eswitch mode change") Signed-off-by: Patrisious Haddad <[email protected]> Reviewed-by: Mark Bloch <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 10e0f0c commit 5f9b2bf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2338,6 +2338,7 @@ static void esw_mode_change(struct mlx5_eswitch *esw, u16 mode)
23382338

23392339
if (esw->dev->priv.flags & MLX5_PRIV_FLAGS_DISABLE_IB_ADEV) {
23402340
esw->mode = mode;
2341+
mlx5_rescan_drivers_locked(esw->dev);
23412342
mlx5_devcom_comp_unlock(esw->dev->priv.hca_devcom_comp);
23422343
return;
23432344
}

0 commit comments

Comments
 (0)