Skip to content

Commit 14ed480

Browse files
shreeya-patel98PlaidCat
authored andcommitted
RDMA/mana_ib: Fix bug in creation of dma regions
jira LE-3812 commit-author Konstantin Taranov <[email protected]> commit e02497f Use ib_umem_dma_offset() helper to calculate correct dma offset. Fixes: 0266a17 ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter") Signed-off-by: Konstantin Taranov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]> (cherry picked from commit e02497f) Signed-off-by: Shreeya Patel <[email protected]> Signed-off-by: Jonathan Maple <[email protected]>
1 parent 4462a36 commit 14ed480

File tree

1 file changed

+1
-1
lines changed
  • drivers/infiniband/hw/mana

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mana/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ int mana_ib_gd_create_dma_region(struct mana_ib_dev *dev, struct ib_umem *umem,
358358
sizeof(struct gdma_create_dma_region_resp));
359359

360360
create_req->length = umem->length;
361-
create_req->offset_in_page = umem->address & (page_sz - 1);
361+
create_req->offset_in_page = ib_umem_dma_offset(umem, page_sz);
362362
create_req->gdma_page_type = order_base_2(page_sz) - PAGE_SHIFT;
363363
create_req->page_count = num_pages_total;
364364

0 commit comments

Comments
 (0)