Skip to content

Commit 1596b89

Browse files
shreeya-patel98PlaidCat
authored andcommitted
RDMA/mana_ib: Fix bug in creation of dma regions
jira LE-3812 commit-author Konstantin Taranov <kotaranov@microsoft.com> 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 <kotaranov@microsoft.com> Link: https://lore.kernel.org/r/1709560361-26393-2-git-send-email-kotaranov@linux.microsoft.com Signed-off-by: Leon Romanovsky <leon@kernel.org> (cherry picked from commit e02497f) Signed-off-by: Shreeya Patel <spatel@ciq.com> Signed-off-by: Jonathan Maple <jmaple@ciq.com> Signed-off-by: Shreeya Patel <spatel@ciq.com> Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 8ccf7af commit 1596b89

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)