[ofa-general] [patch] mlx4_ib: return proper num s/g entries for rq at create_qp

Jack Morgenstein jackm at dev.mellanox.co.il
Wed May 2 07:14:05 PDT 2007


Fix number of scatter-gather entries returned for receive queue at qp creation.

Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>

diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 53aedfb..33db96c 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -236,7 +236,7 @@ static int set_qp_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
 	cap->max_send_wr  = qp->sq.max;
 	cap->max_recv_wr  = qp->rq.max;
 	cap->max_send_sge = qp->sq.max_gs;
-	cap->max_recv_sge = qp->sq.max_gs;
+	cap->max_recv_sge = qp->rq.max_gs;
 	cap->max_inline_data = (1 << qp->sq.wqe_shift) - send_wqe_overhead(type) -
 		sizeof (struct mlx4_wqe_inline_seg);
 



More information about the general mailing list