diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_uc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_uc.c b/drivers/infiniband/hw/qib/qib_uc.c index ce7387ff5d91..70b4cb710f9a 100644 --- a/drivers/infiniband/hw/qib/qib_uc.c +++ b/drivers/infiniband/hw/qib/qib_uc.c | |||
@@ -403,7 +403,6 @@ send_last: | |||
403 | if (unlikely(wc.byte_len > qp->r_len)) | 403 | if (unlikely(wc.byte_len > qp->r_len)) |
404 | goto rewind; | 404 | goto rewind; |
405 | wc.opcode = IB_WC_RECV; | 405 | wc.opcode = IB_WC_RECV; |
406 | last_imm: | ||
407 | qib_copy_sge(&qp->r_sge, data, tlen, 0); | 406 | qib_copy_sge(&qp->r_sge, data, tlen, 0); |
408 | while (qp->s_rdma_read_sge.num_sge) { | 407 | while (qp->s_rdma_read_sge.num_sge) { |
409 | atomic_dec(&qp->s_rdma_read_sge.sge.mr->refcount); | 408 | atomic_dec(&qp->s_rdma_read_sge.sge.mr->refcount); |
@@ -411,6 +410,7 @@ last_imm: | |||
411 | qp->s_rdma_read_sge.sge = | 410 | qp->s_rdma_read_sge.sge = |
412 | *qp->s_rdma_read_sge.sg_list++; | 411 | *qp->s_rdma_read_sge.sg_list++; |
413 | } | 412 | } |
413 | last_imm: | ||
414 | wc.wr_id = qp->r_wr_id; | 414 | wc.wr_id = qp->r_wr_id; |
415 | wc.status = IB_WC_SUCCESS; | 415 | wc.status = IB_WC_SUCCESS; |
416 | wc.qp = &qp->ibqp; | 416 | wc.qp = &qp->ibqp; |
@@ -509,6 +509,12 @@ rdma_last_imm: | |||
509 | } | 509 | } |
510 | wc.byte_len = qp->r_len; | 510 | wc.byte_len = qp->r_len; |
511 | wc.opcode = IB_WC_RECV_RDMA_WITH_IMM; | 511 | wc.opcode = IB_WC_RECV_RDMA_WITH_IMM; |
512 | qib_copy_sge(&qp->r_sge, data, tlen, 1); | ||
513 | while (qp->r_sge.num_sge) { | ||
514 | atomic_dec(&qp->r_sge.sge.mr->refcount); | ||
515 | if (--qp->r_sge.num_sge) | ||
516 | qp->r_sge.sge = *qp->r_sge.sg_list++; | ||
517 | } | ||
512 | goto last_imm; | 518 | goto last_imm; |
513 | 519 | ||
514 | case OP(RDMA_WRITE_LAST): | 520 | case OP(RDMA_WRITE_LAST): |