diff mbox

rdma/nes: change WQ overflow return code

Message ID Pine.LNX.4.64.1002041323100.31229@zuben.voltaire.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Or Gerlitz Feb. 4, 2010, 11:25 a.m. UTC
None
diff mbox

Patch

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;
 		}