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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jan 2017 02:34:01 +0000 (21:34 -0500)
commit5e44fca5047054f1762813751626b5245e0da022
tree4f4a80ffb789cf974cfc3e0457aeee5eac7a2622
parent0bbcc0a8fc394d01988fe0263ccf7fddb77a12c3
net/mlx5: Only cancel recovery work when cleaning up device

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>
drivers/net/ethernet/mellanox/mlx5/core/main.c