Skip to content

Commit cec7dde

Browse files
committed
Merge branch 'mlx5-misc-fixes-2025-03-18'
Tariq Toukan says: ==================== mlx5 misc fixes 2025-03-18 This small patchset provides misc bug fixes to the mlx5 core driver. ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents d7a550d + 1726ad0 commit cec7dde

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,10 @@ static void mlx5_do_bond(struct mlx5_lag *ldev)
10521052
if (err) {
10531053
if (shared_fdb || roce_lag)
10541054
mlx5_lag_add_devices(ldev);
1055+
if (shared_fdb) {
1056+
mlx5_ldev_for_each(i, 0, ldev)
1057+
mlx5_eswitch_reload_ib_reps(ldev->pf[i].dev->priv.eswitch);
1058+
}
10551059

10561060
return;
10571061
} else if (roce_lag) {

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,24 +1205,24 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou
12051205
dev->caps.embedded_cpu = mlx5_read_embedded_cpu(dev);
12061206
mlx5_cmd_set_state(dev, MLX5_CMDIF_STATE_UP);
12071207

1208-
mlx5_start_health_poll(dev);
1209-
12101208
err = mlx5_core_enable_hca(dev, 0);
12111209
if (err) {
12121210
mlx5_core_err(dev, "enable hca failed\n");
1213-
goto stop_health_poll;
1211+
goto err_cmd_cleanup;
12141212
}
12151213

1214+
mlx5_start_health_poll(dev);
1215+
12161216
err = mlx5_core_set_issi(dev);
12171217
if (err) {
12181218
mlx5_core_err(dev, "failed to set issi\n");
1219-
goto err_disable_hca;
1219+
goto stop_health_poll;
12201220
}
12211221

12221222
err = mlx5_satisfy_startup_pages(dev, 1);
12231223
if (err) {
12241224
mlx5_core_err(dev, "failed to allocate boot pages\n");
1225-
goto err_disable_hca;
1225+
goto stop_health_poll;
12261226
}
12271227

12281228
err = mlx5_tout_query_dtor(dev);
@@ -1235,10 +1235,9 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou
12351235

12361236
reclaim_boot_pages:
12371237
mlx5_reclaim_startup_pages(dev);
1238-
err_disable_hca:
1239-
mlx5_core_disable_hca(dev, 0);
12401238
stop_health_poll:
12411239
mlx5_stop_health_poll(dev, boot);
1240+
mlx5_core_disable_hca(dev, 0);
12421241
err_cmd_cleanup:
12431242
mlx5_cmd_set_state(dev, MLX5_CMDIF_STATE_DOWN);
12441243
mlx5_cmd_disable(dev);
@@ -1249,8 +1248,8 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou
12491248
static void mlx5_function_disable(struct mlx5_core_dev *dev, bool boot)
12501249
{
12511250
mlx5_reclaim_startup_pages(dev);
1252-
mlx5_core_disable_hca(dev, 0);
12531251
mlx5_stop_health_poll(dev, boot);
1252+
mlx5_core_disable_hca(dev, 0);
12541253
mlx5_cmd_set_state(dev, MLX5_CMDIF_STATE_DOWN);
12551254
mlx5_cmd_disable(dev);
12561255
}

0 commit comments

Comments
 (0)