mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
mlx5: Fix mlx5_ib_map_mr_sg mr length
In case we got an initial sg_offset, we need to
account for it in the mr length.
Cc: [email protected]
Fixes: ff2ba99365 ("IB/core: Add passing an offset into the SG to
ib_map_mr_sg")
Signed-off-by: Sagi Grimberg <[email protected]>
Tested-by: Israel Rukshin <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
d52418502e
commit
0a49f2c31c
1 changed files with 1 additions and 1 deletions
|
|
@ -1784,7 +1784,7 @@ mlx5_ib_sg_to_klms(struct mlx5_ib_mr *mr,
|
|||
klms[i].va = cpu_to_be64(sg_dma_address(sg) + sg_offset);
|
||||
klms[i].bcount = cpu_to_be32(sg_dma_len(sg) - sg_offset);
|
||||
klms[i].key = cpu_to_be32(lkey);
|
||||
mr->ibmr.length += sg_dma_len(sg);
|
||||
mr->ibmr.length += sg_dma_len(sg) - sg_offset;
|
||||
|
||||
sg_offset = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue