From: Hoang-Nam Nguyen Date: Fri, 10 Oct 2008 21:40:39 +0000 (-0700) Subject: IB/ehca: Don't allow creating UC QP with SRQ X-Git-Tag: v2.6.28-rc1~61^2^3~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0540bbbe455e123a1692d26205ad1a29983883b0;p=linux-2.6-omap-h63xx.git IB/ehca: Don't allow creating UC QP with SRQ This patch prevents a UC QP to be created attached to an SRQ, since current firmware does not support this feature. Signed-off-by: Michael Faath Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index 4dbe2870e01..40b578d601c 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c @@ -502,6 +502,12 @@ static struct ehca_qp *internal_create_qp( if (init_attr->srq) { my_srq = container_of(init_attr->srq, struct ehca_qp, ib_srq); + if (qp_type == IB_QPT_UC) { + ehca_err(pd->device, "UC with SRQ not supported"); + atomic_dec(&shca->num_qps); + return ERR_PTR(-EINVAL); + } + has_srq = 1; parms.ext_type = EQPT_SRQBASE; parms.srq_qpn = my_srq->real_qp_num;