Skip to contentSkip to conversation

Ticket #1941: nforce4 support in sensors-detect

DISCUSSION Jean Delvare 3 participants 12 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

Here is a patch to sensors-detect which should add detection for your nForce4 SMBus. Can you please try and report? If it doesn't work, please provide the output of lspci -v and lspci -n.

Thanks,

Signature · 31 lines
Jean Delvare
-------------- next part --------------
Index: prog/detect/sensors-detect
=================================RCS file: /home/cvs/lm_sensors2/prog/detect/sensors-detect,v
retrieving revision 1.376
diff -u -r1.376 sensors-detect
--- prog/detect/sensors-detect	20 Mar 2005 21:10:24 -0000	1.376
+++ prog/detect/sensors-detect	25 Mar 2005 21:23:03 -0000
@@ -670,6 +670,22 @@
        match => sub { $_[0] =~ /^SMBus nForce2 adapter at / },
      }, 
      {
+       vendid => 0x10de,
+       devid  => 0x00E4,
+       func => 1,
+       procid => "nVidia Corporation nForce3 250Gb SMBus (MCP)",
+       driver => "i2c-nforce2",
+       match => sub { $_[0] =~ /^SMBus nForce2 adapter at / },
+     }, 
+     {
+       vendid => 0x10de,
+       devid  => 0x0052,
+       func => 1,
+       procid => "nVidia Corporation nForce4 SMBus (MCP)",
+       driver => "i2c-nforce2",
+       match => sub { $_[0] =~ /^SMBus nForce2 adapter at / },
+     }, 
+     {
        vendid => 0x1166,
        devid  => 0x0200,
        func => 0,
#1 lore raw

Hello,
Thank you for a prompt peply.
I have not been able to test the patch since the patching process is taking longer than it should for me. I originally used gentoo's portage to install lm_sensors, and I don't know how to patch the ebuild (package) yet. On the other hand, I have yet to successfully compile lm_sensors from source 'manually'.

In the mean time, I decided to give you my lspci info anyways.

Thank you for your time.

Quoted 12 lines · Jean Delvare

Hi,

Here is a patch to sensors-detect which should add detection for your nForce4 SMBus. Can you please try and report? If it doesn't work, please provide the output of lspci -v and lspci -n.

Thanks,
--
Jean Delvare

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lspciv
Type: application/octet-stream
Size: 8025 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050326/c4f05c45/lspciv.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lspcin
Type: application/octet-stream
Size: 1019 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050326/c4f05c45/lspcin.obj

#2 lore raw
In reply to Jean Delvare

Yeah, the new script doesn't help since I do have the IT8712F chip. Here's:

# cat /proc/ioports
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
02f8-02ff : serial
0376-0376 : ide1
0378-037a : parport0
03c0-03df : vga+
03f8-03ff : serial
0970-0977 : 0000:00:07.0
  0970-0977 : sata_nv
09f0-09f7 : 0000:00:07.0
  09f0-09f7 : sata_nv
0b70-0b73 : 0000:00:07.0
  0b70-0b73 : sata_nv
0bf0-0bf3 : 0000:00:07.0
  0bf0-0bf3 : sata_nv
0cf8-0cff : PCI conf1
1000-107f : motherboard
  1000-1003 : PM1a_EVT_BLK
  1004-1005 : PM1a_CNT_BLK
  1008-100b : PM_TMR
  1010-1015 : ACPI CPU throttle
  101c-101c : PM2_CNT_BLK
  1020-1027 : GPE0_BLK
1080-10ff : motherboard
1400-147f : motherboard
1480-14ff : motherboard
  14a0-14af : GPE1_BLK
1800-187f : motherboard
1880-18ff : motherboard
1c00-1c3f : 0000:00:01.1
1c40-1c7f : 0000:00:01.1
6000-6fff : PCI Bus #04
7000-7fff : PCI Bus #03
8000-8007 : 0000:01:09.0
8400-8403 : 0000:01:09.0
8800-8807 : 0000:01:09.0
8c00-8c03 : 0000:01:09.0
9000-900f : 0000:01:09.0
a000-afff : PCI Bus #02
  a000-a0ff : 0000:02:00.0
    a000-a0ff : sk98lin
b400-b4ff : 0000:00:04.0
b800-b8ff : 0000:00:04.0
d400-d40f : 0000:00:07.0
  d400-d40f : sata_nv
d800-d81f : 0000:00:01.1
dc00-dc07 : 0000:00:0a.0
  dc00-dc07 : forcedeth
f000-f00f : 0000:00:06.0
  f000-f007 : ide0
  f008-f00f : ide1

That is with these modules loaded:

# lsmod
Module                  Size  Used by
it87                   25884  0 
i2c_sensor              3200  1 it87
i2c_isa                 2432  0 
i2c_dev                10240  0 
i2c_nforce2             5760  0 
i2c_core               19736  5 it87,i2c_sensor,i2c_isa,i2c_dev,i2c_nforce2
vmnet                  28632  12 
vmmon                 170060  0 
nvidia               4559932  12 

From what I can see, nothing else is using the chip. I might be wrong in my interpretations though.

#4 lore raw
In reply to Jean Delvare

By the way, is there a reason why I can't find my ticket by its number?
http://www2.lm-sensors.nu/~lm78/support2.html?search41&sort=index
leads to an error page with "Sorry, nothing found. Try searching for something less specific, or 'list all'"

...

I just understood the syntax of /proc/ioports and I see that the 02f8-02ff range is taken by the serial driver or something.
This kind of makes sense after looking at the mobo block diagram from gigabyte:

page 7 of:
http://america.giga-byte.com/MotherBoard/FileList/Manual/manual_k8nxpsli_e.pdf

My IT8712F chip controls the COM port.

o_O

Thanks.

#5 lore raw
In reply to Jean Delvare

Hi all,

[Mark D. Studebaker]

Quoted 2 lines

from the lspci outputs it looks like Khali got it right, so Khali please check in your change.

OK, done.

Michael, this means that you can pick the latest CVS version of sensors-detect here:
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/prog/detect/sensors-detect

and give it a try. That should be easier than patching an original source tree (this script is in Perl so it doesn't need to be compiled anyway).

That being said, it's quite clear that your hardware monitoring chip is an IT8712F on the ISA bus, so I don't think sensors-detect will find much on the SMBus - if the i2c-nforce2 module you have does support the nforce4 at all.

The real problem in your case is that the it87 driver fails to control your IT8712F chip. As I said in the support ticket, you should check in /proc/ioports if someone else already requested that region.

Thanks,

Signature · 1 line
Jean Delvare
#7 lore raw
In reply to Jean Delvare
Quoted 6 lines

Yeah, the new script doesn't help since I do have the IT8712F chip. Here's:

# cat /proc/ioports
(...)
0170-0177 : ide1
02f8-02ff : serial

So the 0x290-0x297 range is actually free.

Quoted 9 lines

That is with these modules loaded:

# lsmod
Module                  Size  Used by
it87                   25884  0 
i2c_sensor              3200  1 it87
i2c_isa                 2432  0 
i2c_dev                10240  0 
i2c_nforce2             5760  0 
i2c_core               19736  5 it87,i2c_sensor,i2c_isa,i2c_dev,i2c_nforce2

So the it87 driver should have requested the range, but for some reason did not.

Quoted 2 lines

From what I can see, nothing else is using the chip. I might be wrong in my interpretations though.

No, you are correct.

Ah, maybe I get it. Can you please provide the output of:
isadump -f 0x290 16

We had reports that the latest revisions of the IT8712F do not pass some legacy test:
http://bugzilla.kernel.org/show_bug.cgi?idC35
http://archives.andrew.net.au/lm-sensors/msg29962.html

Maybe that's your case. If it is, know that a fix has already been applied to the driver:
http://archives.andrew.net.au/lm-sensors/msg29992.html

But it'll take some time to reach Linus' tree, of course. It's already in -mm though.

Signature · 1 line
Jean Delvare
#8 lore raw
In reply to Jean Delvare
Quoted 8 lines · Michael P

Hello,
Thank you for a prompt peply.
I have not been able to test the patch since the patching process is taking longer than it should for me. I originally used gentoo's portage to install lm_sensors, and I don't know how to patch the ebuild (package) yet. On the other hand, I have yet to successfully compile lm_sensors from source 'manually'.

Quoted 19 lines

In the mean time, I decided to give you my lspci info anyways.

Thank you for your time.

Quoted 12 lines · Jean Delvare

Hi,

Here is a patch to sensors-detect which should add detection for your nForce4 SMBus. Can you please try and report? If it doesn't work, please provide the output of lspci -v and lspci -n.

Thanks,
--
Jean Delvare

thanks.
from the lspci outputs it looks like Khali got it right, so Khali please check in your change.
mds

#9 lore raw
In reply to Jean Delvare
# isadump -f 0x290 16
WARNING! Running this program can cause system crashes, data loss and worse!
I will probe address range 0x290 to 0x29f.
Continue? [Y/n] Y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: ff ff ff ff 71 13 71 71 ff ff ff ff ff ff ff ff 

I'm convinced that those bug reports talk about my problem.

Thank you.

#10 lore raw
In reply to Jean Delvare

Hah! I tried the "modprobe it87 force‘91,0x290" method, and basically, it didn't work.
The module loaded fine. When I executed 'sensors -s' one of the chips on the motherboard (not the case speaker) started making a continuous beep (hope that makes sense). At such a late hour I did not wait check dmesg or anything and quickly rebooted the system. After rebooting, I decided to listen to some music (with headphones connected to my speakers). When ALSA modules loaded and the sound volume was raised my external speakers (connected to a PCI snd. card through a sub) decided to play the same note (continuous beep). This speaker weirdness didn't stop until I totally powered the system down. The PSU had to be unplugged, and I waited about 30 seconds before powering the system (including the sup+speakers) back up. Only then, this sound never came back again.
Note that the speakers made the noise only when the volume was turned up, and all of this is completely reproducible.

#11 lore raw
In reply to Jean Delvare
Quoted 8 lines
# isadump -f 0x290 16
WARNING! Running this program can cause system crashes, data loss and
worse! I will probe address range 0x290 to 0x29f.
Continue? [Y/n] Y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: ff ff ff ff 71 13 71 71 ff ff ff ff ff ff ff ff 

I'm convinced that those bug reports talk about my problem.

And quite rightly so. The detection code expects values at 1, 2, 3 and 7 above to be the same. It fails for 7 in your case, obviously.

So the bug was already known, and a fix is already on it's way to Linus' tree. All you have to do is wait for it to show.

In the meantime, you can use "modprobe it87 force‘91,0x290" to skip the detection step.

I'll update the ticket now.

Signature · 1 line
Jean Delvare