Skip to content

Commit 988dd0b

Browse files
superm1rafaeljw
authored andcommitted
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>
1 parent 0ca0499 commit 988dd0b

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/scsi/mesh.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,7 @@ static int mesh_suspend(struct macio_dev *mdev, pm_message_t mesg)
17621762
case PM_EVENT_SUSPEND:
17631763
case PM_EVENT_HIBERNATE:
17641764
case PM_EVENT_FREEZE:
1765+
case PM_EVENT_POWEROFF:
17651766
break;
17661767
default:
17671768
return 0;

drivers/scsi/stex.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,7 @@ static int stex_choice_sleep_mic(struct st_hba *hba, pm_message_t state)
19651965
case PM_EVENT_SUSPEND:
19661966
return ST_S3;
19671967
case PM_EVENT_HIBERNATE:
1968+
case PM_EVENT_POWEROFF:
19681969
hba->msi_lock = 0;
19691970
return ST_S4;
19701971
default:

0 commit comments

Comments
 (0)