aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2025-11-18 13:07:11 -0700
committerColin Percival <cperciva@FreeBSD.org>2025-11-19 13:37:05 -0800
commit7b31e6a121c788829d5546f6474a250770c1609e (patch)
tree4bc3ed98a464863b04773c6a0bc9007774142982
parentc30f4ada165c85a25f782549b84efc3b3e655ecd (diff)
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. Approved by: re (cperciva) Fixes: b21e67875bf0c Sponsored by: Netflix (cherry picked from commit 27481c268916b0790c7ad16202a5b012625ce1a8) (cherry picked from commit fd737810a16329449d9ceb1e77e5429fdbb51953)
-rw-r--r--sys/dev/nvme/nvme_ctrlr.c2
1 files changed, 1 insertions, 1 deletions
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