Commit 866422cd authored by Yonatan Nachum's avatar Yonatan Nachum Committed by Jason Gunthorpe

RDMA/efa: Fix unsupported page sizes in device

Device uses 4KB size blocks for user pages indirect list while the
driver creates those blocks with the size of PAGE_SIZE of the kernel. On
kernels with PAGE_SIZE different than 4KB (ARM RHEL), this leads to a
failure on register MR with indirect list because of the miss
communication between driver and device.

Fixes: 40909f66 ("RDMA/efa: Add EFA verbs implementation")
Link: https://lore.kernel.org/r/20230511115103.13876-1-ynachum@amazon.comReviewed-by: default avatarFiras Jahjah <firasj@amazon.com>
Reviewed-by: default avatarMichael Margolin <mrgolin@amazon.com>
Signed-off-by: default avatarYonatan Nachum <ynachum@amazon.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent b5f3fe27
......@@ -1403,7 +1403,7 @@ static int pbl_continuous_initialize(struct efa_dev *dev,
*/
static int pbl_indirect_initialize(struct efa_dev *dev, struct pbl_context *pbl)
{
u32 size_in_pages = DIV_ROUND_UP(pbl->pbl_buf_size_in_bytes, PAGE_SIZE);
u32 size_in_pages = DIV_ROUND_UP(pbl->pbl_buf_size_in_bytes, EFA_CHUNK_PAYLOAD_SIZE);
struct scatterlist *sgl;
int sg_dma_cnt, err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment