[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44e3e1be-363b-f19b-4907-6990d2f5b24c@collabora.com>
Date: Tue, 13 Sep 2022 18:17:15 +0300
From: Dmitry Osipenko <dmitry.osipenko@...labora.com>
To: Kai-Heng Feng <kai.heng.feng@...onical.com>,
rafael.j.wysocki@...el.com, lenb@...nel.org
Cc: Josef Bacik <josef@...icpanda.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] PM: ACPI: reboot: Reinstate S5 for reboot
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 <josef@...icpanda.com>
> Suggested-by: Dmitry Osipenko <dmitry.osipenko@...labora.com>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
> ---
> 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
Powered by blists - more mailing lists