Преглед на файлове

[acpi] Allow time for ACPI power off to take effect

The ACPI power off sequence may not take effect immediately.  Delay
for one second, to eliminate potentially confusing log messages such
as "Could not power off: Error 0x43902001 (http://ipx".

Reported-by: Leonid Vasetsky <leonidv@velostrata.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown преди 8 години
родител
ревизия
df85901768
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6
    0
      src/arch/x86/interface/pcbios/acpipwr.c

+ 6
- 0
src/arch/x86/interface/pcbios/acpipwr.c Целия файл

@@ -23,6 +23,7 @@
23 23
 
24 24
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25 25
 
26
+#include <unistd.h>
26 27
 #include <errno.h>
27 28
 #include <byteswap.h>
28 29
 #include <realmode.h>
@@ -111,6 +112,11 @@ int acpi_poweroff ( void ) {
111 112
 			 ACPI_PM1_CNT_SLP_EN ), pm1b_cnt );
112 113
 	}
113 114
 
115
+	/* On some systems, execution will continue briefly.  Delay to
116
+	 * avoid potentially confusing log messages.
117
+	 */
118
+	mdelay ( 1000 );
119
+
114 120
 	DBGC ( colour, "ACPI power off failed\n" );
115 121
 	return -EPROTO;
116 122
 }

Loading…
Отказ
Запис