iw_cxgb4: only clear the ARMED bit if a notification is needed
authorSteve Wise <swise@opengridcomputing.com>
Thu, 30 Nov 2017 17:41:56 +0000 (09:41 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:45:19 +0000 (09:45 +0100)
commit5042bde3ccbbd2326ac349a01109c8e56fc7bc4b
tree77217bdb7c18eadf61908b97430f4978121b2e49
parentf73c380ab3fea85e4fbc66f5cc6f9e6551b89f24
iw_cxgb4: only clear the ARMED bit if a notification is needed

commit 335ebf6fa35ca1c59b73f76fad19b249d3550e86 upstream.

In __flush_qp(), the CQ ARMED bit was being cleared regardless of
whether any notification is actually needed.  This resulted in the iser
termination logic getting stuck in ib_drain_sq() because the CQ was not
marked ARMED and thus the drain CQE notification wasn't triggered.

This new bug was exposed when this commit was merged:

commit cbb40fadd31c ("iw_cxgb4: only call the cq comp_handler when the
cq is armed")

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/cxgb4/qp.c