]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/infiniband/hw/amso1100/c2_provider.c
IB/core: Change provider's API of create_cq to be extendible
[mirror_ubuntu-hirsute-kernel.git] / drivers / infiniband / hw / amso1100 / c2_provider.c
index 0f007a6b188ba4698de4f36dce59cb8662caef77..8ea569f2cfa687dc56b4172015ca23e23db8a069 100644 (file)
@@ -286,13 +286,18 @@ static int c2_destroy_qp(struct ib_qp *ib_qp)
        return 0;
 }
 
-static struct ib_cq *c2_create_cq(struct ib_device *ibdev, int entries, int vector,
+static struct ib_cq *c2_create_cq(struct ib_device *ibdev,
+                                 const struct ib_cq_init_attr *attr,
                                  struct ib_ucontext *context,
                                  struct ib_udata *udata)
 {
+       int entries = attr->cqe;
        struct c2_cq *cq;
        int err;
 
+       if (attr->flags)
+               return ERR_PTR(-EINVAL);
+
        cq = kmalloc(sizeof(*cq), GFP_KERNEL);
        if (!cq) {
                pr_debug("%s: Unable to allocate CQ\n", __func__);