net/mlx5: Cancel delayed recovery work when unloading the driver
authorMohamad Haj Yahia <mohamad@mellanox.com>
Thu, 30 Mar 2017 14:09:00 +0000 (17:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jul 2017 04:59:04 +0000 (06:59 +0200)
commit8c66a467ee2d9a94a84ef4ddc4a446a459ce25d0
tree456d68e70dd0f5bc719b72d61c25f9f585be3a63
parent053ef953f8a9975d6895e90f27a61150d0f0cca8
net/mlx5: Cancel delayed recovery work when unloading the driver

[ Upstream commit 2a0165a034ac024b60cca49c61e46f4afa2e4d98 ]

Draining the health workqueue will ignore future health works including
the one that report hardware failure and thus we can't enter error state
Instead cancel the recovery flow and make sure only recovery flow won't
be scheduled.

Fixes: 5e44fca50470 ('net/mlx5: Only cancel recovery work when cleaning up device')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/health.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h