* [PATCH 2/2] mlx4_ib: initialize SRQ scatter entries when creating an SRQ
@ 2009-12-17 15:09 Jack Morgenstein
0 siblings, 0 replies; 2+ messages in thread
From: Jack Morgenstein @ 2009-12-17 15:09 UTC (permalink / raw)
To: rdreier-FYB4Gu1CFyUAvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Tziporet Koren
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] mlx4_ib: initialize SRQ scatter entries when creating an SRQ
@ 2009-12-17 15:15 Jack Morgenstein
0 siblings, 0 replies; 2+ messages in thread
From: Jack Morgenstein @ 2009-12-17 15:15 UTC (permalink / raw)
To: rdreier-FYB4Gu1CFyUAvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Tziporet Koren
As in the mthca-memfree driver, need to initialize SRQ WQE scatter entries to the
invalid lkey at work queue creation time.
Signed-off-by: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c
index d425652..403ccbc 100644
--- a/drivers/infiniband/hw/mlx4/srq.c
+++ b/drivers/infiniband/hw/mlx4/srq.c
@@ -130,6 +130,8 @@ struct ib_srq *mlx4_ib_create_srq(struct ib_pd *pd,
if (err)
goto err_mtt;
} else {
+ struct mlx4_wqe_data_seg *scatter;
+
err = mlx4_db_alloc(dev->dev, &srq->db, 0);
if (err)
goto err_srq;
@@ -149,6 +151,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,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-17 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 15:09 [PATCH 2/2] mlx4_ib: initialize SRQ scatter entries when creating an SRQ Jack Morgenstein
-- strict thread matches above, loose matches on Subject: below --
2009-12-17 15:15 Jack Morgenstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox