Subject: Re: ACPI suspend support.
To: Daniel Carosone <dan@geek.com.au>
From: Jared D. McNeill <jmcneill@invisible.ca>
List: tech-kern
Date: 01/27/2005 19:28:22
On Fri, 2005-01-28 at 10:01 +1100, Daniel Carosone wrote:
> So it seems the device or driver is quite confused, this time at least :)

Can you try running powerhooks at S1 sleep?

In sys/dev/acpi/acpi.c:acpi_enter_sleep_state():

[...]
                if (state==ACPI_STATE_S1) {
                        /* just enter the state */
                        acpi_md_OsDisableInterrupt();
                        AcpiEnterSleepState((UINT8)state);
                        AcpiUtReleaseMutex(ACPI_MTX_HARDWARE);
                }
[...]

Change this to:

[...]
                if (state==ACPI_STATE_S1) {
                        ACPI_FLUSH_CPU_CACHE();

                        /* just enter the state */
                        acpi_md_OsDisableInterrupt();
			s = splhigh();
			dopowerhooks(PWR_SUSPEND);
                        AcpiEnterSleepState((UINT8)state);
			dopowerhooks(PWR_RESUME);
			splx(s);
                        AcpiUtReleaseMutex(ACPI_MTX_HARDWARE);
                }
[...]

The esa powerhook should run, let me know if that helps out at all..

> Also worth noting, I'm using the ESA_NUM_VOICES=4 option.

Shouldn't make a difference..

Cheers,
Jared