[PATCH v5 02/11] scsi: Add PM_EVENT_POWEROFF into suspend callbacks
Mario Limonciello (AMD)
superm1 at kernel.org
Mon Aug 11 19:40:53 UTC 2025
When the ACPI core uses hibernation callbacks for shutdown drivers
will receive PM_EVENT_POWEROFF and should handle it the same as
PM_EVENT_HIBERNATE would have been used.
Tested-by: Eric Naim <dnaim at cachyos.org>
Signed-off-by: Mario Limonciello (AMD) <superm1 at kernel.org>
---
v5:
* Re-order
v4:
* https://lore.kernel.org/linux-pci/20250616175019.3471583-1-superm1@kernel.org/
---
drivers/scsi/mesh.c | 1 +
drivers/scsi/stex.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c
index 1c15cac41d805..768b85eecc8fd 100644
--- a/drivers/scsi/mesh.c
+++ b/drivers/scsi/mesh.c
@@ -1762,6 +1762,7 @@ static int mesh_suspend(struct macio_dev *mdev, pm_message_t mesg)
case PM_EVENT_SUSPEND:
case PM_EVENT_HIBERNATE:
case PM_EVENT_FREEZE:
+ case PM_EVENT_POWEROFF:
break;
default:
return 0;
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 63ed7f9aaa937..ee9372e1f7f07 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1965,6 +1965,7 @@ static int stex_choice_sleep_mic(struct st_hba *hba, pm_message_t state)
case PM_EVENT_SUSPEND:
return ST_S3;
case PM_EVENT_HIBERNATE:
+ case PM_EVENT_POWEROFF:
hba->msi_lock = 0;
return ST_S4;
default:
--
2.43.0
More information about the dri-devel
mailing list