projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d524185
)
mlx5: Fix mlx5_ib_map_mr_sg mr length
author
Sagi Grimberg
<
[email protected]
>
Sun, 23 Apr 2017 11:31:42 +0000
(14:31 +0300)
committer
Doug Ledford
<
[email protected]
>
Mon, 1 May 2017 18:56:07 +0000
(14:56 -0400)
In case we got an initial sg_offset, we need to
account for it in the mr length.
Cc:
[email protected]
Fixes: ff2ba9936591 ("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]
>
drivers/infiniband/hw/mlx5/mr.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mlx5/mr.c
b/drivers/infiniband/hw/mlx5/mr.c
index 93c0e82aa4913d112ee14b3d1d613563f04f7a86..366433f71b588e4c43a41c030f4840df9a17f528 100644
(file)
--- a/
drivers/infiniband/hw/mlx5/mr.c
+++ b/
drivers/infiniband/hw/mlx5/mr.c
@@
-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;
}