diff options
author | Doug Ledford <dledford@redhat.com> | 2015-10-29 02:23:34 (GMT) |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-29 02:23:34 (GMT) |
commit | 63e8790d39a2d7c9a0ebeab987a6033d184bc6ba (patch) | |
tree | 9436939401b222d344f66e2bda59b445d5b9189f /drivers/infiniband/hw/nes/nes_verbs.c | |
parent | 95893dde99d9d14f8a6ac99ea3103792a8da5f25 (diff) | |
parent | eb14ab3ba14081e403be93dc6396627567fadf60 (diff) | |
download | linux-63e8790d39a2d7c9a0ebeab987a6033d184bc6ba.tar.xz |
Merge branch 'wr-cleanup' into k.o/for-4.4
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 44cb513..f71b37b 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -3372,9 +3372,9 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, wqe_misc |= NES_IWARP_SQ_WQE_LOCAL_FENCE; set_wqe_32bit_value(wqe->wqe_words, NES_IWARP_SQ_WQE_RDMA_STAG_IDX, - ib_wr->wr.rdma.rkey); + rdma_wr(ib_wr)->rkey); set_wqe_64bit_value(wqe->wqe_words, NES_IWARP_SQ_WQE_RDMA_TO_LOW_IDX, - ib_wr->wr.rdma.remote_addr); + rdma_wr(ib_wr)->remote_addr); if ((ib_wr->send_flags & IB_SEND_INLINE) && ((nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) == 0) && @@ -3409,9 +3409,9 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, } set_wqe_64bit_value(wqe->wqe_words, NES_IWARP_SQ_WQE_RDMA_TO_LOW_IDX, - ib_wr->wr.rdma.remote_addr); + rdma_wr(ib_wr)->remote_addr); set_wqe_32bit_value(wqe->wqe_words, NES_IWARP_SQ_WQE_RDMA_STAG_IDX, - ib_wr->wr.rdma.rkey); + rdma_wr(ib_wr)->rkey); set_wqe_32bit_value(wqe->wqe_words, NES_IWARP_SQ_WQE_RDMA_LENGTH_IDX, ib_wr->sg_list->length); set_wqe_64bit_value(wqe->wqe_words, NES_IWARP_SQ_WQE_FRAG0_LOW_IDX, @@ -3428,15 +3428,16 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, case IB_WR_FAST_REG_MR: { int i; - int flags = ib_wr->wr.fast_reg.access_flags; + struct ib_fast_reg_wr *fwr = fast_reg_wr(ib_wr); + int flags = fwr->access_flags; struct nes_ib_fast_reg_page_list *pnesfrpl = - container_of(ib_wr->wr.fast_reg.page_list, + container_of(fwr->page_list, struct nes_ib_fast_reg_page_list, ibfrpl); u64 *src_page_list = pnesfrpl->ibfrpl.page_list; u64 *dst_page_list = pnesfrpl->nes_wqe_pbl.kva; - if (ib_wr->wr.fast_reg.page_list_len > + if (fwr->page_list_len > (NES_4K_PBL_CHUNK_SIZE / sizeof(u64))) { nes_debug(NES_DBG_IW_TX, "SQ_FMR: bad page_list_len\n"); err = -EINVAL; @@ -3445,19 +3446,19 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, wqe_misc = NES_IWARP_SQ_OP_FAST_REG; set_wqe_64bit_value(wqe->wqe_words, NES_IWARP_SQ_FMR_WQE_VA_FBO_LOW_IDX, - ib_wr->wr.fast_reg.iova_start); + fwr->iova_start); set_wqe_32bit_value(wqe->wqe_words, NES_IWARP_SQ_FMR_WQE_LENGTH_LOW_IDX, - ib_wr->wr.fast_reg.length); + fwr->length); set_wqe_32bit_value(wqe->wqe_words, NES_IWARP_SQ_FMR_WQE_LENGTH_HIGH_IDX, 0); set_wqe_32bit_value(wqe->wqe_words, NES_IWARP_SQ_FMR_WQE_MR_STAG_IDX, - ib_wr->wr.fast_reg.rkey); + fwr->rkey); /* Set page size: */ - if (ib_wr->wr.fast_reg.page_shift == 12) { + if (fwr->page_shift == 12) { wqe_misc |= NES_IWARP_SQ_FMR_WQE_PAGE_SIZE_4K; - } else if (ib_wr->wr.fast_reg.page_shift == 21) { + } else if (fwr->page_shift == 21) { wqe_misc |= NES_IWARP_SQ_FMR_WQE_PAGE_SIZE_2M; } else { nes_debug(NES_DBG_IW_TX, "Invalid page shift," @@ -3480,11 +3481,11 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, wqe_misc |= NES_IWARP_SQ_FMR_WQE_RIGHTS_ENABLE_WINDOW_BIND; /* Fill in PBL info: */ - if (ib_wr->wr.fast_reg.page_list_len > + if (fwr->page_list_len > pnesfrpl->ibfrpl.max_page_list_len) { nes_debug(NES_DBG_IW_TX, "Invalid page list length," " ib_wr=%p, value=%u, max=%u\n", - ib_wr, ib_wr->wr.fast_reg.page_list_len, + ib_wr, fwr->page_list_len, pnesfrpl->ibfrpl.max_page_list_len); err = -EINVAL; break; @@ -3496,19 +3497,19 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr, set_wqe_32bit_value(wqe->wqe_words, NES_IWARP_SQ_FMR_WQE_PBL_LENGTH_IDX, - ib_wr->wr.fast_reg.page_list_len * 8); + fwr->page_list_len * 8); - for (i = 0; i < ib_wr->wr.fast_reg.page_list_len; i++) + for (i = 0; i < fwr->page_list_len; i++) dst_page_list[i] = cpu_to_le64(src_page_list[i]); nes_debug(NES_DBG_IW_TX, "SQ_FMR: iova_start: %llx, " "length: %d, rkey: %0x, pgl_paddr: %llx, " "page_list_len: %u, wqe_misc: %x\n", - (unsigned long long) ib_wr->wr.fast_reg.iova_start, - ib_wr->wr.fast_reg.length, - ib_wr->wr.fast_reg.rkey, + (unsigned long long) fwr->iova_start, + fwr->length, + fwr->rkey, (unsigned long long) pnesfrpl->nes_wqe_pbl.paddr, - ib_wr->wr.fast_reg.page_list_len, + fwr->page_list_len, wqe_misc); break; } |