]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: Add PM_EVENT_POWEROFF into suspend callbacks
authorMario Limonciello (AMD) <superm1@kernel.org>
Wed, 12 Nov 2025 22:40:24 +0000 (16:40 -0600)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 14 Nov 2025 16:05:53 +0000 (17:05 +0100)
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>
drivers/scsi/mesh.c
drivers/scsi/stex.c

index 1c15cac41d805a783e634936cb261e16e70f2113..768b85eecc8fdd1615b5f536e269a8170bf60a98 100644 (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;
index d8ad02c293205816afde44b304cbb49b1a27626a..e6357bc301cb9130dc8d9ff6671c377e52581e3a 100644 (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: