Merge tag 'devicetree-fixes-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / infiniband / sw / siw / siw_verbs.c
index e389d44..3f175f2 100644 (file)
@@ -160,7 +160,7 @@ int siw_query_device(struct ib_device *base_dev, struct ib_device_attr *attr,
        return 0;
 }
 
-int siw_query_port(struct ib_device *base_dev, u8 port,
+int siw_query_port(struct ib_device *base_dev, u32 port,
                   struct ib_port_attr *attr)
 {
        struct siw_device *sdev = to_siw_dev(base_dev);
@@ -194,7 +194,7 @@ int siw_query_port(struct ib_device *base_dev, u8 port,
        return rv;
 }
 
-int siw_get_port_immutable(struct ib_device *base_dev, u8 port,
+int siw_get_port_immutable(struct ib_device *base_dev, u32 port,
                           struct ib_port_immutable *port_immutable)
 {
        struct ib_port_attr attr;
@@ -209,7 +209,7 @@ int siw_get_port_immutable(struct ib_device *base_dev, u8 port,
        return 0;
 }
 
-int siw_query_gid(struct ib_device *base_dev, u8 port, int idx,
+int siw_query_gid(struct ib_device *base_dev, u32 port, int idx,
                  union ib_gid *gid)
 {
        struct siw_device *sdev = to_siw_dev(base_dev);
@@ -300,7 +300,6 @@ struct ib_qp *siw_create_qp(struct ib_pd *pd,
        struct siw_ucontext *uctx =
                rdma_udata_to_drv_context(udata, struct siw_ucontext,
                                          base_ucontext);
-       struct siw_cq *scq = NULL, *rcq = NULL;
        unsigned long flags;
        int num_sqe, num_rqe, rv = 0;
        size_t length;
@@ -343,10 +342,8 @@ struct ib_qp *siw_create_qp(struct ib_pd *pd,
                rv = -EINVAL;
                goto err_out;
        }
-       scq = to_siw_cq(attrs->send_cq);
-       rcq = to_siw_cq(attrs->recv_cq);
 
-       if (!scq || (!rcq && !attrs->srq)) {
+       if (!attrs->send_cq || (!attrs->recv_cq && !attrs->srq)) {
                siw_dbg(base_dev, "send CQ or receive CQ invalid\n");
                rv = -EINVAL;
                goto err_out;
@@ -378,7 +375,7 @@ struct ib_qp *siw_create_qp(struct ib_pd *pd,
        else {
                /* Zero sized SQ is not supported */
                rv = -EINVAL;
-               goto err_out;
+               goto err_out_xa;
        }
        if (num_rqe)
                num_rqe = roundup_pow_of_two(num_rqe);
@@ -401,8 +398,8 @@ struct ib_qp *siw_create_qp(struct ib_pd *pd,
                }
        }
        qp->pd = pd;
-       qp->scq = scq;
-       qp->rcq = rcq;
+       qp->scq = to_siw_cq(attrs->send_cq);
+       qp->rcq = to_siw_cq(attrs->recv_cq);
 
        if (attrs->srq) {
                /*
@@ -1848,7 +1845,7 @@ void siw_srq_event(struct siw_srq *srq, enum ib_event_type etype)
        }
 }
 
-void siw_port_event(struct siw_device *sdev, u8 port, enum ib_event_type etype)
+void siw_port_event(struct siw_device *sdev, u32 port, enum ib_event_type etype)
 {
        struct ib_event event;