Browse Source

[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 years ago
parent
commit
df85901768
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/arch/x86/interface/pcbios/acpipwr.c

+ 6
- 0
src/arch/x86/interface/pcbios/acpipwr.c View File

23
 
23
 
24
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
24
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25
 
25
 
26
+#include <unistd.h>
26
 #include <errno.h>
27
 #include <errno.h>
27
 #include <byteswap.h>
28
 #include <byteswap.h>
28
 #include <realmode.h>
29
 #include <realmode.h>
111
 			 ACPI_PM1_CNT_SLP_EN ), pm1b_cnt );
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
 	DBGC ( colour, "ACPI power off failed\n" );
120
 	DBGC ( colour, "ACPI power off failed\n" );
115
 	return -EPROTO;
121
 	return -EPROTO;
116
 }
122
 }

Loading…
Cancel
Save