linux/drivers
Henrique de Moraes Holschuh 0081b16202 ACPI: thinkpad-acpi: fix fan sleep/resume path
This fixes a regression from v2.6.27, caused by commit
5814f737e1cd2cfa2893badd62189acae3e1e1fd, "ACPI: thinkpad-acpi:
attempt to preserve fan state on resume".

It is possible for fan_suspend() to fail to properly initialize
fan_control_desired_level as required by fan_resume(), resulting on
the fan always being set to level 7 on resume if the user didn't
touch the fan controller.

In order to get fan sleep/resume handling to work right:

1. Fix the fan_suspend handling of the T43 firmware quirk. If it is
still undefined, we didn't touch the fan yet and that means we have no
business doing it on resume.

2. Store the fan level on its own variable to avoid any possible
issues with hijacking fan_control_desired_level (which isn't supposed
to have anything other than 0-7 in it, anyway).

3. Change the fan_resume code to me more straightforward to understand
(although we DO optimize the boolean logic there, otherwise it looks
disgusting).

4. Add comments to help understand what the code is supposed to be
doing.

5. Change fan_set_level to be less strict about how auto and
full-speed modes are requested.

http://bugzilla.kernel.org/show_bug.cgi?id=11982

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Reported-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-11-26 19:24:22 -05:00
..
accessibility
acpi Revert "ACPI: don't enable control method power button as wakeup device when Fixed Power button is used" 2008-11-26 17:55:15 -05:00
amba Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
ata libata: improve phantom device detection 2008-11-14 18:51:57 -05:00
atm
auxdisplay
base sysfs: Fix return values for sysdev_store_{ulong,int} 2008-10-29 15:03:49 -07:00
block cciss: fix DEBUG printk formats 2008-11-19 18:50:00 -08:00
bluetooth bpa10x: free sk_buff with kfree_skb 2008-10-31 00:40:19 -07:00
cdrom gdrom: Fix compile error 2008-10-28 17:46:02 +09:00
char Merge branch 'doc-subdirs' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs 2008-11-15 11:51:03 -08:00
clocksource Merge branches 'timers/clocksource', 'timers/hrtimers', 'timers/nohz', 'timers/ntp', 'timers/posixtimers' and 'timers/debug' into v28-timers-for-linus 2008-10-20 13:14:06 +02:00
connector
cpufreq
cpuidle regression: disable timer peek-ahead for 2.6.28 2008-11-09 16:28:42 -08:00
crypto
dca [4/4] dca: fixup initialization dependency 2008-11-10 15:01:03 -08:00
dio
dma dmaengine: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-11 13:12:33 -07:00
edac i5000-edac: hold reference to mci kobject 2008-11-12 17:17:16 -08:00
eisa
firewire firewire: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-31 08:48:25 +01:00
firmware trivial: dmi_scan typo 2008-11-07 08:25:43 -08:00
gpio gpiolib: extend gpio label column width in debugfs file 2008-11-19 18:49:57 -08:00
gpu drm/i915: Move legacy breadcrumb out of the reserved status page area 2008-11-11 18:03:28 +10:00
hid HID: don't grab devices with no input 2008-11-14 14:10:01 +01:00
hwmon drivers/hwmon/applesmc.c: add generic MacPro support 2008-11-19 18:49:59 -08:00
i2c i2c: fix i2c-sh_mobile rx underrun 2008-11-13 15:37:07 +09:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2008-11-15 18:58:37 -08:00
idle i7300_idle: Kconfig, show menu only on x86_64 2008-10-28 00:14:47 -04:00
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-11-06 15:55:34 -08:00
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2008-11-12 10:56:31 -08:00
input saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
isdn isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_reply 2008-11-16 23:03:45 -08:00
leds remove unused #include <version.h>'s 2008-11-01 09:50:12 -07:00
lguest
macintosh device create: misc: convert device_create_drvdata to device_create 2008-10-16 09:24:43 -07:00
mca
md dm: avoid destroying table in dm_any_congested 2008-11-13 23:39:14 +00:00
media V4L/DVB (9624): CVE-2008-5033: fix OOPS on tvaudio when controlling bass/treble 2008-11-14 14:39:47 -02:00
memstick [PATCH] switch memstick 2008-10-21 07:48:33 -04:00
message trivial: MPT fusion - remove long dead code 2008-11-07 08:25:43 -08:00
mfd mfd: Correct WM8350 I2C return code usage 2008-11-16 19:58:47 +01:00
misc ACPI: thinkpad-acpi: fix fan sleep/resume path 2008-11-26 19:24:22 -05:00
mmc mmc: struct device - replace bus_id with dev_name(), dev_set_name() 2008-11-08 21:37:46 +01:00
mtd [ARM] cdb89712: avoid namespace clashes with SRAM_ and BOOTROM_ constants 2008-11-13 15:05:03 +00:00
net atl2: don't request irq on resume if netif running 2008-11-20 04:18:25 -08:00
nubus nubus: fix mis-indented statement 2008-10-16 11:21:30 -07:00
of OF-device: Don't overwrite numa_node in device registration 2008-10-31 16:12:01 +11:00
oprofile oprofile: fix memory ordering 2008-10-27 19:15:41 +01:00
parisc [PATCH] introduce fmode_t, do annotations 2008-10-21 07:47:06 -04:00
parport Parport driver: disable pc-style parport on Blackfin systems 2008-11-18 08:10:08 -08:00
pci Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-11-20 13:13:03 -08:00
pcmcia pcmcia: ensure correct logging in do_io_probe 2008-11-09 21:47:47 +01:00
pnp drivers: remove duplicated #include 2008-11-04 08:18:19 -08:00
power Merge git://git.infradead.org/battery-2.6 2008-10-20 09:44:30 -07:00
ps3 powerpc/ps3: Fix compile error in ps3-lpm.c 2008-11-05 19:59:08 +11:00
rapidio
regulator regulator: Use menuconfig in Kconfig 2008-11-09 14:49:23 +00:00
rtc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2008-11-17 07:54:47 -08:00
s390 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-11-15 11:38:02 -08:00
sbus drivers: remove duplicated #include 2008-11-04 08:18:19 -08:00
scsi [SCSI] dpt_i2o: fix transferred data length for scsi_set_resid() 2008-11-15 11:10:14 -06:00
serial serial: sh-sci: Reorder the SCxTDR write after the TDxE clear. 2008-11-13 17:46:06 +09:00
sh
sn
spi spi_imx: full duplex dma corruption bugfix 2008-11-19 18:49:58 -08:00
ssb SSB: hide empty sub menu 2008-11-10 13:50:17 -08:00
staging Don't ask twice about not including staging drivers 2008-11-09 12:47:04 -08:00
tc
telephony telephony: trivial: fix up email address 2008-11-11 09:30:23 -08:00
thermal
uio saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
usb USB: ACE1001 patch for cp2101.c 2008-11-19 22:01:35 -08:00
uwb uwb: wrong sizeof argument in mac address compare 2008-10-20 14:37:53 +01:00
video Merge master.kernel.org:/home/rmk/linux-2.6-arm 2008-11-20 18:08:09 -08:00
virtio
w1 W1 OMAP: Fix OMAP LDP boot crash 2008-11-19 18:50:00 -08:00
watchdog Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-11-11 09:24:31 -08:00
xen xen: fix scrub_page() 2008-11-17 19:11:26 +01:00
zorro
Kconfig regulator: Build on non-ARM platforms 2008-10-28 21:47:17 +00:00
Makefile Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb 2008-10-26 16:35:46 -07:00