Skip to content

Commit dfad997

Browse files
mosheshemesh2Saeed Mahameed
authored andcommitted
net/mlx5: Use recovery timeout on sync reset flow
Use the same timeout for sync reset flow and health recovery flow, since the former involves driver's recovery from firmware reset, which is similar to health recovery. Otherwise, in some cases, such as a firmware upgrade on the DPU, the firmware pre-init bit may not be ready within current timeout and the driver will abort loading back after reset. Signed-off-by: Moshe Shemesh <[email protected]> Fixes: 37ca95e ("net/mlx5: Increase FW pre-init timeout for health recovery") Reviewed-by: Maher Sanalla <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 21608a2 commit dfad997

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static int mlx5_devlink_reload_up(struct devlink *devlink, enum devlink_reload_a
202202
break;
203203
/* On fw_activate action, also driver is reloaded and reinit performed */
204204
*actions_performed |= BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT);
205-
ret = mlx5_load_one_devl_locked(dev, false);
205+
ret = mlx5_load_one_devl_locked(dev, true);
206206
break;
207207
default:
208208
/* Unsupported action should not get to this function */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev)
167167
if (mlx5_health_wait_pci_up(dev))
168168
mlx5_core_err(dev, "reset reload flow aborted, PCI reads still not working\n");
169169
else
170-
mlx5_load_one(dev, false);
170+
mlx5_load_one(dev, true);
171171
devlink_remote_reload_actions_performed(priv_to_devlink(dev), 0,
172172
BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT) |
173173
BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE));
@@ -499,7 +499,7 @@ int mlx5_fw_reset_wait_reset_done(struct mlx5_core_dev *dev)
499499
err = fw_reset->ret;
500500
if (test_and_clear_bit(MLX5_FW_RESET_FLAGS_RELOAD_REQUIRED, &fw_reset->reset_flags)) {
501501
mlx5_unload_one_devl_locked(dev, false);
502-
mlx5_load_one_devl_locked(dev, false);
502+
mlx5_load_one_devl_locked(dev, true);
503503
}
504504
out:
505505
clear_bit(MLX5_FW_RESET_FLAGS_PENDING_COMP, &fw_reset->reset_flags);

0 commit comments

Comments
 (0)