Skip to content

Commit e6594b7

Browse files
RDMA/mana_ib: use the correct page size for mapping user-mode doorbell page
jira LE-3813 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 180c530 commit e6594b7

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
@@ -511,13 +511,13 @@ int mana_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vma)
511511
PAGE_SHIFT;
512512
prot = pgprot_writecombine(vma->vm_page_prot);
513513

514-
ret = rdma_user_mmap_io(ibcontext, vma, pfn, gc->db_page_size, prot,
514+
ret = rdma_user_mmap_io(ibcontext, vma, pfn, PAGE_SIZE, prot,
515515
NULL);
516516
if (ret)
517517
ibdev_dbg(ibdev, "can't rdma_user_mmap_io ret %d\n", ret);
518518
else
519-
ibdev_dbg(ibdev, "mapped I/O pfn 0x%llx page_size %u, ret %d\n",
520-
pfn, gc->db_page_size, ret);
519+
ibdev_dbg(ibdev, "mapped I/O pfn 0x%llx page_size %lu, ret %d\n",
520+
pfn, PAGE_SIZE, ret);
521521

522522
return ret;
523523
}

0 commit comments

Comments
 (0)