From patchwork Thu Feb 4 11:25:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 76966 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 o14BNg8E026149 for ; Thu, 4 Feb 2010 11:24:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756407Ab0BDLYy (ORCPT ); Thu, 4 Feb 2010 06:24:54 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:32846 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756345Ab0BDLYy (ORCPT ); Thu, 4 Feb 2010 06:24:54 -0500 Received: from zuben.voltaire.com ([172.25.5.15]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 4 Feb 2010 13:24:53 +0200 Date: Thu, 4 Feb 2010 13:25:07 +0200 (IST) From: Or Gerlitz To: Roland Dreier cc: linux-rdma , Chien Tung , Faisal Latif Subject: [PATCH] rdma/nes: change WQ overflow return code Message-ID: MIME-Version: 1.0 X-OriginalArrivalTime: 04 Feb 2010 11:24:53.0170 (UTC) FILETIME=[ABE9A120:01CAA58C] 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]); Thu, 04 Feb 2010 11:24:55 +0000 (UTC) Index: linux-2.6.33-rc4/drivers/infiniband/hw/nes/nes_verbs.c =================================================================== --- linux-2.6.33-rc4.orig/drivers/infiniband/hw/nes/nes_verbs.c +++ linux-2.6.33-rc4/drivers/infiniband/hw/nes/nes_verbs.c @@ -228,7 +228,7 @@ static int nes_bind_mw(struct ib_qp *ibq /* Check for SQ overflow */ if (((head + (2 * qsize) - nesqp->hwqp.sq_tail) % qsize) == (qsize - 1)) { spin_unlock_irqrestore(&nesqp->lock, flags); - return -EINVAL; + return -ENOMEM; } wqe = &nesqp->hwqp.sq_vbase[head]; @@ -3294,7 +3294,7 @@ static int nes_post_send(struct ib_qp *i /* Check for SQ overflow */ if (((head + (2 * qsize) - nesqp->hwqp.sq_tail) % qsize) == (qsize - 1)) { - err = -EINVAL; + err = -ENOMEM; break; } @@ -3577,7 +3577,7 @@ static int nes_post_recv(struct ib_qp *i } /* Check for RQ overflow */ if (((head + (2 * qsize) - nesqp->hwqp.rq_tail) % qsize) == (qsize - 1)) { - err = -EINVAL; + err = -ENOMEM; break; }