]> www.infradead.org Git - nvme.git/commitdiff
nvme: fixup scan failure for non-ANA multipath controllers
authorHannes Reinecke <hare@kernel.org>
Mon, 14 Apr 2025 12:05:09 +0000 (14:05 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 16 Apr 2025 05:37:36 +0000 (07:37 +0200)
Commit 62baf70c3274 caused the ANA log page to be re-read, even on
controllers that do not support ANA.  While this should generally
harmless, some controllers hang on the unsupported log page and
never finish probing.

Fixes: 62baf70c3274 ("nvme: re-read ANA log page after ns scan completes")
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Tested-by: Srikanth Aithal <sraithal@amd.com>
[hch: more detailed commit message]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/core.c

index b502ac07483ba839fcedd907238180ff8ea7ace8..eb6ea8acb3cca7421d7fb218e51d855f2c056825 100644 (file)
@@ -4300,7 +4300,7 @@ static void nvme_scan_work(struct work_struct *work)
        if (test_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events))
                nvme_queue_scan(ctrl);
 #ifdef CONFIG_NVME_MULTIPATH
-       else
+       else if (ctrl->ana_log_buf)
                /* Re-read the ANA log page to not miss updates */
                queue_work(nvme_wq, &ctrl->ana_work);
 #endif