소스 검색

[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…
취소
저장