mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Remove unnecessary WAK_STS bit waiting code for S1 sleep.
It was duplicated with AcpiEnterSleepState() since acpica-unix-20010816.
This commit is contained in:
parent
16676bcded
commit
09e97d2f24
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86083
@ -1279,7 +1279,6 @@ ACPI_STATUS
|
||||
acpi_SetSleepState(struct acpi_softc *sc, int state)
|
||||
{
|
||||
ACPI_STATUS status = AE_OK;
|
||||
UINT16 Count;
|
||||
UINT8 TypeA;
|
||||
UINT8 TypeB;
|
||||
|
||||
@ -1337,19 +1336,6 @@ acpi_SetSleepState(struct acpi_softc *sc, int state)
|
||||
device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status));
|
||||
break;
|
||||
}
|
||||
/* wait for the WAK_STS bit */
|
||||
Count = 0;
|
||||
while (!(AcpiHwRegisterBitAccess(ACPI_READ, ACPI_MTX_LOCK, WAK_STS))) {
|
||||
AcpiOsSleep(0, 1);
|
||||
/*
|
||||
* Some BIOSes don't set WAK_STS at all,
|
||||
* give up waiting for wakeup if we time out.
|
||||
*/
|
||||
if (Count > 1000) {
|
||||
break; /* giving up */
|
||||
}
|
||||
Count++;
|
||||
}
|
||||
}
|
||||
AcpiLeaveSleepState((UINT8)state);
|
||||
DEVICE_RESUME(root_bus);
|
||||
|
Loading…
Reference in New Issue
Block a user