diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2016-05-12 20:49:15 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-05-13 20:37:57 +0300 |
commit | 9aa8b3217ed3c13d4e3496020b140da0e6f49a08 (patch) | |
tree | 4bf6441f7c72dcd7f07c15091e1212512446e680 /drivers/infiniband/hw/nes/nes_verbs.c | |
parent | f83b2561a6d4ff12959660ad597580097b744941 (diff) | |
download | linux-9aa8b3217ed3c13d4e3496020b140da0e6f49a08.tar.xz |
IB/core: Enhance ib_map_mr_sg()
The SRP initiator allows to set max_sectors to a value that exceeds
the largest amount of data that can be mapped at once with an mlx4
HCA using fast registration and a page size of 4 KB. Hence modify
ib_map_mr_sg() such that it can map partial sg-elements. If an
sg-element has been mapped partially, let the caller know
which fraction has been mapped by adjusting *sg_offset.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 698aab65a286..4ebea4c8c9b5 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -403,7 +403,7 @@ static int nes_set_page(struct ib_mr *ibmr, u64 addr) } static int nes_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, - int sg_nents, unsigned int sg_offset) + int sg_nents, unsigned int *sg_offset) { struct nes_mr *nesmr = to_nesmr(ibmr); |