Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2023 21:10:21 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 3cd49bc5b33f - stable/14 - nvme: Supress noise messages
Message-ID:  <202309282110.38SLALDD048754@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=3cd49bc5b33fed7c305bfbf4b0c014520e65bc02

commit 3cd49bc5b33fed7c305bfbf4b0c014520e65bc02
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-09-28 20:46:01 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-09-28 21:05:15 +0000

    nvme: Supress noise messages
    
    When we're suspending, we get messages about waiting for the controller
    to reset. These are in error: we're not waiting for it to reset. We put
    the recovery state as part of suspending, so we should suppress these as
    a false positive.
    
    Also remove a stray debug that's left over from earlier versions of
    the recovery code that no longer makes sense.
    
    Sponsored by:           Netflix
    
    (cherry picked from commit 1d6021cd72689f54093af4ed77066a2f8abde664)
---
 sys/dev/nvme/nvme_qpair.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
index 9806096de81d..cd0057f444b8 100644
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -1104,13 +1104,20 @@ nvme_qpair_timeout(void *arg)
 		nvme_printf(ctrlr, "Resetting controller due to a timeout%s.\n",
 		    (csts == 0xffffffff) ? " and possible hot unplug" :
 		    (cfs ? " and fatal error status" : ""));
-		nvme_printf(ctrlr, "RECOVERY_WAITING\n");
 		qpair->recovery_state = RECOVERY_WAITING;
 		nvme_ctrlr_reset(ctrlr);
 		idle = false;			/* We want to keep polling */
 		break;
 	case RECOVERY_WAITING:
-		nvme_printf(ctrlr, "Waiting for reset to complete\n");
+		/*
+		 * These messages aren't interesting while we're suspended. We
+		 * put the queues into waiting state while
+		 * suspending. Suspending takes a while, so we'll see these
+		 * during that time and they aren't diagnostic. At other times,
+		 * they indicate a problem that's worth complaining about.
+		 */
+		if (!device_is_suspended(ctrlr->dev))
+			nvme_printf(ctrlr, "Waiting for reset to complete\n");
 		idle = false;		/* We want to keep polling */
 		break;
 	case RECOVERY_FAILED:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309282110.38SLALDD048754>