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 6C067CA0EDC for ; Mon, 18 Aug 2025 02:01:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C22B710E32B; Mon, 18 Aug 2025 02:01:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="PJlq2ayQ"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 071D710E32B; Mon, 18 Aug 2025 02:01:29 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 9B58D5C57BF; Mon, 18 Aug 2025 02:01:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C8EDC4CEEB; Mon, 18 Aug 2025 02:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755482476; bh=nP9n5VGF2FskJeZ1oNEb2BbawXh/NPFp8tsiOD47chk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PJlq2ayQKJAgj5A4Paj5fnHMw9r7Il4FJ0cVzz/w+gIthXJqpCHX5lUMkJd94O5s4 ckzEaD99szLB8JVS8928eYI3FYznyaAcnSzIz8fM0zZmmnuX6aslIyV8SWb5lhF7D/ p9uZGDIzCLUK/BcLqSuUXTS6ZbLYlKn9AWIk5ps/oJwhOSfMezUEkpUuDpRaGboE0J 4WhKkaIOfLWyGBNltxCTyMFG/CDgsjIfgyUoc04dMKa5TwnAfnMCa9VNXPdsVMF/cc 6rSKWantk8A3e0l4OX8Z+sHNKvX489QgL/HSbr8/8sWFcE7pfSipyK3gMra3mt5MQi GdRAIMQGIay/A== From: "Mario Limonciello (AMD)" To: "Rafael J . Wysocki" , Bjorn Helgaas Cc: Pavel Machek , Len Brown , Greg Kroah-Hartman , Danilo Krummrich , =?UTF-8?q?Christian=20K=C3=B6nig?= , "James E . J . Bottomley" , "Martin K . Petersen" , Steven Rostedt , linux-pm@vger.kernel.org (open list:HIBERNATION (aka Software Suspend, aka swsusp)), amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), linux-scsi@vger.kernel.org (open list:SCSI SUBSYSTEM), linux-usb@vger.kernel.org (open list:USB SUBSYSTEM), linux-trace-kernel@vger.kernel.org (open list:TRACING), AceLan Kao , Kai-Heng Feng , Mark Pearson , =?UTF-8?q?Merthan=20Karaka=C5=9F?= , Eric Naim , "Mario Limonciello (AMD)" Subject: [PATCH v6 02/11] scsi: Add PM_EVENT_POWEROFF into suspend callbacks Date: Sun, 17 Aug 2025 21:00:52 -0500 Message-ID: <20250818020101.3619237-3-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250818020101.3619237-1-superm1@kernel.org> References: <20250818020101.3619237-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" 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. Tested-by: Eric Naim Signed-off-by: Mario Limonciello (AMD) --- v5: * Re-order v4: * https://lore.kernel.org/linux-pci/20250616175019.3471583-1-superm1@kernel.org/ --- 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