mirror-linux/drivers/nvme/host
Nilay Shroff 0edb475ac0 nvme: fix PCIe subsystem reset controller state transition
The commit d2fe192348 (“nvme: only allow entering LIVE from CONNECTING
state”) disallows controller state transitions directly from RESETTING
to LIVE. However, the NVMe PCIe subsystem reset path relies on this
transition to recover the controller on PowerPC (PPC) systems.

On PPC systems, issuing a subsystem reset causes a temporary loss of
communication with the NVMe adapter. A subsequent PCIe MMIO read then
triggers EEH recovery, which restores the PCIe link and brings the
controller back online. For EEH recovery to proceed correctly, the
controller must transition back to the LIVE state.

Due to the changes introduced by commit d2fe192348 (“nvme: only allow
entering LIVE from CONNECTING state”), the controller can no longer
transition directly from RESETTING to LIVE. As a result, EEH recovery
exits prematurely, leaving the controller stuck in the RESETTING state.

Fix this by explicitly transitioning the controller state from RESETTING
to CONNECTING and then to LIVE. This satisfies the updated state
transition rules and allows the controller to be successfully recovered
on PPC systems following a PCIe subsystem reset.

Cc: stable@vger.kernel.org
Fixes: d2fe192348 ("nvme: only allow entering LIVE from CONNECTING state")
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2026-01-14 07:21:31 -08:00
..
Kconfig block-6.16-20250606 2025-06-06 13:12:50 -07:00
Makefile nvme: rework NVME_AUTH Kconfig selection 2023-10-12 08:04:49 -07:00
apple.c nvme-apple: add "apple,t8103-nvme-ans2" as compatible 2026-01-09 06:55:09 -08:00
auth.c nvme-auth: use kvfree() for memory allocated with kvcalloc() 2025-12-04 14:46:17 -08:00
constants.c nvme: fix typo in status code constant for self-test in progress 2025-07-17 13:38:07 +02:00
core.c for-6.19/block-20251201 2025-12-03 19:26:18 -08:00
fabrics.c nvme-fabrics: add ENOKEY to no retry criteria for authentication failures 2025-12-04 14:46:17 -08:00
fabrics.h nvme: remove virtual boundary for sgl capable devices 2025-11-06 18:11:58 -07:00
fault_inject.c fault-inject: improve build for CONFIG_FAULT_INJECTION=n 2024-09-01 20:43:33 -07:00
fc.c nvme-fc: release admin tagset if init fails 2026-01-09 06:55:12 -08:00
fc.h
hwmon.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ioctl.c block: use bio_alloc_bioset for passthru IO by default 2025-12-04 07:18:54 -07:00
multipath.c for-6.19/block-20251201 2025-12-03 19:26:18 -08:00
nvme.h nvme: remove virtual boundary for sgl capable devices 2025-11-06 18:11:58 -07:00
pci.c nvme: fix PCIe subsystem reset controller state transition 2026-01-14 07:21:31 -08:00
pr.c nvme: reject invalid pr_read_keys() num_keys values 2025-12-04 07:19:26 -07:00
rdma.c nvme: remove virtual boundary for sgl capable devices 2025-11-06 18:11:58 -07:00
sysfs.c for-6.16/block-20250523 2025-05-26 11:39:36 -07:00
tcp.c for-6.19/block-20251201 2025-12-03 19:26:18 -08:00
trace.c nvme: parse reservation commands's action and rtype to string 2024-11-13 08:51:24 -08:00
trace.h nvme: fix async event trace event 2023-04-13 08:59:04 +02:00
zns.c block: introduce disk_report_zone() 2025-11-05 08:07:21 -07:00