]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerChristoph Hellwig <hch@lst.de>
Thu, 17 Jul 2025 15:46:33 +0000 (17:46 +0200)
commit5b2c214a95942f7997d1916a4c44017becbc3cac
treeee04bae5c7f948c90060a469ddd09adf83a36651
parent746d0ac5a07d5da952ef258dd4d75f0b26c96476
nvme-pci: try function level reset on init failure

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>
drivers/nvme/host/pci.c