diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-10-13 12:11:45 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-28 22:27:19 -0400 |
commit | 94e585cb7467a3e4cecb7267cd8303d2b693a8b9 (patch) | |
tree | da5c65026805b2651d927753aa05dfb2cf117041 | |
parent | 191cfed565c0435aeced5f11f6cf9b03ec380d5b (diff) |
RDMA/cxgb3: Remove old FRWR API
No ULP uses it anymore, go ahead and remove it.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_cq.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_provider.c | 24 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_qp.c | 47 |
3 files changed, 1 insertions, 72 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cq.c b/drivers/infiniband/hw/cxgb3/iwch_cq.c index cf5474ae68ff..cfe404925a39 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_cq.c +++ b/drivers/infiniband/hw/cxgb3/iwch_cq.c | |||
@@ -123,7 +123,7 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp, | |||
123 | wc->opcode = IB_WC_LOCAL_INV; | 123 | wc->opcode = IB_WC_LOCAL_INV; |
124 | break; | 124 | break; |
125 | case T3_FAST_REGISTER: | 125 | case T3_FAST_REGISTER: |
126 | wc->opcode = IB_WC_FAST_REG_MR; | 126 | wc->opcode = IB_WC_REG_MR; |
127 | break; | 127 | break; |
128 | default: | 128 | default: |
129 | printk(KERN_ERR MOD "Unexpected opcode %d " | 129 | printk(KERN_ERR MOD "Unexpected opcode %d " |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index f7b915378343..c34725ca0bb4 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -884,28 +884,6 @@ static int iwch_map_mr_sg(struct ib_mr *ibmr, | |||
884 | return ib_sg_to_pages(ibmr, sg, sg_nents, iwch_set_page); | 884 | return ib_sg_to_pages(ibmr, sg, sg_nents, iwch_set_page); |
885 | } | 885 | } |
886 | 886 | ||
887 | static struct ib_fast_reg_page_list *iwch_alloc_fastreg_pbl( | ||
888 | struct ib_device *device, | ||
889 | int page_list_len) | ||
890 | { | ||
891 | struct ib_fast_reg_page_list *page_list; | ||
892 | |||
893 | page_list = kmalloc(sizeof *page_list + page_list_len * sizeof(u64), | ||
894 | GFP_KERNEL); | ||
895 | if (!page_list) | ||
896 | return ERR_PTR(-ENOMEM); | ||
897 | |||
898 | page_list->page_list = (u64 *)(page_list + 1); | ||
899 | page_list->max_page_list_len = page_list_len; | ||
900 | |||
901 | return page_list; | ||
902 | } | ||
903 | |||
904 | static void iwch_free_fastreg_pbl(struct ib_fast_reg_page_list *page_list) | ||
905 | { | ||
906 | kfree(page_list); | ||
907 | } | ||
908 | |||
909 | static int iwch_destroy_qp(struct ib_qp *ib_qp) | 887 | static int iwch_destroy_qp(struct ib_qp *ib_qp) |
910 | { | 888 | { |
911 | struct iwch_dev *rhp; | 889 | struct iwch_dev *rhp; |
@@ -1483,8 +1461,6 @@ int iwch_register_device(struct iwch_dev *dev) | |||
1483 | dev->ibdev.dealloc_mw = iwch_dealloc_mw; | 1461 | dev->ibdev.dealloc_mw = iwch_dealloc_mw; |
1484 | dev->ibdev.alloc_mr = iwch_alloc_mr; | 1462 | dev->ibdev.alloc_mr = iwch_alloc_mr; |
1485 | dev->ibdev.map_mr_sg = iwch_map_mr_sg; | 1463 | dev->ibdev.map_mr_sg = iwch_map_mr_sg; |
1486 | dev->ibdev.alloc_fast_reg_page_list = iwch_alloc_fastreg_pbl; | ||
1487 | dev->ibdev.free_fast_reg_page_list = iwch_free_fastreg_pbl; | ||
1488 | dev->ibdev.attach_mcast = iwch_multicast_attach; | 1464 | dev->ibdev.attach_mcast = iwch_multicast_attach; |
1489 | dev->ibdev.detach_mcast = iwch_multicast_detach; | 1465 | dev->ibdev.detach_mcast = iwch_multicast_detach; |
1490 | dev->ibdev.process_mad = iwch_process_mad; | 1466 | dev->ibdev.process_mad = iwch_process_mad; |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index a09ea538e990..d0548fc6395e 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c | |||
@@ -189,48 +189,6 @@ static int build_memreg(union t3_wr *wqe, struct ib_reg_wr *wr, | |||
189 | return 0; | 189 | return 0; |
190 | } | 190 | } |
191 | 191 | ||
192 | static int build_fastreg(union t3_wr *wqe, struct ib_send_wr *send_wr, | ||
193 | u8 *flit_cnt, int *wr_cnt, struct t3_wq *wq) | ||
194 | { | ||
195 | struct ib_fast_reg_wr *wr = fast_reg_wr(send_wr); | ||
196 | int i; | ||
197 | __be64 *p; | ||
198 | |||
199 | if (wr->page_list_len > T3_MAX_FASTREG_DEPTH) | ||
200 | return -EINVAL; | ||
201 | *wr_cnt = 1; | ||
202 | wqe->fastreg.stag = cpu_to_be32(wr->rkey); | ||
203 | wqe->fastreg.len = cpu_to_be32(wr->length); | ||
204 | wqe->fastreg.va_base_hi = cpu_to_be32(wr->iova_start >> 32); | ||
205 | wqe->fastreg.va_base_lo_fbo = cpu_to_be32(wr->iova_start & 0xffffffff); | ||
206 | wqe->fastreg.page_type_perms = cpu_to_be32( | ||
207 | V_FR_PAGE_COUNT(wr->page_list_len) | | ||
208 | V_FR_PAGE_SIZE(wr->page_shift-12) | | ||
209 | V_FR_TYPE(TPT_VATO) | | ||
210 | V_FR_PERMS(iwch_ib_to_tpt_access(wr->access_flags))); | ||
211 | p = &wqe->fastreg.pbl_addrs[0]; | ||
212 | for (i = 0; i < wr->page_list_len; i++, p++) { | ||
213 | |||
214 | /* If we need a 2nd WR, then set it up */ | ||
215 | if (i == T3_MAX_FASTREG_FRAG) { | ||
216 | *wr_cnt = 2; | ||
217 | wqe = (union t3_wr *)(wq->queue + | ||
218 | Q_PTR2IDX((wq->wptr+1), wq->size_log2)); | ||
219 | build_fw_riwrh((void *)wqe, T3_WR_FASTREG, 0, | ||
220 | Q_GENBIT(wq->wptr + 1, wq->size_log2), | ||
221 | 0, 1 + wr->page_list_len - T3_MAX_FASTREG_FRAG, | ||
222 | T3_EOP); | ||
223 | |||
224 | p = &wqe->pbl_frag.pbl_addrs[0]; | ||
225 | } | ||
226 | *p = cpu_to_be64((u64)wr->page_list->page_list[i]); | ||
227 | } | ||
228 | *flit_cnt = 5 + wr->page_list_len; | ||
229 | if (*flit_cnt > 15) | ||
230 | *flit_cnt = 15; | ||
231 | return 0; | ||
232 | } | ||
233 | |||
234 | static int build_inv_stag(union t3_wr *wqe, struct ib_send_wr *wr, | 192 | static int build_inv_stag(union t3_wr *wqe, struct ib_send_wr *wr, |
235 | u8 *flit_cnt) | 193 | u8 *flit_cnt) |
236 | { | 194 | { |
@@ -457,11 +415,6 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, | |||
457 | if (!qhp->wq.oldest_read) | 415 | if (!qhp->wq.oldest_read) |
458 | qhp->wq.oldest_read = sqp; | 416 | qhp->wq.oldest_read = sqp; |
459 | break; | 417 | break; |
460 | case IB_WR_FAST_REG_MR: | ||
461 | t3_wr_opcode = T3_WR_FASTREG; | ||
462 | err = build_fastreg(wqe, wr, &t3_wr_flit_cnt, | ||
463 | &wr_cnt, &qhp->wq); | ||
464 | break; | ||
465 | case IB_WR_REG_MR: | 418 | case IB_WR_REG_MR: |
466 | t3_wr_opcode = T3_WR_FASTREG; | 419 | t3_wr_opcode = T3_WR_FASTREG; |
467 | err = build_memreg(wqe, reg_wr(wr), &t3_wr_flit_cnt, | 420 | err = build_memreg(wqe, reg_wr(wr), &t3_wr_flit_cnt, |