aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJoachim Fenkes <fenkes@de.ibm.com>2007-12-10 06:20:57 -0500
committerRoland Dreier <rolandd@cisco.com>2007-12-12 17:09:43 -0500
commit1457edc72d187f452be1374c7d9281f1dfa16f32 (patch)
tree1f50a120763471dc4ba7a95249de41c2c27400eb /drivers/infiniband
parent4af75653031c6d454b4ace47c1536f0d2e727e3e (diff)
IB/ehca: Return correct number of SGEs for SRQ
Firmware would round up the number of SGEs to four, because the WQE structure holds four SGEs. For SRQ, only three are supported, so return a fixed value instead. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_qp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index dd126681fed0..eff5fb55604b 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -838,7 +838,7 @@ struct ib_srq *ehca_create_srq(struct ib_pd *pd,
838 838
839 /* copy back return values */ 839 /* copy back return values */
840 srq_init_attr->attr.max_wr = qp_init_attr.cap.max_recv_wr; 840 srq_init_attr->attr.max_wr = qp_init_attr.cap.max_recv_wr;
841 srq_init_attr->attr.max_sge = qp_init_attr.cap.max_recv_sge; 841 srq_init_attr->attr.max_sge = 3;
842 842
843 /* drive SRQ into RTR state */ 843 /* drive SRQ into RTR state */
844 mqpcb = ehca_alloc_fw_ctrlblock(GFP_KERNEL); 844 mqpcb = ehca_alloc_fw_ctrlblock(GFP_KERNEL);
@@ -1750,7 +1750,7 @@ int ehca_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr)
1750 } 1750 }
1751 1751
1752 srq_attr->max_wr = qpcb->max_nr_outst_recv_wr - 1; 1752 srq_attr->max_wr = qpcb->max_nr_outst_recv_wr - 1;
1753 srq_attr->max_sge = qpcb->actual_nr_sges_in_rq_wqe; 1753 srq_attr->max_sge = 3;
1754 srq_attr->srq_limit = EHCA_BMASK_GET( 1754 srq_attr->srq_limit = EHCA_BMASK_GET(
1755 MQPCB_CURR_SRQ_LIMIT, qpcb->curr_srq_limit); 1755 MQPCB_CURR_SRQ_LIMIT, qpcb->curr_srq_limit);
1756 1756