Skip to content

Commit 3d70e0f

Browse files
kaleshap86rleon
authored andcommitted
RDMA/bnxt_re: Fix to use correct page size for PDE table
In bnxt_qplib_alloc_init_hwq(), while allocating memory for PDE table driver incorrectly is using the "pg_size" value passed to the function. Fixed to use the right value 4K. Also, fixed the allocation size for PBL table. Fixes: 0c4dcd6 ("RDMA/bnxt_re: Refactor hardware queue memory allocation") Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/20251223131855.145955-1-kalesh-anakkur.purayil@broadcom.com Reviewed-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 9b68a1c commit 3d70e0f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/infiniband/hw/bnxt_re/qplib_res.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@ int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq,
237237
if (npbl % BIT(MAX_PDL_LVL_SHIFT))
238238
npde++;
239239
/* Alloc PDE pages */
240-
sginfo.pgsize = npde * pg_size;
240+
sginfo.pgsize = npde * ROCE_PG_SIZE_4K;
241241
sginfo.npages = 1;
242242
rc = __alloc_pbl(res, &hwq->pbl[PBL_LVL_0], &sginfo);
243243
if (rc)
244244
goto fail;
245245

246246
/* Alloc PBL pages */
247247
sginfo.npages = npbl;
248-
sginfo.pgsize = PAGE_SIZE;
248+
sginfo.pgsize = ROCE_PG_SIZE_4K;
249249
rc = __alloc_pbl(res, &hwq->pbl[PBL_LVL_1], &sginfo);
250250
if (rc)
251251
goto fail;

0 commit comments

Comments
 (0)