On Monday 15 January 2007 06:33, Karasyov, Konstantin A wrote:
> The fan device FAN1 defines object FN01 as its power resource. _STA
> method of FN01 always return 0x01, i.e. resource is on. So the fan
> driver is unable to turn the fan on, because it thinks that it is
> already in that state.

The code looks like this:

    int acpi_bus_set_power(acpi_handle handle, int state)
    {
        ...
        if (!device->flags.force_power_state) {
                if (device->power.state == ACPI_STATE_UNKNOWN)
                        acpi_bus_get_power(device->handle, &device->power.state)
                if (state == device->power.state) {
                        return 0;       /* already at desired state */
        }
        ...
        acpi_power_transition(device, state);

Why do we bother with the "acpi_bus_get_power" at all?  The problem
Matthew is seeing wouldn't happen at all if we just deleted everything
in the force_power_state block.

Then we could execute _ON, _PS0, etc for a device that is already on.
Does that cause bad things to happen?  I assume the fan probably works
as desired under Windows, so they probably do something like this.

Bjorn

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to