diff options
author | Yonatan Nachum <ynachum@amazon.com> | 2023-05-11 11:51:03 +0000 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-05-16 21:13:22 -0300 |
commit | 866422cdddcdf59d8c68e9472d49ba1be29b5fcf (patch) | |
tree | 67dc537b00f2fdf321edf467ce59a8245bc125b8 /drivers/infiniband/hw | |
parent | b5f3fe27c54b1fe77d4dd834ccd48a6d694f872e (diff) | |
download | linux-stable-866422cdddcdf59d8c68e9472d49ba1be29b5fcf.tar.gz linux-stable-866422cdddcdf59d8c68e9472d49ba1be29b5fcf.tar.bz2 linux-stable-866422cdddcdf59d8c68e9472d49ba1be29b5fcf.zip |
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: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation")
Link: https://lore.kernel.org/r/20230511115103.13876-1-ynachum@amazon.com
Reviewed-by: Firas Jahjah <firasj@amazon.com>
Reviewed-by: Michael Margolin <mrgolin@amazon.com>
Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/efa/efa_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index 8eca6c14d0cf..2a195c4b0f17 100644 --- a/drivers/infiniband/hw/efa/efa_verbs.c +++ b/drivers/infiniband/hw/efa/efa_verbs.c @@ -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; |