diff options
author | Roland Dreier <rolandd@cisco.com> | 2010-01-06 13:16:47 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-01-06 13:16:47 -0800 |
commit | 0139fd7c2ffd830e571d56f60198306ac24b726e (patch) | |
tree | 64526574eeeced6ababb769f72a1ee7a93c091d3 /drivers/infiniband | |
parent | fd4582a3999e03fa9eae315bf14c88fd32d44035 (diff) | |
parent | b4f77264cd1a858ee09da8dba5a2711a649adbf3 (diff) | |
download | kernel_samsung_aries-0139fd7c2ffd830e571d56f60198306ac24b726e.zip kernel_samsung_aries-0139fd7c2ffd830e571d56f60198306ac24b726e.tar.gz kernel_samsung_aries-0139fd7c2ffd830e571d56f60198306ac24b726e.tar.bz2 |
Merge branches 'misc' and 'mlx4' into for-next
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx4/srq.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 989555c..2a97c96 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, ind = qp->rq.head & (qp->rq.wqe_cnt - 1); for (nreq = 0; wr; ++nreq, wr = wr->next) { - if (mlx4_wq_overflow(&qp->rq, nreq, qp->ibqp.send_cq)) { + if (mlx4_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { err = -ENOMEM; *bad_wr = wr; goto out; diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c index d425652..cf8085b 100644 --- a/drivers/infiniband/hw/mlx4/srq.c +++ b/drivers/infiniband/hw/mlx4/srq.c @@ -74,6 +74,7 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, struct mlx4_ib_dev *dev = to_mdev(pd->device); struct mlx4_ib_srq *srq; struct mlx4_wqe_srq_next_seg *next; + struct mlx4_wqe_data_seg *scatter; int desc_size; int buf_size; int err; @@ -149,6 +150,11 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd, next = get_wqe(srq, i); next->next_wqe_index = cpu_to_be16((i + 1) & (srq->msrq.max - 1)); + + for (scatter = (void *) (next + 1); + (void *) scatter < (void *) next + desc_size; + ++scatter) + scatter->lkey = cpu_to_be32(MLX4_INVALID_LKEY); } err = mlx4_mtt_init(dev->dev, srq->buf.npages, srq->buf.page_shift, |