git: fec0e2064818 - main - bnxt_en: Thor2 Ring counters not incrementing during traffic
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 23 Apr 2025 22:43:33 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=fec0e2064818f991867c9851a837012ea31774da
commit fec0e2064818f991867c9851a837012ea31774da
Author: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
AuthorDate: 2025-04-04 08:51:01 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-04-23 22:42:48 +0000
bnxt_en: Thor2 Ring counters not incrementing during traffic
The ctx_hw_stats_ext DMA address was not correctly passed to the
firmware during the HWRM_STAT_CTX_ALLOC allocation, causing stats to not
populate for Thor2. Passing the correct DMA length resolved the issue
MFC-After: 3 days
Differential-Revision: https://reviews.freebsd.org/D49732
---
sys/dev/bnxt/bnxt_en/bnxt_hwrm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
index 10c3beac9729..7dd555cfaadb 100644
--- a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
+++ b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c
@@ -1885,7 +1885,10 @@ bnxt_hwrm_stat_ctx_alloc(struct bnxt_softc *softc, struct bnxt_cp_ring *cpr,
req.update_period_ms = htole32(1000);
req.stats_dma_addr = htole64(paddr);
- if (BNXT_CHIP_P5_PLUS(softc))
+
+ if (BNXT_CHIP_P7(softc))
+ req.stats_dma_length = htole16(sizeof(struct ctx_hw_stats_ext));
+ else if (BNXT_CHIP_P5(softc))
req.stats_dma_length = htole16(sizeof(struct ctx_hw_stats_ext) - 8);
else
req.stats_dma_length = htole16(sizeof(struct ctx_hw_stats));