From patchwork Wed Mar 31 17:57:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 89995 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2VHwEm0030375 for ; Wed, 31 Mar 2010 17:58:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757949Ab0CaR5z (ORCPT ); Wed, 31 Mar 2010 13:57:55 -0400 Received: from vpn.pathscale.com ([198.186.3.75]:39713 "HELO mx.mv.qlogic.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with SMTP id S1757998Ab0CaR5x (ORCPT ); Wed, 31 Mar 2010 13:57:53 -0400 Received: from chromite.mv.qlogic.com (chromite.mv.qlogic.com [10.29.2.82]) by mx.mv.qlogic.com (Postfix) with ESMTP id DFB81143007F; Wed, 31 Mar 2010 10:57:52 -0700 (PDT) Received: from chromite.mv.qlogic.com (localhost.localdomain [127.0.0.1]) by chromite.mv.qlogic.com (Postfix) with ESMTP id DE7B7142997; Wed, 31 Mar 2010 10:57:52 -0700 (PDT) From: Ralph Campbell Subject: [PATCH 2/3] IB/srp: use IB_CQ_REPORT_MISSED_EVENTS to avoid missed CQ callbacks To: Roland Dreier Cc: linux-rdma@vger.kernel.org Date: Wed, 31 Mar 2010 10:57:52 -0700 Message-ID: <20100331175752.24522.66519.stgit@chromite.mv.qlogic.com> In-Reply-To: <20100331175742.24522.17850.stgit@chromite.mv.qlogic.com> References: <20100331175742.24522.17850.stgit@chromite.mv.qlogic.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 31 Mar 2010 17:58:32 +0000 (UTC) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index ed3f9eb..b0376f1 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -921,8 +921,9 @@ static void srp_recv_completion(struct ib_cq *cq, void *target_ptr) { struct srp_target_port *target = target_ptr; struct ib_wc wc; + int ret; - ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); +again: while (ib_poll_cq(cq, 1, &wc) > 0) { if (wc.status) { shost_printk(KERN_ERR, target->scsi_host, @@ -934,6 +935,10 @@ static void srp_recv_completion(struct ib_cq *cq, void *target_ptr) srp_handle_recv(target, &wc); } + ret = ib_req_notify_cq(cq, IB_CQ_NEXT_COMP | + IB_CQ_REPORT_MISSED_EVENTS); + if (ret > 0) + goto again; } static void srp_send_completion(struct ib_cq *cq, void *target_ptr)