scsi: Add PM_EVENT_POWEROFF into suspend callbacks

If the PM core uses hibernation callbacks for powering off the
system, drivers will receive PM_EVENT_POWEROFF and should handle
it the same as they previously handled PM_EVENT_HIBERNATE.

Support this case in the scsi driver.  No functional changes.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Tested-by: Eric Naim <dnaim@cachyos.org>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20251112224025.2051702-3-superm1@kernel.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Mario Limonciello (AMD)
2025-11-12 16:40:24 -06:00
committed by Rafael J. Wysocki
parent 0ca04993da
commit 988dd0bd91
2 changed files with 2 additions and 0 deletions

View File

@@ -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;

View File

@@ -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: