]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix sync reset event handler error flow
authorMoshe Shemesh <moshe@nvidia.com>
Sat, 29 Oct 2022 06:03:48 +0000 (09:03 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 22 Nov 2022 02:14:34 +0000 (18:14 -0800)
commit76e5f2beb5e1486ff6dce23be144ff0cd70ceede
tree33a75ea0f51d33c2334d806591c9863899ff071e
parent1501752b9ff881b6dc61050047ca1ad858118c27
net/mlx5: Fix sync reset event handler error flow

When sync reset now event handling fails on mlx5_pci_link_toggle() then
no reset was done. However, since mlx5_cmd_fast_teardown_hca() was
already done, the firmware function is closed and the driver is left
without firmware functionality.

Fix it by setting device error state and reopen the firmware resources.
Reopening is done by the thread that was called for devlink reload
fw_activate as it already holds the devlink lock.

Fixes: 58c6894aa3af ("net/mlx5: Add support for devlink reload action fw activate")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c