OSDN Git Service

net/mlx5: Only cancel recovery work when cleaning up device
authorDaniel Jurgens <danielj@mellanox.com>
Tue, 10 Jan 2017 20:33:39 +0000 (22:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2017 19:18:04 +0000 (20:18 +0100)
commitce31072b43426e3bf45bc490e93504f5746cb9b5
tree3658c5da42c3f01dc1e11d9b45d03bc0f24d81cb
parent2f946414a080e8f516d267a6722f38104699efd1
net/mlx5: Only cancel recovery work when cleaning up device

commit 5e44fca5047054f1762813751626b5245e0da022 upstream.

Do not attempt to drain the health workqueue when unloading the device in
the recovery flow, this can cause a deadlock when the recovery work
tries to cancel itself with sync.

Because the work is no longer unconditionally canceled when unloading, it
must be explicitly canceled in the AER flow.

fixes: 689a248df83b ("net/mlx5: Cancel recovery work in remove flow")
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/main.c