staging/rdma/hfi1: remove s_rdma_mr
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Sun, 14 Feb 2016 20:44:52 +0000 (12:44 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:38:12 +0000 (20:38 -0500)
It can be conveyed in the verbs_txreq.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/rc.c
drivers/staging/rdma/hfi1/verbs.c

index 75d70d583d036cfc7c1c1e05994f6c32761f6ff6..c075e85ab4c658dc3eb1562e08dffdfffc238ff7 100644 (file)
@@ -266,9 +266,9 @@ static int make_rc_ack(struct hfi1_ibdev *dev, struct rvt_qp *qp,
                                goto bail;
                        }
                        /* Copy SGE state in case we need to resend */
-                       qp->s_rdma_mr = e->rdma_sge.mr;
-                       if (qp->s_rdma_mr)
-                               rvt_get_mr(qp->s_rdma_mr);
+                       ps->s_txreq->mr = e->rdma_sge.mr;
+                       if (ps->s_txreq->mr)
+                               rvt_get_mr(ps->s_txreq->mr);
                        qp->s_ack_rdma_sge.sge = e->rdma_sge;
                        qp->s_ack_rdma_sge.num_sge = 1;
                        qp->s_cur_sge = &qp->s_ack_rdma_sge;
@@ -305,9 +305,9 @@ static int make_rc_ack(struct hfi1_ibdev *dev, struct rvt_qp *qp,
                /* FALLTHROUGH */
        case OP(RDMA_READ_RESPONSE_MIDDLE):
                qp->s_cur_sge = &qp->s_ack_rdma_sge;
-               qp->s_rdma_mr = qp->s_ack_rdma_sge.sge.mr;
-               if (qp->s_rdma_mr)
-                       rvt_get_mr(qp->s_rdma_mr);
+               ps->s_txreq->mr = qp->s_ack_rdma_sge.sge.mr;
+               if (ps->s_txreq->mr)
+                       rvt_get_mr(ps->s_txreq->mr);
                len = qp->s_ack_rdma_sge.sge.sge_length;
                if (len > pmtu) {
                        len = pmtu;
index 8cf1d6b0778452c4bf93bc2824d56a0fd2d8220e..dc8eb6b763438338f4a38ad3e786f5bfa93dcdce 100644 (file)
@@ -728,9 +728,6 @@ int hfi1_verbs_send_dma(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
                pbc = create_pbc(ppd, pbc_flags, qp->srate_mbps, vl, plen);
        }
        tx->wqe = qp->s_wqe;
-       tx->mr = qp->s_rdma_mr;
-       if (qp->s_rdma_mr)
-               qp->s_rdma_mr = NULL;
        tx->hdr_dwords = hdrwords + 2;
        ret = build_verbs_tx_desc(tx->sde, ss, len, tx, ahdr, pbc);
        if (unlikely(ret))
@@ -889,11 +886,6 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
        trace_output_ibhdr(dd_from_ibdev(qp->ibqp.device),
                           &ps->s_txreq->phdr.hdr);
 
-       if (qp->s_rdma_mr) {
-               rvt_put_mr(qp->s_rdma_mr);
-               qp->s_rdma_mr = NULL;
-       }
-
 pio_bail:
        if (qp->s_wqe) {
                spin_lock_irqsave(&qp->s_lock, flags);