]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net/mlx5: fw reset: Skip device ID check if PCI link up failed
authorMoshe Shemesh <moshe@nvidia.com>
Thu, 26 Jan 2023 06:58:33 +0000 (08:58 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 8 Feb 2023 00:29:54 +0000 (16:29 -0800)
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 <moshe@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c

index 1da4da564e6d8fb2ed904606a17ae1027f05d19f..63290da8401014c1a1b923e43a2149e7ca4dfce1 100644 (file)
@@ -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 {