]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/bnxt_re: Fix the inline size for GenP7 devices
authorSelvin Xavier <selvin.xavier@broadcom.com>
Thu, 20 Nov 2025 07:36:54 +0000 (23:36 -0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 24 Nov 2025 07:58:30 +0000 (02:58 -0500)
Inline size supported by the device is based on the number
of SGEs supported by the adapter. Change the inline
size calculation based on that.

Fixes: de1d364c3815 ("RDMA/bnxt_re: Add support for Variable WQE in Genp7 adapters")
Reviewed-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/1763624215-10382-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/bnxt_re/qplib_sp.c

index 9ef581ed785c82c2cc3b93dce9a840149dd7f727..a9afac2cbb7cfd186c82f758cf3043f6dc31d8a6 100644 (file)
@@ -162,7 +162,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw)
        attr->max_srq_wqes = le32_to_cpu(sb->max_srq_wr) - 1;
        attr->max_srq_sges = sb->max_srq_sge;
        attr->max_pkey = 1;
-       attr->max_inline_data = le32_to_cpu(sb->max_inline_data);
+       attr->max_inline_data = attr->max_qp_sges * sizeof(struct sq_sge);
        if (!bnxt_qplib_is_chip_gen_p7(rcfw->res->cctx))
                attr->l2_db_size = (sb->l2_db_space_size + 1) *
                                    (0x01 << RCFW_DBR_BASE_PAGE_SHIFT);