Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6861330rwn; Tue, 13 Sep 2022 10:00:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR7MNp3XFd9/+fY85aJtdjyBM2BbpwGbRC9ill1UVGEniXIf2m/atQ4Gboaf0xUT2Od3HWaC X-Received: by 2002:a17:902:7783:b0:173:11e6:a580 with SMTP id o3-20020a170902778300b0017311e6a580mr32839312pll.10.1663088447942; Tue, 13 Sep 2022 10:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663088447; cv=none; d=google.com; s=arc-20160816; b=VQYeK9F3Kazv8BEZj/Xlkt79v+d5sJMXpoCeqxJ1AYPSsBxqXjylCjUNGR2PZNCpfX cgVj3br18ILAef0r+O7WybLESLe1nawMhA9BLxxZxj/90EJ+k6lkDBKrqqwuYCz4foE1 ifUUPmtJMLFcVC/RLesOufMmX9ukcSsbxuVr6ZED5aaHoZlqI59Sj/Ic3rHUtUcGSejh xlZ4GF4kNsexALIbZXiqyVkVvSJT+rq6AgwxvoNiSu07UVPsQAz66pn6LlEwtKx69XCS kbHPfuWrEgssVzE/akFnWGGwSjBC2scLa+ONqubIf2QQ14wXYuRB4UY575rn2OJwyuOu KE7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=INxuipWxjf0QDVzduDlLWV1D9SYwEiWru/U/1gaWt8Q=; b=aU7PKS+aUweFSKaLh+hMsK3umcthk+G4kho1UgwtvzZnTM4EoWQVmJn26+4ZWezc8L t0rS3IuRQZiidCiTDxNQ6S5LDiCp1QtfE6uahYJ0d9ceAI+9yC6s042f3o+oJin5fAxz M7TzP8NK4xQh7x67zbvsla4+WeYr5kXD6H9APQ1wOrRu9MEAv0awVm+iFCp20xooLIdv GSvknjSPOyZF1GsrA8t2srPjvxO2WItejpV0h/DGJ9mzcfJ/CCff2KMFbbXmddKO0fEP Gu8fEgWKJEv5E2aOT+rRsVctqyR6J+LtReqnxkjzthwQpdXZxMtDWzIdQ/wb6NUV9ts8 I7Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KEKfydIL; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z33-20020a631921000000b00434c6530f0asi12323202pgl.625.2022.09.13.10.00.34; Tue, 13 Sep 2022 10:00:47 -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=@collabora.com header.s=mail header.b=KEKfydIL; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231289AbiIMQ5r (ORCPT + 99 others); Tue, 13 Sep 2022 12:57:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232146AbiIMQ5Z (ORCPT ); Tue, 13 Sep 2022 12:57:25 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C51C13F8E; Tue, 13 Sep 2022 08:49:39 -0700 (PDT) Received: from [192.168.2.145] (109-252-122-187.nat.spd-mgts.ru [109.252.122.187]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8A16B6601F9C; Tue, 13 Sep 2022 16:17:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663082239; bh=XkZJpiv5PF0uDye6OFManEG8kZH5pOgK7EHrRYw8g3w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KEKfydIL3dWx62K5QaMFEu8a8m88Q5fbP6ncw+3u4dBvpS7CIwhzG6hLPzyIXXzuy UtyepaA6pRJKKFiJnt5mvNMAFpZTpZhMukim8zelsdW+EEXluCZSf2e4Xp95YD/EEY KepVNnRonAwvEUmqfYE5LcFxbcsNFRyjnRiTQ6s/O9gfyf8ck7fW9B15HqzfihOlTk E5WdJom+DJ9jU4JuTzuU4zsF91b4AyRugWmAoB9wnKiGQjN6H0+eRK+rmc0a1Nl6N9 mo4j9JY/i7k8Mu30RzLXa4CQjTUnX4b8yOV8F+oGSazSmtzSH60edgfVSIboGpdZdZ OyDKHPCy1Q1tQ== Message-ID: <44e3e1be-363b-f19b-4907-6990d2f5b24c@collabora.com> Date: Tue, 13 Sep 2022 18:17:15 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v3 2/2] PM: ACPI: reboot: Reinstate S5 for reboot Content-Language: en-US To: Kai-Heng Feng , rafael.j.wysocki@intel.com, lenb@kernel.org Cc: Josef Bacik , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220913062042.1977790-1-kai.heng.feng@canonical.com> <20220913062042.1977790-2-kai.heng.feng@canonical.com> From: Dmitry Osipenko In-Reply-To: <20220913062042.1977790-2-kai.heng.feng@canonical.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 9/13/22 09:20, Kai-Heng Feng wrote: > 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); Maybe you could add a small comment to the code explaining why acpi_power_off_prepare is used for restarting? Is it safe to use S5 on restart for all devices in general? -- Best regards, Dmitry