Skip to contentSkip to conversation

w83667hg support feedback: some things work, some don't

lm-sensors Christopher Montgomery 2 participants 4 messages Jan 20, 2009 – Jan 30, 2009 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

Hello,

I've tried the w83667hg patch that was posted here last December [1] and found that it basically works but does not correctly determine several aspects of the setup on my ASUS P6T WS Pro motherboard.

Summary: The motherboard has five fan ports, four fans plugged in. However, it mis-senses that the motherboard has only three fan ports. In the 'data->has_fan' initialization code, the patched w83627ehf.c driver reads:

	  data->has_fan = 0x07; /* fan1, fan2 and fan3 */
	  i = w83627ehf_read_value(data, W83627EHF_REG_FANDIV1);
	
	  if ((i & (1 << 2)) && (!fan4pin))
	    data->has_fan |= (1 << 3);
	  if (!(i & (1 << 1)) && (!fan5pin))
	    data->has_fan |= (1 << 4);

On my board, i=0x35, fan4pin=0x40 and fan5pin=0x20. If I comment out the code and simply force data->has_fan=0x1f, I am able to read correct speeds from all five fans.

Next issue; nearly all of the Min/Max values are incorrect. They are both nonsensical and attempts to set them to sane values fail. An example (without forcing the extra fans):

w83667hg-isa-0290

Adapter: ISA adapter
in0:         +1.00 V  (min =  +0.00 V, max =  +1.74 V)
in1:         +1.71 V  (min =  +0.24 V, max =  +1.54 V)   ALARM
in2:         +3.28 V  (min =  +0.38 V, max =  +0.29 V)   ALARM
in3:         +3.26 V  (min =  +3.09 V, max =  +2.40 V)   ALARM
in4:         +1.69 V  (min =  +1.57 V, max =  +0.26 V)   ALARM
in5:         +2.04 V  (min =  +0.56 V, max =  +0.00 V)   ALARM
in6:         +1.02 V  (min =  +1.57 V, max =  +1.34 V)   ALARM
in7:         +3.39 V  (min =  +0.77 V, max =  +2.22 V)   ALARM
in8:         +3.30 V  (min =  +2.11 V, max =  +1.71 V)   ALARM
fan1:        917 RPM  (min =  200 RPM, div = 64)
fan2:       1222 RPM  (min =  502 RPM, div = 16)
fan3:          0 RPM  (min = 10546 RPM, div = 128)  ALARM
temp1:       +45.0°C  (high = +57.0°C, hyst = +10.0°C)  sensor = thermistor
temp2:       +45.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = diode
temp3:      +124.5°C  (high = +80.0°C, hyst = +75.0°C)  ALARM  sensor

= thermistor
cpu0_vid: +2.050 V

FTR, fan3 really isn't connected, so the value of zero is correct.

By all means, let me know what I can do in the way of any more testing. Thanks!

[1] http://lists.lm-sensors.org/pipermail/lm-sensors/2008-December/024881.html

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw

Re: [lm-sensors] w83667hg support feedback: some things work,

Hi Christopher,

Quoted 19 lines · Christopher Montgomery

Hello,

I've tried the w83667hg patch that was posted here last December [1] and found that it basically works but does not correctly determine several aspects of the setup on my ASUS P6T WS Pro motherboard.

Summary: The motherboard has five fan ports, four fans plugged in. However, it mis-senses that the motherboard has only three fan ports. In the 'data->has_fan' initialization code, the patched w83627ehf.c driver reads:

	  data->has_fan = 0x07; /* fan1, fan2 and fan3 */
	  i = w83627ehf_read_value(data, W83627EHF_REG_FANDIV1);
	
	  if ((i & (1 << 2)) && (!fan4pin))
	    data->has_fan |= (1 << 3);
	  if (!(i & (1 << 1)) && (!fan5pin))
	    data->has_fan |= (1 << 4);
Quoted 3 lines

On my board, i=0x35, fan4pin=0x40 and fan5pin=0x20. If I comment out the code and simply force data->has_fan=0x1f, I am able to read correct speeds from all five fans.

Thanks for reporting. Apparently the pin usage bits have inverted logic between the W83627EHG and the W83667HG. Can you please test the following patch? It should fix your problem.

---
 drivers/hwmon/w83627ehf.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hwmon/w83627ehf.c +4 -4
@@ -1359,8 +1359,8 @@ static int __devinit w83627ehf_probe(str
 		fan5pin = superio_inb(sio_data->sioreg, 0x27) & 0x20;
 		fan4pin = superio_inb(sio_data->sioreg, 0x27) & 0x40;
 	} else {
-		fan5pin = superio_inb(sio_data->sioreg, 0x24) & 0x2;
-		fan4pin = superio_inb(sio_data->sioreg, 0x29) & 0x6;
+		fan5pin = !(superio_inb(sio_data->sioreg, 0x24) & 0x02);
+		fan4pin = !(superio_inb(sio_data->sioreg, 0x29) & 0x06);
 	}
 	superio_exit(sio_data->sioreg);
 
@@ -1372,9 +1372,9 @@ static int __devinit w83627ehf_probe(str
 
 	data->has_fan = 0x07; /* fan1, fan2 and fan3 */
 	i = w83627ehf_read_value(data, W83627EHF_REG_FANDIV1);
-	if ((i & (1 << 2)) && (!fan4pin))
+	if ((i & (1 << 2)) && fan4pin)
 		data->has_fan |= (1 << 3);
-	if (!(i & (1 << 1)) && (!fan5pin))
+	if (!(i & (1 << 1)) && fan5pin)
 		data->has_fan |= (1 << 4);
 
 	/* Read fan clock dividers immediately */
Quoted 23 lines

Next issue; nearly all of the Min/Max values are incorrect. They are both nonsensical and attempts to set them to sane values fail. An example (without forcing the extra fans):

w83667hg-isa-0290

Adapter: ISA adapter
in0:         +1.00 V  (min =  +0.00 V, max =  +1.74 V)
in1:         +1.71 V  (min =  +0.24 V, max =  +1.54 V)   ALARM
in2:         +3.28 V  (min =  +0.38 V, max =  +0.29 V)   ALARM
in3:         +3.26 V  (min =  +3.09 V, max =  +2.40 V)   ALARM
in4:         +1.69 V  (min =  +1.57 V, max =  +0.26 V)   ALARM
in5:         +2.04 V  (min =  +0.56 V, max =  +0.00 V)   ALARM
in6:         +1.02 V  (min =  +1.57 V, max =  +1.34 V)   ALARM
in7:         +3.39 V  (min =  +0.77 V, max =  +2.22 V)   ALARM
in8:         +3.30 V  (min =  +2.11 V, max =  +1.71 V)   ALARM
fan1:        917 RPM  (min =  200 RPM, div = 64)
fan2:       1222 RPM  (min =  502 RPM, div = 16)
fan3:          0 RPM  (min = 10546 RPM, div = 128)  ALARM
temp1:       +45.0°C  (high = +57.0°C, hyst = +10.0°C)  sensor = thermistor
temp2:       +45.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = diode
temp3:      +124.5°C  (high = +80.0°C, hyst = +75.0°C)  ALARM  sensor = thermistor
cpu0_vid:   +2.050 V
Quoted 1 line

FTR, fan3 really isn't connected, so the value of zero is correct.

That's more surprising. How exactly did you attempt to set sane values? If you edited /etc/sensors3.conf, please remember that it takes a "sensors -s" to write the new limits to the chip.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw

Re: [lm-sensors] w83667hg support feedback: some things work,

In reply to Christopher Montgomery
Quoted 3 lines

Thanks for reporting. Apparently the pin usage bits have inverted logic between the W83627EHG and the W83667HG. Can you please test the following patch? It should fix your problem.

I'll check tonight.

Quoted 3 lines

That's more surprising. How exactly did you attempt to set sane values? If you edited /etc/sensors3.conf, please remember that it takes a "sensors -s" to write the new limits to the chip.

Ah, that was certainly my mistake.

Are somewhat scattershot defaults somewhat to be expected?

Monty

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw

Re: [lm-sensors] w83667hg support feedback: some things work,

In reply to Christopher Montgomery
Quoted 6 lines · Christopher Montgomery
Quoted 3 lines

Thanks for reporting. Apparently the pin usage bits have inverted logic between the W83627EHG and the W83667HG. Can you please test the following patch? It should fix your problem.

I'll check tonight.

Quoted 7 lines
Quoted 3 lines

That's more surprising. How exactly did you attempt to set sane values? If you edited /etc/sensors3.conf, please remember that it takes a "sensors -s" to write the new limits to the chip.

Ah, that was certainly my mistake.

Are somewhat scattershot defaults somewhat to be expected?

Yes, this is very frequent.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors