Skip to content

Commit

Permalink
staging/rdma/hfi1: remove s_rdma_mr
Browse files Browse the repository at this point in the history
It can be conveyed in the verbs_txreq.

Reviewed-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
mmarcini authored and dledford committed Mar 11, 2016
1 parent bb5df5f commit c239a5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
12 changes: 6 additions & 6 deletions drivers/staging/rdma/hfi1/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions drivers/staging/rdma/hfi1/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c239a5b

Please sign in to comment.