Re: PROBLEM: CPU fan shuts down on load of fan.ko in kernel 2.6.18 and later

Bjorn Helgaas
2007-01-03T20:29:41Z

On Wednesday 03 January 2007 04:40, Matthew Brett wrote:
> > > > CPU fan shuts down on load of fan.ko in kernel 2.6.18 and later
>
> I am sorry to persist - but is there anything I can do further to help
> debug this problem? Or somewhere else that I should ask?

Thanks for your report and for persisting. This is exactly the right
place to complain, but people might still be recovering from the
holidays.

There weren't many interesting changes in fan.c between 2.6.17 and
2.6.18. The problem you found is probably related to this:
http://bugzilla.kernel.org/show_bug.cgi?id=5000

The patch in comment #24 looks like this for add and resume:

result = acpi_bus_get_power(device->handle, &state);

+ if (state == ACPI_STATE_D0)
+ acpi_bus_set_power(fan->handle, ACPI_STATE_D3);
+ else if (state == ACPI_STATE_D3)
+ acpi_bus_set_power(fan->handle, ACPI_STATE_D0);
+ acpi_bus_set_power(fan->handle, state);

whereas the code in 2.6.18 is this:

result = acpi_bus_get_power(device->handle, &state);

+ device->flags.force_power_state = 1;
+ acpi_bus_set_power(device->handle, state);
+ device->flags.force_power_state = 0;

It's interesting that the bugzilla patch inverts the fan power state
while the 2.6.18 code does not.

Konstantin can probably give you more useful help. I don't know
the details of how the fan state is controlled.

Bjorn