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
(cherry picked from commit fec0e2064818f991867c9851a837012ea31774da)
This commit is contained in:
Sreekanth Reddy 2025-04-04 14:21:01 +05:30 committed by Warner Losh
parent 4ed8c41831
commit 47a360ff22

View file

@ -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));