diff options
author | Or Gerlitz <ogerlitz@voltaire.com> | 2010-01-06 15:51:30 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-01-06 15:51:30 -0500 |
commit | 2b946077423270f065013c45d78522a5fb9542ca (patch) | |
tree | 9e3e0499de528d7f82804166d0e49c15289effd5 /drivers/infiniband | |
parent | 4c425588e0d72c9c55024752b0f6e709c96787ff (diff) |
IB/mlx4: Fix queue overflow check in post_recv
In mlx4_ib_post_recv(), we should check the queue for overflow using
recv_cq instead of send_cq (current code looks like a copy-and-paste
mistake).
Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 989555cee883..2a97c964b9ef 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1752,7 +1752,7 @@ int mlx4_ib_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr, | |||
1752 | ind = qp->rq.head & (qp->rq.wqe_cnt - 1); | 1752 | ind = qp->rq.head & (qp->rq.wqe_cnt - 1); |
1753 | 1753 | ||
1754 | for (nreq = 0; wr; ++nreq, wr = wr->next) { | 1754 | for (nreq = 0; wr; ++nreq, wr = wr->next) { |
1755 | if (mlx4_wq_overflow(&qp->rq, nreq, qp->ibqp.send_cq)) { | 1755 | if (mlx4_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { |
1756 | err = -ENOMEM; | 1756 | err = -ENOMEM; |
1757 | *bad_wr = wr; | 1757 | *bad_wr = wr; |
1758 | goto out; | 1758 | goto out; |