Skip to content

Commit

Permalink
net/mlx5: Fix driver load error flow when firmware is stuck
Browse files Browse the repository at this point in the history
When wait for firmware init fails, previous code would mistakenly
return success and cause inconsistency in the driver state.

Fixes: 6c780a0 ("net/mlx5: Wait for FW readiness before initializing command interface")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Gal Pressman authored and Saeed Mahameed committed Jun 27, 2017
1 parent d747a7a commit 8ce59b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,
if (err) {
dev_err(&dev->pdev->dev, "Firmware over %d MS in pre-initializing state, aborting\n",
FW_PRE_INIT_TIMEOUT_MILI);
goto out;
goto out_err;
}

err = mlx5_cmd_init(dev);
Expand Down

0 comments on commit 8ce59b1

Please sign in to comment.