diff options
Diffstat (limited to 'drivers/infiniband/hw/mlx4/srq.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/srq.c | 6 |
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, |