aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev
diff options
context:
space:
mode:
authorMitsuru IWASAKI <iwasaki@FreeBSD.org>2001-11-11 15:36:35 +0000
committerMitsuru IWASAKI <iwasaki@FreeBSD.org>2001-11-11 15:36:35 +0000
commit8d2d52e43a74655af6a9128215dba414a1f993c2 (patch)
treeea3e175b09bfeb1f7778e88fefade77513a73f76 /sys/contrib/dev
parent94eacee1fc7b2d098b2a149833aceaf96ad26b22 (diff)
Notes
Diffstat (limited to 'sys/contrib/dev')
-rw-r--r--sys/contrib/dev/acpica/hwsleep.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/contrib/dev/acpica/hwsleep.c b/sys/contrib/dev/acpica/hwsleep.c
index 7cbb6c877a3d..29336b23674e 100644
--- a/sys/contrib/dev/acpica/hwsleep.c
+++ b/sys/contrib/dev/acpica/hwsleep.c
@@ -237,6 +237,7 @@ AcpiEnterSleepState (
UINT8 TypeB;
UINT16 PM1AControl;
UINT16 PM1BControl;
+ UINT32 Retry;
FUNCTION_TRACE ("AcpiEnterSleepState");
@@ -318,9 +319,16 @@ AcpiEnterSleepState (
/* wait until we enter sleep state */
+ Retry = 1000;
do
{
- AcpiOsStall(10000);
+ /*
+ * Some BIOSes don't set WAK_STS at all,
+ * give up waiting for wakeup if we time out.
+ */
+ if (Retry-- == 0) {
+ break; /* giving up */
+ }
}
while (!AcpiHwRegisterBitAccess (ACPI_READ, ACPI_MTX_LOCK, WAK_STS));