git: 4c293e01fd2a - main - if_bnxt: Support backing store v2 for Thor if FW supports it
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Oct 2026 10:12:35 UTC
The branch main has been updated by ssaxena:
URL: https://cgit.FreeBSD.org/src/commit/?id=4c293e01fd2a8a3adb3fbac12e7ce40db84ed734
commit 4c293e01fd2a8a3adb3fbac12e7ce40db84ed734
Author: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
AuthorDate: 2026-07-21 06:55:15 +0000
Commit: Sumit Saxena <ssaxena@FreeBSD.org>
CommitDate: 2026-10-09 08:24:43 +0000
if_bnxt: Support backing store v2 for Thor if FW supports it
The driver currently only supports BS v1 for Thor even though the
firmware supports v2, capping max_mr at ~192K when firmware can
support up to ~256K. Enable Backing Store v2 support for the Thor controller.
Reviewed by: gallatin
MFC after: 2 weeks
Sponsored by: Broadcom Inc.
Differential Revision: https://reviews.freebsd.org/D58601
---
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c | 9 ++++-----
sys/dev/bnxt/bnxt_en/if_bnxt.c | 8 +++-----
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
index 6d5785a6fd5e..2649100e9b86 100644
--- a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
+++ b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
@@ -490,10 +490,8 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt_softc *softc)
if (softc->hwrm_spec_code < 0x10902 || softc->ctx_mem)
return 0;
- if (BNXT_CHIP_P7(softc)) {
- if (softc->fw_cap & BNXT_FW_CAP_BACKING_STORE_V2)
- return bnxt_hwrm_func_backing_store_qcaps_v2(softc);
- }
+ if (softc->fw_cap & BNXT_FW_CAP_BACKING_STORE_V2)
+ return bnxt_hwrm_func_backing_store_qcaps_v2(softc);
if (BNXT_VF(softc))
return 0;
@@ -1290,7 +1288,8 @@ bnxt_hwrm_func_qcaps(struct bnxt_softc *softc)
flags_ext & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_DBR_PACING_SUPPORTED)
softc->fw_cap |= BNXT_FW_CAP_DBR_PACING_SUPPORTED;
- if (flags_ext2 & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED)
+ if (BNXT_CHIP_P5_PLUS(softc) &&
+ flags_ext2 & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED)
softc->fw_cap |= BNXT_FW_CAP_SW_MAX_RESOURCE_LIMITS;
if (flags_ext2 & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_GENERIC_STATS_SUPPORTED)
diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c
index 098fb0685dd3..79773ca6e427 100644
--- a/sys/dev/bnxt/bnxt_en/if_bnxt.c
+++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c
@@ -1466,12 +1466,10 @@ skip_rdma:
ena |= HWRM_FUNC_BACKING_STORE_CFG_INPUT_DFLT_ENABLES;
skip_legacy:
- if (BNXT_CHIP_P7(softc)) {
- if (softc->fw_cap & BNXT_FW_CAP_BACKING_STORE_V2)
- rc = bnxt_backing_store_cfg_v2(softc, ena);
- } else {
+ if (softc->fw_cap & BNXT_FW_CAP_BACKING_STORE_V2)
+ rc = bnxt_backing_store_cfg_v2(softc, ena);
+ else
rc = bnxt_hwrm_func_backing_store_cfg(softc, ena);
- }
if (rc) {
device_printf(softc->dev, "Failed configuring context mem, rc = %d.\n",
rc);