freebsd-skq/sys/i386/bios
Warner Losh d708737568 APM was calling the suspend process from a timeout. This meant that
other timeouts could not happen while suspending, including timeouts
for things like msleep.  This caused the system to hang on suspend
when the cbb was enabled, since its suspend path powered down the
socket which used a timeout to wait for it to be done.

APM now creates a thread when it is enabled, and deletes the thread
when it is disabled.  This thread takes the place of the timeout by
doing its polling every ~.9s.  When the thread is disabled, it will
wakeup early, otherwise it times out and polls the varius things the
old timeout polled (APM events, suspend delays, etc).

This makes my Sony VAIO 505TS suspend/resume correctly when APM is
enabled (ACPI is black listed on my 505TS).

This will likely fix other problems with the suspend path where
drivers would sleep with msleep and/or do other timeouts.  Maybe
there's some special case code that would use DELAY while suspending
and msleep otherwise that can be revisited and removed.

This was also tested by glebius@, who pointed out that in the patch I
sent him, I'd forgotten apm_saver.c

MFC After: 3 weeks
2006-05-25 23:06:38 +00:00
..
apm.c APM was calling the suspend process from a timeout. This meant that 2006-05-25 23:06:38 +00:00
apm.h APM was calling the suspend process from a timeout. This meant that 2006-05-25 23:06:38 +00:00
mca_machdep.c Clarify SDT feature word bits. 2004-08-31 21:51:51 +00:00
mca_machdep.h
smapi_bios.S Fix build (including both asm.h and asmacros.h is evil). 2005-07-22 15:01:07 +00:00
smapi.c
smbios.c Fix smbios(4) and add support for amd64 2005-07-21 00:18:28 +00:00
vpd.c Fix checksum calculation. 2004-08-31 21:45:30 +00:00