]> Git Repo - linux.git/commitdiff
PM: ACPI: reboot: Reinstate S5 for reboot
authorKai-Heng Feng <[email protected]>
Thu, 29 Sep 2022 07:05:24 +0000 (15:05 +0800)
committerRafael J. Wysocki <[email protected]>
Tue, 4 Oct 2022 13:59:36 +0000 (15:59 +0200)
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.

Using S5 for reboot is default behavior under Windows: "A full shutdown
(S5) occurs when a system restart is requested" [1].

Link: https://docs.microsoft.com/en-us/windows/win32/power/system-power-state
Suggested-by: Dmitry Osipenko <[email protected]>
Signed-off-by: Kai-Heng Feng <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/acpi/sleep.c

index ad4b2987b3d6ec0bc71f4d918992576ae28edce4..0b557c0d405ef1945024374556ddaf7e831ea4a4 100644 (file)
@@ -1088,6 +1088,14 @@ int __init acpi_sleep_init(void)
                register_sys_off_handler(SYS_OFF_MODE_POWER_OFF,
                                         SYS_OFF_PRIO_FIRMWARE,
                                         acpi_power_off, NULL);
+
+               /*
+                * Windows uses S5 for reboot, so some BIOSes depend on it to
+                * perform proper reboot.
+                */
+               register_sys_off_handler(SYS_OFF_MODE_RESTART_PREPARE,
+                                        SYS_OFF_PRIO_FIRMWARE,
+                                        acpi_power_off_prepare, NULL);
        } else {
                acpi_no_s5 = true;
        }
This page took 0.073267 seconds and 4 git commands to generate.