From 81a7064bff0d2ad670703950289dd0607f99b4cc Mon Sep 17 00:00:00 2001 From: iwasaki Date: Sun, 11 Nov 2001 15:36:35 +0000 Subject: Apply a local change to ACPICA. Some BIOSes don't set WAK_STS at all, give up waiting for wakeup if we time out. --- sys/contrib/dev/acpica/hwsleep.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys') 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)); -- cgit v1.1