aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 0793059b753a..8d09aa38fc83 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1581,17 +1581,25 @@ int mlx4_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr
1581 1581
1582done: 1582done:
1583 qp_attr->cur_qp_state = qp_attr->qp_state; 1583 qp_attr->cur_qp_state = qp_attr->qp_state;
1584 qp_attr->cap.max_recv_wr = qp->rq.wqe_cnt;
1585 qp_attr->cap.max_recv_sge = qp->rq.max_gs;
1586
1584 if (!ibqp->uobject) { 1587 if (!ibqp->uobject) {
1585 qp_attr->cap.max_send_wr = qp->sq.wqe_cnt; 1588 qp_attr->cap.max_send_wr = qp->sq.wqe_cnt;
1586 qp_attr->cap.max_recv_wr = qp->rq.wqe_cnt; 1589 qp_attr->cap.max_send_sge = qp->sq.max_gs;
1587 qp_attr->cap.max_send_sge = qp->sq.max_gs; 1590 } else {
1588 qp_attr->cap.max_recv_sge = qp->rq.max_gs; 1591 qp_attr->cap.max_send_wr = 0;
1589 qp_attr->cap.max_inline_data = (1 << qp->sq.wqe_shift) - 1592 qp_attr->cap.max_send_sge = 0;
1590 send_wqe_overhead(qp->ibqp.qp_type) -
1591 sizeof (struct mlx4_wqe_inline_seg);
1592 qp_init_attr->cap = qp_attr->cap;
1593 } 1593 }
1594 1594
1595 /*
1596 * We don't support inline sends for kernel QPs (yet), and we
1597 * don't know what userspace's value should be.
1598 */
1599 qp_attr->cap.max_inline_data = 0;
1600
1601 qp_init_attr->cap = qp_attr->cap;
1602
1595 return 0; 1603 return 0;
1596} 1604}
1597 1605