Cap the NQ count for P7 devices.
Driver does not need a high NQ ring count anyway since we operate in
poll mode.

Signed-off-by: Ajit Khaparde <ajit.khapa...@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.pura...@broadcom.com>
Reviewed-by: Damodharam Ammepalli <damodharam.ammepa...@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 1cc2c532dd..e56f7693af 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1237,7 +1237,10 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
        else
                bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
        bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
-       bp->max_nq_rings = rte_le_to_cpu_16(resp->max_msix);
+       if (BNXT_CHIP_P7(bp))
+               bp->max_nq_rings = BNXT_P7_MAX_NQ_RING_CNT;
+       else
+               bp->max_nq_rings = rte_le_to_cpu_16(resp->max_msix);
        bp->vf_resv_strategy = rte_le_to_cpu_16(resp->vf_reservation_strategy);
        if (bp->vf_resv_strategy >
            HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MINIMAL_STATIC)
-- 
2.39.2 (Apple Git-143)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to