[ltp] [PATCH] ibm_acpi - Allow fan to be set to full speed

Leon Brokken linux-thinkpad@linux-thinkpad.org
Tue, 23 Aug 2005 14:31:31 +0300


Efthym wrote:

> On Tue, 23 Aug 2005 10:10:24 +0300, Thomas Renninger <trenn@gmx.net>
> wrote:
>
>> honey@gneek.com wrote:
>>
>>> On Mon, 22 Aug 2005, Leon Brokken wrote:
>>>
>>>> Patch works on my T41.
>>>>
>>>> However, the ibm_manage_fan script doesn't work anymore
>>>> (ibm_manage_fan
>>>> script disables the fan when CPU temp is below a certain value).
>>>> Anyone
>>>> else noticed this behaviour?
>>>>
>>>> bash-bash-3.00# cat /proc/acpi/ibm/fan
>>>> status:         enabled
>>>> speed:          3581
>>>> commands:       enable, disable, full-speed
>>>> bash-3.00# echo full-speed > /proc/acpi/ibm/fan
>>>> bash-3.00# cat /proc/acpi/ibm/fan
>>>> status:         disabled
>>>> speed:          4986
>>>> commands:       enable, disable, full-speed
>>>>
>>>> Cheers, Leon.
>>>
>>>
>>> Leon - yes, it would be likely to break Paul's script once set, as
>>> the script reads back fan status from /proc/acpi/ibm/fan, which as
>>> you say is incorrect for full-speed currently.  It'd be great if
>>> Borislav implemented Thomas's work in ibm_acpi and fixed the status
>>> too.
>>
>>
>> If correct speed status is needed for the script you can try this one.
>> I think it should work (untested, I unfortunetely don't own a
>> Thinkpad)  ...
>>
>> BTW: I never got that much positive feed-back on any patch, thanks.
>>
>>     Thomas
>
>
>
> Hi Thomas,
>
> This one fails and unfortunately can't find the problem myself.
> Here's  what I get
>
> [j8ker@purgatory ibm-acpi-0.11]$ patch ibm_acpi.c 
> ../ibm_add_full-speed_adjust_status.diff
> (Stripping trailing CRs from patch.)
> patching file ibm_acpi.c
> [j8ker@purgatory ibm-acpi-0.11]$ ls -la total 200
> drwx--x--x  3 j8ker j8ker  4096 Aug 23 13:34 .
> drwxr-xr-x  3 j8ker j8ker  4096 Aug 23 13:34 ..
> -rw-------  1 j8ker j8ker  3465 Mar 17 12:28 CHANGES
> drwx--x--x  5 j8ker j8ker  4096 Sep 16  2004 config
> -rw-------  1 j8ker j8ker 45901 Aug 23 13:35 ibm_acpi.c
> -rw-------  1 j8ker j8ker 45658 Aug 23 13:34 ibm_acpi.c.orig
> -rw-------  1 j8ker j8ker 18385 Aug 14  2004 LICENSE
> -rw-------  1 j8ker j8ker   398 Sep 16  2004 Makefile
> -rw-------  1 j8ker j8ker 26663 Mar 17 12:07 README
> [j8ker@purgatory ibm-acpi-0.11]$ make
> make -C /lib/modules/2.6.12-1.1398_FC4/build 
> SUBDIRS=/home/j8ker/T21/Drivers/ibm-acpi/ibm-acpi-0.11 modules
> make[1]: Entering directory `/usr/src/kernels/2.6.12-1.1398_FC4-i686'
>   CC [M]  /home/j8ker/T21/Drivers/ibm-acpi/ibm-acpi-0.11/ibm_acpi.o
> /home/j8ker/T21/Drivers/ibm-acpi/ibm-acpi-0.11/ibm_acpi.c: In
> function  ‘fan_read’:
> /home/j8ker/T21/Drivers/ibm-acpi/ibm-acpi-0.11/ibm_acpi.c:1494:
> warning:  pointer/integer type mismatch in conditional expression
> /home/j8ker/T21/Drivers/ibm-acpi/ibm-acpi-0.11/ibm_acpi.c:1494:
> error:  syntax error before ‘:’ token
> make[2]: ***
> [/home/j8ker/T21/Drivers/ibm-acpi/ibm-acpi-0.11/ibm_acpi.o]  Error
> 1make[1]: *** 
> [_module_/home/j8ker/T21/Drivers/ibm-acpi/ibm-acpi-0.11] Error 2
> make[1]: Leaving directory `/usr/src/kernels/2.6.12-1.1398_FC4-i686'
> make: *** [default] Error 2
> [j8ker@purgatory ibm-acpi-0.11]$
>
> Hope this helps

Same here:

bash-3.00$ patch ibm_acpi.c
../../patches/ibm_add_full-speed_adjust_status.diff
patching file ibm_acpi.c
bash-3.00$ make
make -C /lib/modules/2.6.12.5/build
SUBDIRS=/home/leon/build/ibm-acpi-0.11 modules
make[1]: Entering directory `/home/leon/build/linux-2.6.12.5'
  CC [M]  /home/leon/build/ibm-acpi-0.11/ibm_acpi.o
/home/leon/build/ibm-acpi-0.11/ibm_acpi.c: In function `fan_read':
/home/leon/build/ibm-acpi-0.11/ibm_acpi.c:1494: warning: pointer/integer
type mismatch in conditional expression
/home/leon/build/ibm-acpi-0.11/ibm_acpi.c:1494: error: syntax error
before ':' token
make[2]: *** [/home/leon/build/ibm-acpi-0.11/ibm_acpi.o] Error 1
make[1]: *** [_module_/home/leon/build/ibm-acpi-0.11] Error 2
make[1]: Leaving directory `/home/leon/build/linux-2.6.12.5'
make: *** [default] Error 2
bash-3.00$

Cheers, Leon.