iw_cxgb4: Atomically flush per QP HW CQEs
authorBharat Potnuri <bharat@chelsio.com>
Fri, 27 Apr 2018 11:11:16 +0000 (16:41 +0530)
committerDoug Ledford <dledford@redhat.com>
Fri, 27 Apr 2018 18:38:44 +0000 (14:38 -0400)
commit2df19e19ae90d94fd8724083f161f368a2797537
treeb2f6622d07fb37ddb5501cddd377aeacdab72c6f
parent54e7e48b13c85d9a730b989fe7dc5250199a4f81
iw_cxgb4: Atomically flush per QP HW CQEs

When a CQ is shared by multiple QPs, c4iw_flush_hw_cq() needs to acquire
corresponding QP lock before moving the CQEs into its corresponding SW
queue and accessing the SQ contents for completing a WR.
Ignore CQEs if corresponding QP is already flushed.

Cc: stable@vger.kernel.org
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/cq.c
drivers/infiniband/hw/cxgb4/iw_cxgb4.h
drivers/infiniband/hw/cxgb4/qp.c