Skip to content

Commit 04a347c

Browse files
RDMA/mana_ib: use the correct page size for mapping user-mode doorbell page
jira LE-3812 commit-author Long Li <[email protected]> commit 4a3b99b When mapping doorbell page from user-mode, the driver should use the system page size as this memory is allocated via mmap() from user-mode. Cc: [email protected] Fixes: 0266a17 ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter") Signed-off-by: Long Li <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Leon Romanovsky <[email protected]> (cherry picked from commit 4a3b99b) Signed-off-by: Shreeya Patel <[email protected]>
1 parent e849aad commit 04a347c

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

drivers/infiniband/hw/mana/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,13 +460,13 @@ int mana_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vma)
460460
PAGE_SHIFT;
461461
prot = pgprot_writecombine(vma->vm_page_prot);
462462

463-
ret = rdma_user_mmap_io(ibcontext, vma, pfn, gc->db_page_size, prot,
463+
ret = rdma_user_mmap_io(ibcontext, vma, pfn, PAGE_SIZE, prot,
464464
NULL);
465465
if (ret)
466466
ibdev_dbg(ibdev, "can't rdma_user_mmap_io ret %d\n", ret);
467467
else
468-
ibdev_dbg(ibdev, "mapped I/O pfn 0x%llx page_size %u, ret %d\n",
469-
pfn, gc->db_page_size, ret);
468+
ibdev_dbg(ibdev, "mapped I/O pfn 0x%llx page_size %lu, ret %d\n",
469+
pfn, PAGE_SIZE, ret);
470470

471471
return ret;
472472
}

0 commit comments

Comments
 (0)