Date: Wed, 9 Mar 2022 22:59:00 GMT From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8824cbace389 - stable/13 - cxgbe(4): dump_devlog should never fail silently. Message-ID: <202203092259.229Mx0kP024050@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=8824cbace389c440394bb9ea6c127d0f8f85538b commit 8824cbace389c440394bb9ea6c127d0f8f85538b Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2022-03-07 19:17:05 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2022-03-09 22:45:11 +0000 cxgbe(4): dump_devlog should never fail silently. Do the same thing as dump_cimla and log a warning on failure. Sponsored by: Chelsio Communications (cherry picked from commit 9282f04ff0ee89cc4064e510f7fa505cfc890bf0) --- sys/dev/cxgbe/t4_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index a9549abb48bb..2db23d218366 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -9500,8 +9500,11 @@ dump_devlog(struct adapter *sc) int rc; struct sbuf sb; - if (sbuf_new(&sb, NULL, 4096, SBUF_AUTOEXTEND) != &sb) + if (sbuf_new(&sb, NULL, 4096, SBUF_AUTOEXTEND) != &sb) { + log(LOG_DEBUG, "%s: failed to generate devlog dump.\n", + device_get_nameunit(sc->dev)); return; + } rc = sbuf_devlog(sc, &sb, M_NOWAIT); if (rc == 0) { rc = sbuf_finish(&sb);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203092259.229Mx0kP024050>