]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: handle connectivity loss in nvme_set_queue_count
authorDaniel Wagner <wagi@kernel.org>
Thu, 9 Jan 2025 13:30:48 +0000 (14:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:21 +0000 (12:50 +0100)
commit51df156e04e56a029406111508785dd52aa7e239
tree09a029882abfabdf16d97811a595ec523ab4bba8
parentcf30300a216a4f8dce94e11781a866a09d4b50d4
nvme: handle connectivity loss in nvme_set_queue_count

[ Upstream commit 294b2b7516fd06a8dd82e4a6118f318ec521e706 ]

When the set feature attempts fails with any NVME status code set in
nvme_set_queue_count, the function still report success. Though the
numbers of queues set to 0. This is done to support controllers in
degraded state (the admin queue is still up and running but no IO
queues).

Though there is an exception. When nvme_set_features reports an host
path error, nvme_set_queue_count should propagate this error as the
connectivity is lost, which means also the admin queue is not working
anymore.

Fixes: 9a0be7abb62f ("nvme: refactor set_queue_count")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c