]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme-pci: try function level reset on init failure
authorKeith Busch <kbusch@kernel.org>
Tue, 15 Jul 2025 19:16:27 +0000 (12:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:14 +0000 (16:28 +0200)
commit524ce0f943d754dc70e2e4f9ca9607d9b61caaed
tree33cfbde5267b5fb92a4685e7f765672b383d288d
parent1e858a7a51c7b8b009d8f246de7ceb7743b44a71
nvme-pci: try function level reset on init failure

[ Upstream commit 5b2c214a95942f7997d1916a4c44017becbc3cac ]

NVMe devices from multiple vendors appear to get stuck in a reset state
that we can't get out of with an NVMe level Controller Reset. The kernel
would report these with messages that look like:

  Device not ready; aborting reset, CSTS=0x1

These have historically required a power cycle to make them usable
again, but in many cases, a PCIe FLR is sufficient to restart operation
without a power cycle. Try it if the initial controller reset fails
during any nvme reset attempt.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/pci.c