]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix health error state handling
authorShay Drory <shayd@nvidia.com>
Mon, 23 Nov 2020 06:39:10 +0000 (08:39 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 12 Feb 2021 02:50:11 +0000 (18:50 -0800)
commit35c91b3276e223d57df023787a9c46c832e479f2
tree27c1a8285e29e88d74b84c98475b1bfb1f4518f2
parentb8b8f98541e51e91a28230d93e84da17349a0c9c
net/mlx5: Fix health error state handling

Currently, when we discover a fatal error, we are queueing a work that
will wait for a lock in order to enter the device to error state.
Meanwhile, FW commands are still being processed, and gets timeouts.
This can block the driver for few minutes before the work will manage
to get the lock and enter to error state.

Setting the device to error state before queueing health work, in order
to avoid FW commands being processed while the work is waiting for the
lock.

Fixes: 724ffa656f28 ("net/mlx5: Avoid calling sleeping function by the health poll thread")
Signed-off-by: Shay Drory <shayd@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