]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/cxgb4: Only call CQ completion handler if it is armed
authorSteve Wise <swise@opengridcomputing.com>
Thu, 31 Jul 2014 19:35:43 +0000 (14:35 -0500)
committerRoland Dreier <roland@purestorage.com>
Fri, 1 Aug 2014 21:54:37 +0000 (14:54 -0700)
commit232f5db29e25a0c37cf51bf1be2a540e3f166731
treea08991d5dcca6940c7b18cc4a600277fc4e60a13
parent222815a13396f7627c2d7fba1177924dc5698256
RDMA/cxgb4: Only call CQ completion handler if it is armed

The function __flush_qp() always calls the ULP's CQ completion handler
functions even if the CQ was not armed.  This can crash the system if
the function pointer is NULL. The iSER ULP behaves this way: no
completion handler and never arm the CQ for notification.  So now we
track whether the CQ is armed at flush time and only call the
completion handlers if their CQs were armed.

Also, if the RCQ and SCQ are the same CQ, the completion handler is
getting called twice.  It should only be called once after all SQ and
RQ WRs are flushed from the QP.  So rearrange the logic to fix this.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/ev.c
drivers/infiniband/hw/cxgb4/qp.c
drivers/infiniband/hw/cxgb4/t4.h