Skip to content

Commit 48bb52b

Browse files
mosheshemesh2kuba-moo
authored andcommitted
net/mlx5: Skip HotPlug check on sync reset using hot reset
Sync reset request is nacked by the driver when PCIe bridge connected to mlx5 device has HotPlug interrupt enabled. However, when using reset method of hot reset this check can be skipped as Hotplug is supported on this reset method. Signed-off-by: Moshe Shemesh <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 57502f6 commit 48bb52b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ static int mlx5_check_dev_ids(struct mlx5_core_dev *dev, u16 dev_id)
412412
return 0;
413413
}
414414

415-
static bool mlx5_is_reset_now_capable(struct mlx5_core_dev *dev)
415+
static bool mlx5_is_reset_now_capable(struct mlx5_core_dev *dev,
416+
u8 reset_method)
416417
{
417418
u16 dev_id;
418419
int err;
@@ -423,9 +424,11 @@ static bool mlx5_is_reset_now_capable(struct mlx5_core_dev *dev)
423424
}
424425

425426
#if IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE)
426-
err = mlx5_check_hotplug_interrupt(dev);
427-
if (err)
428-
return false;
427+
if (reset_method != MLX5_MFRL_REG_PCI_RESET_METHOD_HOT_RESET) {
428+
err = mlx5_check_hotplug_interrupt(dev);
429+
if (err)
430+
return false;
431+
}
429432
#endif
430433

431434
err = pci_read_config_word(dev->pdev, PCI_DEVICE_ID, &dev_id);
@@ -446,7 +449,7 @@ static void mlx5_sync_reset_request_event(struct work_struct *work)
446449
mlx5_core_warn(dev, "Failed reading MFRL, err %d\n", err);
447450

448451
if (err || test_bit(MLX5_FW_RESET_FLAGS_NACK_RESET_REQUEST, &fw_reset->reset_flags) ||
449-
!mlx5_is_reset_now_capable(dev)) {
452+
!mlx5_is_reset_now_capable(dev, fw_reset->reset_method)) {
450453
err = mlx5_fw_reset_set_reset_sync_nack(dev);
451454
mlx5_core_warn(dev, "PCI Sync FW Update Reset Nack %s",
452455
err ? "Failed" : "Sent");

0 commit comments

Comments
 (0)