Date: Tue, 7 Sep 2021 23:53:49 GMT From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 92de73799666 - main - cxgbe(4): Fix the decode and display of the DBVFIFO region in meminfo. Message-ID: <202109072353.187Nrn6C036441@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=92de737996660b70376a8b72b80037f89d876056 commit 92de737996660b70376a8b72b80037f89d876056 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2021-09-07 23:28:11 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2021-09-07 23:28:11 +0000 cxgbe(4): Fix the decode and display of the DBVFIFO region in meminfo. MFC after: 1 week Sponsored by: Chelsio Communications --- 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 eabe52387227..af24977ec29b 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -9728,23 +9728,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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109072353.187Nrn6C036441>