From patchwork Tue Jul 27 08:21:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 114471 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6R8JImL014421 for ; Tue, 27 Jul 2010 08:21:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755815Ab0G0IVS (ORCPT ); Tue, 27 Jul 2010 04:21:18 -0400 Received: from fwil.voltaire.com ([193.47.165.2]:59771 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753754Ab0G0IVR (ORCPT ); Tue, 27 Jul 2010 04:21:17 -0400 Received: from zuben.voltaire.com ([172.25.5.179]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 27 Jul 2010 11:21:14 +0300 Message-ID: <4C4E96F9.4040503@Voltaire.com> Date: Tue, 27 Jul 2010 11:21:13 +0300 From: Or Gerlitz User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: Roland Dreier CC: linux-rdma , Jack Morgenstein , Eli Cohen Subject: [PATCH] ib/mlx4: add IB_CQ_REPORT_MISSED_EVENTS support X-OriginalArrivalTime: 27 Jul 2010 08:21:14.0437 (UTC) FILETIME=[ADB32750:01CB2D64] 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]); Tue, 27 Jul 2010 08:21:53 +0000 (UTC) diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index 5a219a2..4366811 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c @@ -755,6 +755,13 @@ int mlx4_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) to_mdev(ibcq->device)->uar_map, MLX4_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->uar_lock)); + if (flags & IB_CQ_REPORT_MISSED_EVENTS) { + struct mlx4_cqe *cqe; + cqe = next_cqe_sw(to_mcq(ibcq)); + if (cqe) + return 1; + } + return 0; }