From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A61DAC5AD49 for ; Mon, 9 Jun 2025 02:46:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A38A10E21E; Mon, 9 Jun 2025 02:46:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="iOYZtfjn"; dkim-atps=neutral Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2BFBA10E213; Mon, 9 Jun 2025 02:46:45 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 61120A4032B; Mon, 9 Jun 2025 02:46:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FB40C4CEEE; Mon, 9 Jun 2025 02:46:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749437203; bh=OloXrw3xRIAtL6oQ+ic+cZq3x0zPylu+4Y8fZrphD2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iOYZtfjnX7mRmNhehMbarMUyvinQ1IZmG62gX2LMonv9S+oOssImBrb39ii7EpCFd fb7eCQ4QLwAGMBWvXmeXT1PU7Bf5+juQs9383AgXBguhl2MkpQUqXQTiHQJI+h/TC3 41W5B4REpqzJ/92N3o0UUtSOf+OmqsgIMvD5SGoMTGz5KcnZd9EAiDvk9Jsp+A5WCo ZBrB2Kvzc4MhCuvnSj+CP8dCNmahOn1L2kXNyePN1HgLzIp3Ory/9uLNyJwl36+Ehx OfS/NvULqOdvcksibsgFrJ2Ty7FPqXP/hmbW/MeSTnV3ogSYn46vJYLlcDtDvPmwh3 mQITDbkIEmPoQ== From: Mario Limonciello To: "Rafael J . Wysocki" , Alex Deucher , Bjorn Helgaas Cc: amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS), linux-pm@vger.kernel.org (open list:HIBERNATION (aka Software Suspend, aka swsusp)), linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), linux-kernel@vger.kernel.org (open list), Greg Kroah-Hartman , Danilo Krummrich , "James E . J . Bottomley" , "Martin K . Petersen" , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-scsi@vger.kernel.org (open list:SCSI SUBSYSTEM), linux-usb@vger.kernel.org (open list:USB SUBSYSTEM), Mario Limonciello Subject: [PATCH v3 4/5] scsi: Add PM_EVENT_POWEROFF into suspend callbacks Date: Sun, 8 Jun 2025 21:46:18 -0500 Message-ID: <20250609024619.407257-5-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250609024619.407257-1-superm1@kernel.org> References: <20250609024619.407257-1-superm1@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: Mario Limonciello 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. Signed-off-by: Mario Limonciello --- v3: * New patch --- 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