From: Moshe Shemesh Date: Thu, 26 Jan 2023 06:58:33 +0000 (+0200) Subject: net/mlx5: fw reset: Skip device ID check if PCI link up failed X-Git-Tag: v6.3-rc1~162^2~112^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=114b295470e7c4dda3f2a7bec0ac9b35e0b94d06;p=thirdparty%2Fkernel%2Flinux.git net/mlx5: fw reset: Skip device ID check if PCI link up failed In case where after reset the PCI link is not ready within timeout, skip reading device ID as if there is no PCI link up we can't have FW response to pci config cycles either. This also fixes err value not used and overwritten in such flow. Signed-off-by: Moshe Shemesh Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c b/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c index 1da4da564e6d8..63290da840101 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c @@ -371,6 +371,7 @@ static int mlx5_pci_link_toggle(struct mlx5_core_dev *dev) mlx5_core_err(dev, "PCI link not ready (0x%04x) after %llu ms\n", reg16, mlx5_tout_ms(dev, PCI_TOGGLE)); err = -ETIMEDOUT; + goto restore; } do {