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 05:00:06 +0000 (07:00 +0200)
commitfa8b93e1dcc5c8354bc146892e44d3240faa2f9e
tree1d63ad263a21bb493e8d2d66f14f5fbdd4d44efa
parent0a3eafac6c118a4d88d95f4d54d16ec322b930f9
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