]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Set BREAK_FW_WAIT flag first when removing driver
authorShay Drory <shayd@nvidia.com>
Tue, 28 Feb 2023 08:36:19 +0000 (10:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:49 +0000 (13:33 +0100)
commit6d03e1862860059e6e0140498649a12081ccba98
tree29d99f457600b96a1414ae1ebda17ae8da689157
parent059c75613f688f30612b43fd186e2faaf3f6b906
net/mlx5: Set BREAK_FW_WAIT flag first when removing driver

[ Upstream commit 748fe761342b49b8ab5efd3541983fbb67749e5f ]

Currently, BREAK_FW_WAIT flag is set after syncing with fw_reset.
However, fw_reset can call mlx5_load_one() which is waiting for fw
init bit and BREAK_FW_WAIT flag is intended to stop. e.g.: the driver
might wait on a loop it should exit.
Fix it by setting the flag before syncing with fw_reset.

Fixes: 9bf4f291e7c3 ("net/mlx5: Add exit route when waiting for FW")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/main.c