]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/infiniband/hw/ehca/ehca_cq.c
IB/core: Change provider's API of create_cq to be extendible
[karo-tx-linux.git] / drivers / infiniband / hw / ehca / ehca_cq.c
index 8cc837537768f97f99041ec7ab69d2e111dba0c0..9b68b175069b9a1b6f95bfc1beae065b9ee6b682 100644 (file)
@@ -113,10 +113,12 @@ struct ehca_qp *ehca_cq_get_qp(struct ehca_cq *cq, int real_qp_num)
        return ret;
 }
 
-struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
+struct ib_cq *ehca_create_cq(struct ib_device *device,
+                            const struct ib_cq_init_attr *attr,
                             struct ib_ucontext *context,
                             struct ib_udata *udata)
 {
+       int cqe = attr->cqe;
        static const u32 additional_cqe = 20;
        struct ib_cq *cq;
        struct ehca_cq *my_cq;
@@ -131,6 +133,9 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
        int ipz_rc, i;
        unsigned long flags;
 
+       if (attr->flags)
+               return ERR_PTR(-EINVAL);
+
        if (cqe >= 0xFFFFFFFF - 64 - additional_cqe)
                return ERR_PTR(-EINVAL);