git: 9282f04ff0ee - main - cxgbe(4): dump_devlog should never fail silently.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Mar 2022 20:06:16 UTC
The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=9282f04ff0ee89cc4064e510f7fa505cfc890bf0 commit 9282f04ff0ee89cc4064e510f7fa505cfc890bf0 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2022-03-07 19:17:05 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2022-03-07 20:05:48 +0000 cxgbe(4): dump_devlog should never fail silently. Do the same thing as dump_cimla and log a warning on failure. MFC after: 3 days Sponsored by: Chelsio Communications --- 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 dafbdfede158..59da0acc6c86 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -9447,8 +9447,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);