]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/bnxt_re: Fix allocation of QP table
authorKashyap Desai <kashyap.desai@broadcom.com>
Mon, 3 Mar 2025 16:59:36 +0000 (08:59 -0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 3 Mar 2025 19:18:04 +0000 (14:18 -0500)
commit82f1f575aa13a66906aff05ab05ffe757227b95f
treea8aaaeb4e9b82088b6c63fb38ec1f3b9eff425cd
parent8ce2eb9dfac8743d1c423b86339336a5b6a6069e
RDMA/bnxt_re: Fix allocation of QP table

Driver is creating QP table too early while probing before
querying firmware capabilities. Driver currently is using
a hard coded values of 64K as size while creating QP table.
This resulted in a crash when firmwre supported QP count is
more than 64K.

To fix the issue, move the QP tabel creation after the firmware
capabilities are queried. Use the firmware returned maximum value
of QPs while creating the QP table.

Fixes: b1b66ae094cd ("bnxt_en: Use FW defined resource limits for RoCE")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/1741021178-2569-2-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/bnxt_re.h
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h
drivers/infiniband/hw/bnxt_re/qplib_res.c
drivers/infiniband/hw/bnxt_re/qplib_res.h