diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-10-13 19:11:39 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-10-29 05:27:19 +0300 |
commit | f7f7aab1a5c0a495ae9a2d604badd1e3f9f20795 (patch) | |
tree | d25ef9d2789c083d8a3fc2b746f89eb690aca164 /drivers/infiniband/ulp/srp/ib_srp.h | |
parent | 26630e8a09b72e8783e8963781d39e7edb2a60b9 (diff) | |
download | linux-f7f7aab1a5c0a495ae9a2d604badd1e3f9f20795.tar.xz |
IB/srp: Convert to new registration API
Instead of constructing a page list, call ib_map_mr_sg
and post a new ib_reg_wr. srp_map_finish_fr now returns
the number of sg elements registered.
Remove srp_finish_mapping since no one is calling it.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Tested-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/srp/ib_srp.h')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h index 3608f2e4819c..87a2a919dc43 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.h +++ b/drivers/infiniband/ulp/srp/ib_srp.h @@ -242,7 +242,6 @@ struct srp_iu { struct srp_fr_desc { struct list_head entry; struct ib_mr *mr; - struct ib_fast_reg_page_list *frpl; }; /** @@ -294,11 +293,17 @@ struct srp_map_state { } gen; }; struct srp_direct_buf *desc; - u64 *pages; + union { + u64 *pages; + struct scatterlist *sg; + }; dma_addr_t base_dma_addr; u32 dma_len; u32 total_len; - unsigned int npages; + union { + unsigned int npages; + int sg_nents; + }; unsigned int nmdesc; unsigned int ndesc; }; |