linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.10-mm2: it87 sensor driver stops CPU fan
@ 2005-01-08  0:50 Simone Piunno
  2005-01-08  9:34 ` Jean Delvare
  2005-01-08 16:20 ` 2.6.10-mm2: it87 sensor driver stops CPU fan Jean Delvare
  0 siblings, 2 replies; 33+ messages in thread
From: Simone Piunno @ 2005-01-08  0:50 UTC (permalink / raw)
  To: Andrew Morton; +Cc: djg, greg, sensors, linux-kernel


Hi,

Today I've tried 2.6.10-mm2 compiled for x86_64 and found something bad.
As soon as I modprobe it87 (one of the i2c sensors drivers) the CPU fan 
completely halts and the CPU temperature skyrockets even while idle.
For context:
I have an Athlon64 3200+ on a Gigabyte K8VT800 motherboard (i2c_viapro module)
running Gentoo compiled in x86_64 mode, it87 is controlled through ISA bus, 
VT8237 ISA bridge.

The same setup doesn't show the problem on vanilla 2.6.10 and neither on the 
last -mm I tried, which IIRC was 2.6.9-rc4-mm1.

After some tweaking, it looks like ACPI is not the problem (tried to look at 
full debug trace, nothing appears when loading it87).  Instead, I've found I 
can control the fan speed using /sys/devices/platform/i2c-0/0-0290/pwm1 and
initially it is set to 225, but setting it to 0 the fan runs at max speed.
Intermediate values works as well: the higher the value, the slower the fan.

I've google for this sysfs interface and found than everyone expects pwm* 
values to have the reverse meaning: 255 should be max speed and 0 should halt 
the fan.  So apparently the problem is really in the it87 driver, using the 
wrong coefficient for this scale and therefore setting it to the wrong 
default value.

Comparing drivers/i2c/chips/it87.c in 2.6.10 vanilla and 2.6.10-mm2, I've 
found only -mm tree includes the pwm fan controller.  

I think a quick fix could be the following, but didn't try it.

--- drivers/i2c/chips/it87.c    2005-01-07 15:13:52.000000000 +0100
+++ drivers/i2c/chips/it87.c.new        2005-01-08 01:41:16.000000000 +0100
@@ -163,8 +163,8 @@

 #define ALARMS_FROM_REG(val) (val)

-#define PWM_TO_REG(val)   ((val) >> 1)
-#define PWM_FROM_REG(val) (((val)&0x7f) << 1)
+#define PWM_TO_REG(val)   ((255-val) >> 1)
+#define PWM_FROM_REG(val) (255-(((val)&0x7f) << 1))

 static int DIV_TO_REG(int val)
 {

Regards,
  Simone Piunno
-- 
http://thisurlenablesemailtogetthroughoverzealousspamfilters.org

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2005-01-21  6:43 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-08  0:50 2.6.10-mm2: it87 sensor driver stops CPU fan Simone Piunno
2005-01-08  9:34 ` Jean Delvare
2005-01-10 22:41   ` Simone Piunno
2005-01-11  9:26     ` Jean Delvare
2005-01-11 20:24       ` Jonas Munsin
2005-01-11 20:56         ` Jean Delvare
2005-01-11 22:41         ` Greg KH
2005-01-11 21:04       ` Simone Piunno
2005-01-12  9:44         ` Jean Delvare
2005-01-12 22:27       ` Jonas Munsin
2005-01-13 23:29         ` Greg KH
2005-01-14 14:40           ` Jean Delvare
2005-01-15 15:30             ` [PATCH 2.6] I2C: Allow it87 pwm reconfiguration Jean Delvare
2005-01-15 17:18               ` Simone Piunno
2005-01-19 23:23               ` Greg KH
2005-01-15 15:54             ` 2.6.10-mm2: it87 sensor driver stops CPU fan Simone Piunno
2005-01-15 16:55               ` Jean Delvare
2005-01-16 22:32                 ` Simone Piunno
2005-01-17 19:19                   ` Jean Delvare
2005-01-17 19:37                     ` 2.6 Series Mem Mgmt Chris Bookholt
2005-01-17 19:56                       ` Brian Gerst
2005-01-08 16:20 ` 2.6.10-mm2: it87 sensor driver stops CPU fan Jean Delvare
2005-01-08 19:23   ` Simone Piunno
2005-01-10 19:23     ` Simone Piunno
2005-01-10 19:34       ` Jean Delvare
2005-01-19 20:19         ` Nicolas Pitre
2005-01-19 20:52           ` Jean Delvare
2005-01-19 22:10             ` Nicolas Pitre
2005-01-20 11:08               ` Jean Delvare
2005-01-20 16:01                 ` Nicolas Pitre
2005-01-20 16:28                   ` Jean Delvare
2005-01-20 21:19                     ` Nicolas Pitre
2005-01-21  6:46                       ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).