aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2010-01-06 15:48:55 -0500
committerRoland Dreier <rolandd@cisco.com>2010-01-06 15:48:55 -0500
commit4c425588e0d72c9c55024752b0f6e709c96787ff (patch)
tree297a74410fb03c3df2c8625a48ee4b747cf2ee88 /drivers
parent6b7b284958d47b77d06745b36bc7f36dab769d9b (diff)
IB/mlx4: Initialize SRQ scatter entries when creating an SRQ
As for memfree mthca hardware, ConnectX also requires SRQ WQE scatter entries to be initialized with the invalid L_Key at SRQ creation time. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mlx4/srq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c
index d42565258fb7..cf8085bcbd6d 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,
74 struct mlx4_ib_dev *dev = to_mdev(pd->device); 74 struct mlx4_ib_dev *dev = to_mdev(pd->device);
75 struct mlx4_ib_srq *srq; 75 struct mlx4_ib_srq *srq;
76 struct mlx4_wqe_srq_next_seg *next; 76 struct mlx4_wqe_srq_next_seg *next;
77 struct mlx4_wqe_data_seg *scatter;
77 int desc_size; 78 int desc_size;
78 int buf_size; 79 int buf_size;
79 int err; 80 int err;
@@ -149,6 +150,11 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd,
149 next = get_wqe(srq, i); 150 next = get_wqe(srq, i);
150 next->next_wqe_index = 151 next->next_wqe_index =
151 cpu_to_be16((i + 1) & (srq->msrq.max - 1)); 152 cpu_to_be16((i + 1) & (srq->msrq.max - 1));
153
154 for (scatter = (void *) (next + 1);
155 (void *) scatter < (void *) next + desc_size;
156 ++scatter)
157 scatter->lkey = cpu_to_be32(MLX4_INVALID_LKEY);
152 } 158 }
153 159
154 err = mlx4_mtt_init(dev->dev, srq->buf.npages, srq->buf.page_shift, 160 err = mlx4_mtt_init(dev->dev, srq->buf.npages, srq->buf.page_shift,