]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5: fw_reset: Don't try to load device in case PCI isn't working
authorShay Drory <shayd@nvidia.com>
Thu, 3 Nov 2022 06:55:40 +0000 (23:55 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 9 Nov 2022 18:30:43 +0000 (10:30 -0800)
In case PCI reads fail after unload, there is no use in trying to
load the device.

Fixes: 5ec697446f46 ("net/mlx5: Add support for devlink reload action fw activate")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c

index 07c583996c2975b2ba1aaee7be21d13a6d060f55..9d908a0ccfef1c341b161bb5d12e104ab1daa61c 100644 (file)
@@ -152,7 +152,8 @@ static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev)
                mlx5_unload_one(dev);
                if (mlx5_health_wait_pci_up(dev))
                        mlx5_core_err(dev, "reset reload flow aborted, PCI reads still not working\n");
-               mlx5_load_one(dev, false);
+               else
+                       mlx5_load_one(dev, false);
                devlink_remote_reload_actions_performed(priv_to_devlink(dev), 0,
                                                        BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT) |
                                                        BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE));