mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
net/mlx5: Skip HotPlug check on sync reset using hot reset
[ Upstream commit 48bb52b0bc6693afb17a6024bab925b25fec44a1 ] 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 <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20240911201757.1505453-12-saeed@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 367e501f8b09 ("net/mlx5: Serialize firmware reset with devlink") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
de0560f2c3
commit
873cb8bb91
@@ -396,7 +396,8 @@ static int mlx5_check_dev_ids(struct mlx5_core_dev *dev, u16 dev_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool mlx5_is_reset_now_capable(struct mlx5_core_dev *dev)
|
||||
static bool mlx5_is_reset_now_capable(struct mlx5_core_dev *dev,
|
||||
u8 reset_method)
|
||||
{
|
||||
u16 dev_id;
|
||||
int err;
|
||||
@@ -412,9 +413,11 @@ static bool mlx5_is_reset_now_capable(struct mlx5_core_dev *dev)
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE)
|
||||
err = mlx5_check_hotplug_interrupt(dev);
|
||||
if (err)
|
||||
return false;
|
||||
if (reset_method != MLX5_MFRL_REG_PCI_RESET_METHOD_HOT_RESET) {
|
||||
err = mlx5_check_hotplug_interrupt(dev);
|
||||
if (err)
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
err = pci_read_config_word(dev->pdev, PCI_DEVICE_ID, &dev_id);
|
||||
@@ -435,7 +438,7 @@ static void mlx5_sync_reset_request_event(struct work_struct *work)
|
||||
mlx5_core_warn(dev, "Failed reading MFRL, err %d\n", err);
|
||||
|
||||
if (err || test_bit(MLX5_FW_RESET_FLAGS_NACK_RESET_REQUEST, &fw_reset->reset_flags) ||
|
||||
!mlx5_is_reset_now_capable(dev)) {
|
||||
!mlx5_is_reset_now_capable(dev, fw_reset->reset_method)) {
|
||||
err = mlx5_fw_reset_set_reset_sync_nack(dev);
|
||||
mlx5_core_warn(dev, "PCI Sync FW Update Reset Nack %s",
|
||||
err ? "Failed" : "Sent");
|
||||
|
||||
Reference in New Issue
Block a user