Commit 988dd0bd authored by Mario Limonciello (AMD)'s avatar Mario Limonciello (AMD) Committed by Rafael J. Wysocki
Browse files

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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Tested-by: default avatarEric Naim <dnaim@cachyos.org>
Signed-off-by: default avatarMario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20251112224025.2051702-3-superm1@kernel.org


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 0ca04993
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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: