aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_qp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_qp.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_qp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index 4dbe2870e014..4d54b9f64567 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -465,9 +465,9 @@ static struct ehca_qp *internal_create_qp(
465 u32 swqe_size = 0, rwqe_size = 0, ib_qp_num; 465 u32 swqe_size = 0, rwqe_size = 0, ib_qp_num;
466 unsigned long flags; 466 unsigned long flags;
467 467
468 if (!atomic_add_unless(&shca->num_qps, 1, ehca_max_qp)) { 468 if (!atomic_add_unless(&shca->num_qps, 1, shca->max_num_qps)) {
469 ehca_err(pd->device, "Unable to create QP, max number of %i " 469 ehca_err(pd->device, "Unable to create QP, max number of %i "
470 "QPs reached.", ehca_max_qp); 470 "QPs reached.", shca->max_num_qps);
471 ehca_err(pd->device, "To increase the maximum number of QPs " 471 ehca_err(pd->device, "To increase the maximum number of QPs "
472 "use the number_of_qps module parameter.\n"); 472 "use the number_of_qps module parameter.\n");
473 return ERR_PTR(-ENOSPC); 473 return ERR_PTR(-ENOSPC);
@@ -502,6 +502,12 @@ static struct ehca_qp *internal_create_qp(
502 if (init_attr->srq) { 502 if (init_attr->srq) {
503 my_srq = container_of(init_attr->srq, struct ehca_qp, ib_srq); 503 my_srq = container_of(init_attr->srq, struct ehca_qp, ib_srq);
504 504
505 if (qp_type == IB_QPT_UC) {
506 ehca_err(pd->device, "UC with SRQ not supported");
507 atomic_dec(&shca->num_qps);
508 return ERR_PTR(-EINVAL);
509 }
510
505 has_srq = 1; 511 has_srq = 1;
506 parms.ext_type = EQPT_SRQBASE; 512 parms.ext_type = EQPT_SRQBASE;
507 parms.srq_qpn = my_srq->real_qp_num; 513 parms.srq_qpn = my_srq->real_qp_num;