diff options
author | Konstantin Taranov <kotaranov@microsoft.com> | 2024-03-04 16:52:40 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2024-03-27 01:17:25 +0300 |
commit | 2e7121552e3c84092e8f039c655224f2ded6abea (patch) | |
tree | c76a3c53b1e98c843d005060e171e795c3c0ef88 /drivers | |
parent | d98b5634cd1cb19b894884cfcbed78ace72fbe5d (diff) | |
download | linux-2e7121552e3c84092e8f039c655224f2ded6abea.tar.xz |
RDMA/mana_ib: Fix bug in creation of dma regions
[ Upstream commit e02497fb654689049ba8b46f098f17d5f19e0b3c ]
Use ib_umem_dma_offset() helper to calculate correct dma offset.
Fixes: 0266a177631d ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mana/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c index faca092456fa..7840c9e2631c 100644 --- a/drivers/infiniband/hw/mana/main.c +++ b/drivers/infiniband/hw/mana/main.c @@ -358,7 +358,7 @@ int mana_ib_gd_create_dma_region(struct mana_ib_dev *dev, struct ib_umem *umem, sizeof(struct gdma_create_dma_region_resp)); create_req->length = umem->length; - create_req->offset_in_page = umem->address & (page_sz - 1); + create_req->offset_in_page = ib_umem_dma_offset(umem, page_sz); create_req->gdma_page_type = order_base_2(page_sz) - PAGE_SHIFT; create_req->page_count = num_pages_total; |