linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 7/7] IB/ehca: Prevent overwriting QP init attributes given by caller
@ 2007-08-08 18:44 Stefan Roscher
  2007-08-16 16:17 ` [ofa-general] " Roland Dreier
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roscher @ 2007-08-08 18:44 UTC (permalink / raw)
  To: Roland Dreier, linux-kernel, linuxppc-dev, openib-general
  Cc: fenkes, "Hoang-Nam Nguyen" @dyn-9-152-249-53, raisch

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
---
 drivers/infiniband/hw/ehca/ehca_qp.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index d8c1c22..6efda3d 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -709,12 +709,12 @@ static struct ehca_qp *internal_create_qp(
 		my_qp->ib_qp.event_handler = init_attr->event_handler;
 	}
 
-	init_attr->cap.max_inline_data = 0; /* not supported yet */
-	init_attr->cap.max_recv_sge = parms.rqueue.act_nr_sges;
-	init_attr->cap.max_recv_wr = parms.rqueue.act_nr_wqes;
-	init_attr->cap.max_send_sge = parms.squeue.act_nr_sges;
-	init_attr->cap.max_send_wr = parms.squeue.act_nr_wqes;
 	my_qp->init_attr = *init_attr;
+	my_qp->init_attr.cap.max_inline_data = 0; /* not supported yet */
+	my_qp->init_attr.cap.max_recv_sge = parms.rqueue.act_nr_sges;
+	my_qp->init_attr.cap.max_recv_wr = parms.rqueue.act_nr_wqes;
+	my_qp->init_attr.cap.max_send_sge = parms.squeue.act_nr_sges;
+	my_qp->init_attr.cap.max_send_wr = parms.squeue.act_nr_wqes;
 
 	/* NOTE: define_apq0() not supported yet */
 	if (qp_type == IB_QPT_GSI) {
@@ -825,10 +825,6 @@ struct ib_srq *ehca_create_srq(struct ib_pd *pd,
 	if (IS_ERR(my_qp))
 		return (struct ib_srq *)my_qp;
 
-	/* copy back return values */
-	srq_init_attr->attr.max_wr = qp_init_attr.cap.max_recv_wr;
-	srq_init_attr->attr.max_sge = qp_init_attr.cap.max_recv_sge;
-
 	/* drive SRQ into RTR state */
 	mqpcb = ehca_alloc_fw_ctrlblock(GFP_KERNEL);
 	if (!mqpcb) {
-- 
1.5.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-16 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 18:44 [PATCH 7/7] IB/ehca: Prevent overwriting QP init attributes given by caller Stefan Roscher
2007-08-16 16:17 ` [ofa-general] " Roland Dreier
2007-08-16 16:48   ` Hoang-Nam Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).