diff options
| author | Yuho Choi <oss.patchbox@gmail.com> | 2026-10-22 00:58:18 -0400 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-11-06 10:13:45 -0800 |
| commit | 82dd68297483afdc3be48e9d77f2dc4adb7a6941 (patch) | |
| tree | 6c3a586e44ce6ed0b39c97eafc62ec287e446777 /tools/perf/scripts/python | |
| parent | 9b657c565984f28976b1e471e3ce2f81cc269238 (diff) | |
nvme-pci: shut down the controller if disabling the HMB fails on suspend
nvme_suspend() disables the host memory buffer before it moves the
controller to a non-operational power state, as host memory access may
not work in a system suspend state. It only treats a negative return
from nvme_set_host_mem() as a failure, though. If the controller fails
the Set Features command with an NVMe status, the HMB stays enabled and
the controller is suspended with it in use.
On resume, nvme_setup_host_mem() then tries to enable the buffer again.
If the controller rejects that, the buffer is freed while the controller
can still access it, and the reset that nvme_resume() falls back to is
not scheduled, as the controller is still LIVE.
Handle a positive status like the power state change below does: shut
the controller down, so that it no longer accesses the buffer and is
reset on resume.
Fixes: e5ad96f388b7 ("nvme-pci: disable hmb on idle suspend")
Assisted-by: LLM
Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
