RDMA/cxgb3: Set the appropriate IO channel in rdma_init work requests
authorSteve Wise <swise@opengridcomputing.com>
Sun, 6 Sep 2009 03:22:37 +0000 (20:22 -0700)
committerRoland Dreier <rolandd@cisco.com>
Sun, 6 Sep 2009 03:22:37 +0000 (20:22 -0700)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb3/cxio_hal.c
drivers/infiniband/hw/cxgb3/cxio_wr.h
drivers/infiniband/hw/cxgb3/iwch_qp.c

index 62f9cf2f94ec647756dcd5f2ae06c9f01a9eafac..4dec515c676c9389459ea80aea034952ab247084 100644 (file)
@@ -852,7 +852,9 @@ int cxio_rdma_init(struct cxio_rdev *rdev_p, struct t3_rdma_init_attr *attr)
        wqe->qpcaps = attr->qpcaps;
        wqe->ulpdu_size = cpu_to_be16(attr->tcp_emss);
        wqe->rqe_count = cpu_to_be16(attr->rqe_count);
-       wqe->flags_rtr_type = cpu_to_be16(attr->flags|V_RTR_TYPE(attr->rtr_type));
+       wqe->flags_rtr_type = cpu_to_be16(attr->flags |
+                                         V_RTR_TYPE(attr->rtr_type) |
+                                         V_CHAN(attr->chan));
        wqe->ord = cpu_to_be32(attr->ord);
        wqe->ird = cpu_to_be32(attr->ird);
        wqe->qp_dma_addr = cpu_to_be64(attr->qp_dma_addr);
index 32e3b1461d81d551f3b1aa2a602c9449d2597c8c..a197a5b7ac7fc74836aaf2ece28ff93c4271428d 100644 (file)
@@ -327,6 +327,11 @@ enum rdma_init_rtr_types {
 #define V_RTR_TYPE(x)  ((x) << S_RTR_TYPE)
 #define G_RTR_TYPE(x)  ((((x) >> S_RTR_TYPE)) & M_RTR_TYPE)
 
+#define S_CHAN         4
+#define M_CHAN         0x3
+#define V_CHAN(x)      ((x) << S_CHAN)
+#define G_CHAN(x)      ((((x) >> S_CHAN)) & M_CHAN)
+
 struct t3_rdma_init_attr {
        u32 tid;
        u32 qpid;
@@ -346,6 +351,7 @@ struct t3_rdma_init_attr {
        u16 flags;
        u16 rqe_count;
        u32 irs;
+       u32 chan;
 };
 
 struct t3_rdma_init_wr {
index 27bbdc8e773ae934e03b8d421a08102c7b945d63..6e86534719414ff5e5e6c859dd4fd3cbf995cfa5 100644 (file)
@@ -889,6 +889,7 @@ static int rdma_init(struct iwch_dev *rhp, struct iwch_qp *qhp,
        init_attr.qp_dma_size = (1UL << qhp->wq.size_log2);
        init_attr.rqe_count = iwch_rqes_posted(qhp);
        init_attr.flags = qhp->attr.mpa_attr.initiator ? MPA_INITIATOR : 0;
+       init_attr.chan = qhp->ep->l2t->smt_idx;
        if (peer2peer) {
                init_attr.rtr_type = RTR_READ;
                if (init_attr.ord == 0 && qhp->attr.mpa_attr.initiator)