Am I just being an idiot? It looks to me like this patch was bugged? (I
only noticed because the acpi_power_get_inferred_state prototype was changed
to return the state in a pointer.)
We've been using it in pci_bind.c like this,
acpi_power_transition(device, acpi_power_get_inferred_state(device));
But it seems acpi_power_get_inferred_state only returns exit status, and
not the ACPI_STATE_D0...ACPI_STATE_D3 values which acpi_power_transition
expects. This may have been accidentally working since the common return
value from acpi_power_get_inferred_state is 0.
I changed pci_bind as such to,
acpi_power_get_inferred_state(device, &state);
acpi_power_transition(device, state);
And am testing now...
Change to acpi_power_get_inferred_state was in,
commit 32a00d274e877eab3ea7ab196b75c9be5170d25e
Author: Rafael J. Wysocki <rjw(a)sisk.pl>
Date: Thu Nov 25 00:05:17 2010 +0100
ACPI / PM: Prevent acpi_power_get_inferred_state() from making
changes
acpi_power_get_inferred_state() should not update
device->power.state behind the back of its caller, so make it return
the state via a pointer instead.
Signed-off-by: Rafael J. Wysocki <rjw(a)sisk.pl>
Signed-off-by: Len Brown <len.brown(a)intel.com>
--Kyle
Show replies by date