Skip to content

Commit e02497f

Browse files
Konstantin Taranovrleon
authored andcommitted
RDMA/mana_ib: Fix bug in creation of dma regions
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]>
1 parent 124a9fb commit e02497f

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
@@ -348,7 +348,7 @@ int mana_ib_gd_create_dma_region(struct mana_ib_dev *dev, struct ib_umem *umem,
348348
sizeof(struct gdma_create_dma_region_resp));
349349

350350
create_req->length = umem->length;
351-
create_req->offset_in_page = umem->address & (page_sz - 1);
351+
create_req->offset_in_page = ib_umem_dma_offset(umem, page_sz);
352352
create_req->gdma_page_type = order_base_2(page_sz) - PAGE_SHIFT;
353353
create_req->page_count = num_pages_total;
354354

0 commit comments

Comments
 (0)