Commit 51e669ec authored by Gal Pressman's avatar Gal Pressman Committed by Marcelo Henrique Cerri

net/mlx5: Fix driver load error flow when firmware is stuck

BugLink: https://bugs.launchpad.net/bugs/1881356

[ Upstream commit 8ce59b16 ]

When wait for firmware init fails, previous code would mistakenly
return success and cause inconsistency in the driver state.

Fixes: 6c780a02 ("net/mlx5: Wait for FW readiness before initializing command interface")
Signed-off-by: default avatarGal Pressman <galp@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent f3bb7038
...@@ -936,7 +936,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv) ...@@ -936,7 +936,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv)
if (err) { if (err) {
dev_err(&dev->pdev->dev, "Firmware over %d MS in pre-initializing state, aborting\n", dev_err(&dev->pdev->dev, "Firmware over %d MS in pre-initializing state, aborting\n",
FW_PRE_INIT_TIMEOUT_MILI); FW_PRE_INIT_TIMEOUT_MILI);
goto out; goto out_err;
} }
err = mlx5_cmd_init(dev); err = mlx5_cmd_init(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment