Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6203346rwn; Mon, 12 Sep 2022 23:59:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR60CRFfp87OqNsk2tqaEeeRr4yTxavYNuq4GXi4osRluRR+5j8BnpFdHH+qLLRkjbUGY/Cn X-Received: by 2002:a63:5a0b:0:b0:434:4748:4e7a with SMTP id o11-20020a635a0b000000b0043447484e7amr26478929pgb.561.1663052362004; Mon, 12 Sep 2022 23:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663052361; cv=none; d=google.com; s=arc-20160816; b=hxRJM5F6fOCWxTCVB3MsnofaBNT5CdJsnURW8Z8GG/BqZuObndbf2rNORfmCFtElEw QBTkjACnVHCrDy1S8kqnteP38/gODveCv6BalMZiwCFwdyjIBAsGFpaOP9eR15Akb03W Se/k2l5WOXG9yzVVuOr0xlWMlivMdfkcKDlGAHR5nEMyKNgnul8xrVQ142MRSprO+OHg rzHiOn4CEKpnpxiZQ5BeaOshv62cOayS3Z9g5VMH1NJ9MjGD49i3cFcUxZQDgTIqewoE 6c+phA3mTbxj9UiN4MOpC2/1N/X3TzY48mrHjdDJVM/nocIvurUM+zY8XrZQ6UwIPCtE KRLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LiDG8FrfTYaa0AmzxLH7DWNm3Yjyr6Vzh7RHEY6totM=; b=GPRl9K1Bx9dTejLrH2AQi+OZQMA/In5UuK0SKE4bQpiJw/0Xn5ydGDg6gZqfq3EFKy k7HyHM35nDzfZFLA8K9kiWGIqUUnVVfgmuym6LONJSz/0irbJfF+tv9/Q7x7AjDsPp1T UWwlDWb6q9uyhG51YFywzZxhZGze1jdlxpPdBKnEfNgyoFSY7Yw19i1GSRqVSzhlzH80 SbO1AxfQHoxEBgflDhEgs+v6X85RWH2sqhG161eO9hTvoVTx+S7yGaLBMQ9FFAuRhwHx rxuj9D/FlmLZX9EOhqLWhBAhw77PDmhlt2TY6wraiTgzAvufOfXpopKPBCkp5IwyoG/y Cwug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=F0FG0ake; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a63f854000000b0042b80821b1csi10911528pgj.371.2022.09.12.23.59.09; Mon, 12 Sep 2022 23:59:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=F0FG0ake; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230281AbiIMGWJ (ORCPT + 99 others); Tue, 13 Sep 2022 02:22:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230312AbiIMGVu (ORCPT ); Tue, 13 Sep 2022 02:21:50 -0400 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB982CE13; Mon, 12 Sep 2022 23:21:18 -0700 (PDT) Received: from HP-EliteBook-840-G7.. (1-171-215-55.dynamic-ip.hinet.net [1.171.215.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 9539F3FDC4; Tue, 13 Sep 2022 06:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1663050076; bh=LiDG8FrfTYaa0AmzxLH7DWNm3Yjyr6Vzh7RHEY6totM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=F0FG0aked9Qzb2athEyWhdNhH6/lNuQjRhRg8bvMoFa3nITwHBYQndwiFAsndPNDJ o7yDFMy7RYVI5BTpQRbbGhX/tVGfpeWGb2lSTro3P57KTQtjdvK00Or6KJYqDqB/3p 5Ef0fLjM6zccaQxk3Y5EKEUSb/6wS72PgUfSV1WDMFqnZzhq2eQWWgwJ0ZZMWZ5JYb 3vGy/gSUlZTHPPNP6g8ZqxRZ0phEDc5Yrb3pdxnCO/dBBkw2FA2V7aesLhzWAWIuFo ITO8S9uz4Ubk1QDSl7R7w+4ihh5I/zK+0ToxyISnxKjGLo/r0Zx3lMBmaPJHtLUTIo EOnwOx6qLpyZg== From: Kai-Heng Feng To: rafael.j.wysocki@intel.com, lenb@kernel.org Cc: Kai-Heng Feng , Josef Bacik , Dmitry Osipenko , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/2] PM: ACPI: reboot: Reinstate S5 for reboot Date: Tue, 13 Sep 2022 14:20:40 +0800 Message-Id: <20220913062042.1977790-2-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220913062042.1977790-1-kai.heng.feng@canonical.com> References: <20220913062042.1977790-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit d60cd06331a3 ("PM: ACPI: reboot: Use S5 for reboot") caused Dell PowerEdge r440 hangs at reboot. The issue is fixed by commit 2ca1c94ce0b6 ("tg3: Disable tg3 device on system reboot to avoid triggering AER"), so use the new sysoff API to reinstate S5 for reboot on ACPI-based systems. Cc: Josef Bacik Suggested-by: Dmitry Osipenko Signed-off-by: Kai-Heng Feng --- v3: - Use new API to invoke ACPI S5. v2: - Use do_kernel_power_off_prepare() instead. drivers/acpi/sleep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index ad4b2987b3d6e..dce5460902eed 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -1088,6 +1088,10 @@ int __init acpi_sleep_init(void) register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_FIRMWARE, acpi_power_off, NULL); + + register_sys_off_handler(SYS_OFF_MODE_RESTART_PREPARE, + SYS_OFF_PRIO_FIRMWARE, + acpi_power_off_prepare, NULL); } else { acpi_no_s5 = true; } -- 2.36.1