git: fd737810a163 - stable/15 - nvme: Fix backwards sense of error condition

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 19 Nov 2025 04:13:21 UTC
The branch stable/15 has been updated by imp:

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

commit fd737810a16329449d9ceb1e77e5429fdbb51953
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-11-18 20:07:11 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-11-19 04:10:52 +0000

    nvme: Fix backwards sense of error condition
    
    b21e67875bf0c tested for the good condition, not the error condition, so
    we'd never do anything else in this function. This was causing certain
    logging not to happen, and also prevented forthcoming namespace size
    change code from working as well.
    
    Fixes: b21e67875bf0c
    Sponsored by: Netflix
    (cherry picked from commit 27481c268916b0790c7ad16202a5b012625ce1a8)
---
 sys/dev/nvme/nvme_ctrlr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index 6ed9cb33f991..07c1bcdfbf08 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1153,7 +1153,7 @@ nvme_ctrlr_aer_task(void *arg, int pending)
 		mtx_sleep(aer, &aer->mtx, PRIBIO, "nvme_pt", 0);
 	mtx_unlock(&aer->mtx);
 
-	if (aer->log_page_size != (uint32_t)-1) {
+	if (aer->log_page_size == (uint32_t)-1) {
 		/*
 		 * If the log page fetch for some reason completed with an
 		 * error, don't pass log page data to the consumers.  In