net/mlx5e: Handle RQ flush in error cases
authorDaniel Jurgens <danielj@mellanox.com>
Thu, 30 Jun 2016 14:34:46 +0000 (17:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 10:12:03 +0000 (06:12 -0400)
commit6cd392a082deca8accec5c50b5b3fc1a9de5bfa2
tree06390c4ff68436beae484e944cba73b6b3ff9894
parent3947ca1859999ac00698c0da0d233813a93d288a
net/mlx5e: Handle RQ flush in error cases

Add a timeout to avoid an infinite loop waiting for RQ's to flush. This
occurs during AER/EEH and will also happen if the device stops posting
completions due to internal error or reset, or if moving the RQ to the
error state fails. Also cleanup posted receive resources when closing
the RQ.

Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
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/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c