summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2001-11-11 15:36:35 +0000
committeriwasaki <iwasaki@FreeBSD.org>2001-11-11 15:36:35 +0000
commit81a7064bff0d2ad670703950289dd0607f99b4cc (patch)
treeea3e175b09bfeb1f7778e88fefade77513a73f76 /sys/contrib
parent44ad8faef31d35a4f2ad8d0d0f8326dff3da94ab (diff)
downloadFreeBSD-src-81a7064bff0d2ad670703950289dd0607f99b4cc.zip
FreeBSD-src-81a7064bff0d2ad670703950289dd0607f99b4cc.tar.gz
Apply a local change to ACPICA.
Some BIOSes don't set WAK_STS at all, give up waiting for wakeup if we time out.
Diffstat (limited to 'sys/contrib')
-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 7cbb6c8..29336b2 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));
OpenPOWER on IntegriCloud