git: 38271e72919a - stable/13 - cxgbe(4): Fix the decode and display of the DBVFIFO region in meminfo.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 20 Oct 2021 17:50:34 UTC
The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=38271e72919a5ce1f38efc018eb270ab5a1c24af commit 38271e72919a5ce1f38efc018eb270ab5a1c24af Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2021-09-07 23:28:11 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2021-10-20 17:48:51 +0000 cxgbe(4): Fix the decode and display of the DBVFIFO region in meminfo. Sponsored by: Chelsio Communications (cherry picked from commit 92de737996660b70376a8b72b80037f89d876056) --- sys/dev/cxgbe/t4_main.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 853bc2b5d58a..eebba8afcb8c 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -9719,23 +9719,24 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) #undef ulp_region md->base = 0; - md->idx = nitems(region); - if (!is_t4(sc)) { + if (is_t4(sc)) + md->idx = nitems(region); + else { uint32_t size = 0; uint32_t sge_ctrl = t4_read_reg(sc, A_SGE_CONTROL2); uint32_t fifo_size = t4_read_reg(sc, A_SGE_DBVFIFO_SIZE); if (is_t5(sc)) { if (sge_ctrl & F_VFIFO_ENABLE) - size = G_DBVFIFO_SIZE(fifo_size); + size = fifo_size << 2; } else - size = G_T6_DBVFIFO_SIZE(fifo_size); + size = G_T6_DBVFIFO_SIZE(fifo_size) << 6; if (size) { - md->base = G_BASEADDR(t4_read_reg(sc, - A_SGE_DBVFIFO_BADDR)); - md->limit = md->base + (size << 2) - 1; - } + md->base = t4_read_reg(sc, A_SGE_DBVFIFO_BADDR); + md->limit = md->base + size - 1; + } else + md->idx = nitems(region); } md++;