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 0E81FC71159 for ; Mon, 16 Jun 2025 17:50:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7773810E135; Mon, 16 Jun 2025 17:50:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="qH6frSV8"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 804E810E404; Mon, 16 Jun 2025 17:50:39 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 0151A4ADFC; Mon, 16 Jun 2025 17:50:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B0FAC4CEF4; Mon, 16 Jun 2025 17:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750096238; bh=JZ6ILTv0NyimVcIwJeioVSlHa7xlaGtlYECv3UsX1hQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qH6frSV8FE/GEWzUE0vxDVUeBLP7CHPlBfqhOBWWJe9x4PgchIl3xQeGzLoCf255i 3//oFBtEog43y3VqJIYpztcYh6mVa71tox5D1tpZJ477YcYL72GtxUFcfHvJlLkhXF nyTLlXoUThjg4UoRw40i56/t3R5eDwN9YRIINOA3tszaVPDgoLVnRq9VfXvBwoYnZR gXrYkhl2E932Nu4tedFJ72AFiMWuXoUMx9NnL5GEYzqo2l6D8t7U/kLC53OHvheYNT HzW+gpx7regu4HKI06LE1OHuRxMLu23bw35Of5kxtQ3wWxowjtI6ZrTs5qTx+7j2ZV 13u1iWFmoKnow== 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 v4 4/5] scsi: Add PM_EVENT_POWEROFF into suspend callbacks Date: Mon, 16 Jun 2025 12:50:18 -0500 Message-ID: <20250616175019.3471583-5-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250616175019.3471583-1-superm1@kernel.org> References: <20250616175019.3471583-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 * https://lore.kernel.org/linux-pm/20250609024619.407257-1-superm1@kernel.org/T/#me6db0fb946e3d604a8f3d455128844ed802c82bb --- 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