net/mlx5: Stop waiting for PCI if pci channel is offline
authorMoshe Shemesh <moshe@nvidia.com>
Mon, 3 Jun 2024 21:04:42 +0000 (00:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2024 13:07:16 +0000 (14:07 +0100)
commit33afbfcc105a572159750f2ebee834a8a70fdd96
treebe3836e077aeaeba0d806d9f9e49fc3d50bf7269
parentc57e558194430d10d5e5f4acd8a8655b68dade13
net/mlx5: Stop waiting for PCI if pci channel is offline

In case pci channel becomes offline the driver should not wait for PCI
reads during health dump and recovery flow. The driver has timeout for
each of these loops trying to read PCI, so it would fail anyway.
However, in case of recovery waiting till timeout may cause the pci
error_detected() callback fail to meet pci_dpc_recovered() wait timeout.

Fixes: b3bd076f7501 ("net/mlx5: Report devlink health on FW fatal issues")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Shay Drori <shayd@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/fw.c
drivers/net/ethernet/mellanox/mlx5/core/health.c
drivers/net/ethernet/mellanox/mlx5/core/lib/pci_vsc.c