[PATCH] mtd: cfi_cmdset_0001: silence spurious suspend warning on shutdown
Breno Leitao
leitao at debian.org
Wed Jun 10 02:09:40 PDT 2026
cfi_intelext_reboot() puts each chip into FL_SHUTDOWN (array mode) via
the reboot notifier so the bootloader can read the flash on the next
boot. If pm_suspend then runs on the same chip during the shutdown
sequence, cfi_intelext_suspend() falls into the default branch and
prints:
Flash device refused suspend due to active operation (state 20)
The chip is not active; it is already shut down. Treat FL_SHUTDOWN the
same as FL_PM_SUSPENDED in the suspend switch so nothing is done and
no warning is emitted.
Reproduced on every boot of the QEMU 'virt' arm64 machine, which
exposes two Intel-Sharp pflash chips.
Signed-off-by: Breno Leitao <leitao at debian.org>
---
drivers/mtd/chips/cfi_cmdset_0001.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index b73596a8e021..6049ba2d6bcb 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -2565,6 +2565,12 @@ static int cfi_intelext_suspend(struct mtd_info *mtd)
ret = -EAGAIN;
break;
case FL_PM_SUSPENDED:
+ case FL_SHUTDOWN:
+ /*
+ * Already suspended, or put into array mode by the
+ * reboot notifier ahead of an imminent power-off.
+ * Either way there is nothing to do.
+ */
break;
}
mutex_unlock(&chip->mutex);
---
base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
change-id: 20260610-cfi_intelext_suspend-6fbe80de8b94
Best regards,
--
Breno Leitao <leitao at debian.org>
More information about the linux-mtd
mailing list