RDMA/nes: Change WQ overflow return code
authorOr Gerlitz <ogerlitz@voltaire.com>
Thu, 4 Feb 2010 11:25:07 +0000 (11:25 +0000)
committerRoland Dreier <rolandd@cisco.com>
Fri, 19 Feb 2010 21:51:46 +0000 (13:51 -0800)
Change the nes driver to return -ENOMEM on SQ/RQ overflow to match the
return code of other RDMA HW drivers (e.g cxgb3, ehca, mlx4, mthca).

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Acked-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes_verbs.c

index 64d3136e3747aa9fd81afe2e044c69dab2e1f34f..815725f886c449dbde3e65c6ec999229b1fbf17c 100644 (file)
@@ -228,7 +228,7 @@ static int nes_bind_mw(struct ib_qp *ibqp, struct ib_mw *ibmw,
        /* 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 *ibqp, struct ib_send_wr *ib_wr,
 
                /* 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 *ibqp, struct ib_recv_wr *ib_wr,
                }
                /* Check for RQ overflow */
                if (((head + (2 * qsize) - nesqp->hwqp.rq_tail) % qsize) == (qsize - 1)) {
-                       err = -EINVAL;
+                       err = -ENOMEM;
                        break;
                }