i40iw: Fix QP flush to not hang on empty queues or failure
authorShiraz Saleem <shiraz.saleem@intel.com>
Tue, 6 Dec 2016 21:49:31 +0000 (15:49 -0600)
committerDoug Ledford <dledford@redhat.com>
Mon, 12 Dec 2016 22:20:27 +0000 (17:20 -0500)
commit1cda28bb5b503bab734072d97a41b2e7eda6b6b9
treeea0369d13cead018e0dd94d0b9bbd7bf30a58513
parentf4a87ca12a1c203913a5cc889ec49b817a1f45fc
i40iw: Fix QP flush to not hang on empty queues or failure

When flush QP and there are no pending work requests, signal completion
to unblock i40iw_drain_sq and i40iw_drain_rq which are waiting on
completion for iwqp->sq_drained and iwqp->sq_drained respectively.
Also, signal completion if flush QP fails to prevent the drain SQ or RQ
from being blocked indefintely.

Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw.h
drivers/infiniband/hw/i40iw/i40iw_hw.c