aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_qp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_qp.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_qp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c
index fd4d55bdee78..83b9a6a5e2c6 100644
--- a/drivers/infiniband/hw/ipath/ipath_qp.c
+++ b/drivers/infiniband/hw/ipath/ipath_qp.c
@@ -661,8 +661,10 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
661 size_t sz; 661 size_t sz;
662 struct ib_qp *ret; 662 struct ib_qp *ret;
663 663
664 if (init_attr->cap.max_send_sge > 255 || 664 if (init_attr->cap.max_send_sge > ib_ipath_max_sges ||
665 init_attr->cap.max_recv_sge > 255) { 665 init_attr->cap.max_recv_sge > ib_ipath_max_sges ||
666 init_attr->cap.max_send_wr > ib_ipath_max_qp_wrs ||
667 init_attr->cap.max_recv_wr > ib_ipath_max_qp_wrs) {
666 ret = ERR_PTR(-ENOMEM); 668 ret = ERR_PTR(-ENOMEM);
667 goto bail; 669 goto bail;
668 } 670 }