From owner-dev-commits-src-main@freebsd.org Tue Sep 7 23:53:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4923266FAEF; Tue, 7 Sep 2021 23:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H42Cy1VfCz4SVr; Tue, 7 Sep 2021 23:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 132C31BD11; Tue, 7 Sep 2021 23:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 187NrnBT036442; Tue, 7 Sep 2021 23:53:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 187Nrn6C036441; Tue, 7 Sep 2021 23:53:49 GMT (envelope-from git) Date: Tue, 7 Sep 2021 23:53:49 GMT Message-Id: <202109072353.187Nrn6C036441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 92de73799666 - main - cxgbe(4): Fix the decode and display of the DBVFIFO region in meminfo. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92de737996660b70376a8b72b80037f89d876056 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2021 23:53:50 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=92de737996660b70376a8b72b80037f89d876056 commit 92de737996660b70376a8b72b80037f89d876056 Author: Navdeep Parhar AuthorDate: 2021-09-07 23:28:11 +0000 Commit: Navdeep Parhar 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++;