net/mlx5: Unload device upon firmware fatal error
authorAya Levin <ayal@nvidia.com>
Wed, 16 Jun 2021 16:11:03 +0000 (19:11 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 27 Jul 2021 23:10:05 +0000 (16:10 -0700)
commit7f331bf0f060c2727e36d64f9b098b4ee5f3dfad
tree3aa789725a5c46de8873e4d78bb637067d01b78c
parent678b1ae1af4aef488fcc42baa663e737b9a531ba
net/mlx5: Unload device upon firmware fatal error

When fw_fatal reporter reports an error, the firmware in not responding.
Unload the device to ensure that the driver closes all its resources,
even if recovery is not due (user disabled auto-recovery or reporter is
in grace period). On successful recovery the device is loaded back up.

Fixes: b3bd076f7501 ("net/mlx5: Report devlink health on FW fatal issues")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/health.c