]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/infiniband/ulp/srpt/ib_srpt.c
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[karo-tx-linux.git] / drivers / infiniband / ulp / srpt / ib_srpt.c
index cea207e8b5d2a5d76346b07d906d2ce98e1f4bee..82897ca17f32349df3e3cc332b9b0204bbc524a3 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/string.h>
 #include <linux/delay.h>
 #include <linux/atomic.h>
+#include <scsi/scsi_proto.h>
 #include <scsi/scsi_tcq.h>
 #include <target/configfs_macros.h>
 #include <target/target_core_base.h>
@@ -474,7 +475,8 @@ static void srpt_mad_recv_handler(struct ib_mad_agent *mad_agent,
        rsp = ib_create_send_mad(mad_agent, mad_wc->wc->src_qp,
                                 mad_wc->wc->pkey_index, 0,
                                 IB_MGMT_DEVICE_HDR, IB_MGMT_DEVICE_DATA,
-                                GFP_KERNEL);
+                                GFP_KERNEL,
+                                IB_MGMT_BASE_VERSION);
        if (IS_ERR(rsp))
                goto err_rsp;
 
@@ -2074,6 +2076,7 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
        struct srpt_port *sport = ch->sport;
        struct srpt_device *sdev = sport->sdev;
        u32 srp_sq_size = sport->port_attrib.srp_sq_size;
+       struct ib_cq_init_attr cq_attr = {};
        int ret;
 
        WARN_ON(ch->rq_size < 1);
@@ -2084,8 +2087,9 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
                goto out;
 
 retry:
+       cq_attr.cqe = ch->rq_size + srp_sq_size;
        ch->cq = ib_create_cq(sdev->device, srpt_completion, NULL, ch,
-                             ch->rq_size + srp_sq_size, 0);
+                             &cq_attr);
        if (IS_ERR(ch->cq)) {
                ret = PTR_ERR(ch->cq);
                pr_err("failed to create CQ cqe= %d ret= %d\n",