# Intel 82801BA and lm_sensors

## Telemin

I followed  this  howto in the gentoo wiki in an attempt to get the i2c sensors to work.  But with no luck.  When i run sensors-detect it gives me this:

```

gentoo dev # sensors-detect

# sensors-detect revision 1.393 (2005/08/30 18:51:18)

This program will help you determine which I2C/SMBus modules you need to

load to use lm_sensors most effectively. You need to have i2c and

lm_sensors installed before running this program.

Also, you need to be `root', or at least have access to the /dev/i2c-*

files, for most things.

If you have patched your kernel and have some drivers built in, you can

safely answer NO if asked to load some modules. In this case, things may

seem a bit confusing, but they will still work.

It is generally safe and recommended to accept the default answers to all

questions, unless you know what you're doing.

 We can start with probing for (PCI) I2C or SMBus adapters.

 You do not need any special privileges for this.

 Do you want to probe now? (YES/no):

Probing for PCI bus adapters...

Use driver `i2c-i810' for device 00:02.0: Intel 82815 GMCH

Probe succesfully concluded.

We will now try to load each adapter module in turn.

Module `i2c-i810' already loaded.

If you have undetectable or unsupported adapters, you can have them

scanned by manually loading the modules before running this script.

 To continue, we need module `i2c-dev' to be loaded.

 If it is built-in into your kernel, you can safely skip this.

i2c-dev is already loaded.

 We are now going to do the adapter probings. Some adapters may hang halfway

 through; we can't really help that. Also, some chips will be double detected;

 we choose the one with the highest confidence value in that case.

 If you found that the adapter hung after probing a certain address, you can

 specify that address to remain unprobed. That often

 includes address 0x69 (clock chip).

Some chips are also accessible through the ISA bus. ISA probes are

typically a bit more dangerous, as we have to write to I/O ports to do

this. This is usually safe though.

Do you want to scan the ISA bus? (YES/no):

Probing for `National Semiconductor LM78'

  Trying address 0x0290... Failed!

Probing for `National Semiconductor LM78-J'

  Trying address 0x0290... Failed!

Probing for `National Semiconductor LM79'

  Trying address 0x0290... Failed!

Probing for `Winbond W83781D'

  Trying address 0x0290... Failed!

Probing for `Winbond W83782D'

  Trying address 0x0290... Failed!

Probing for `Winbond W83627HF'

  Trying address 0x0290... Failed!

Probing for `Winbond W83627EHF'

  Trying address 0x0290... Failed!

Probing for `Winbond W83697HF'

  Trying address 0x0290... Failed!

Probing for `Silicon Integrated Systems SIS5595'

  Trying general detect... Failed!

Probing for `VIA Technologies VT82C686 Integrated Sensors'

  Trying general detect... Failed!

Probing for `VIA Technologies VT8231 Integrated Sensors'

  Trying general detect... Failed!

Probing for `ITE IT8712F'

  Trying address 0x0290... Failed!

Probing for `ITE IT8705F / SiS 950'

  Trying address 0x0290... Failed!

Probing for `IPMI BMC KCS'

  Trying address 0x0ca0... Failed!

Probing for `IPMI BMC SMIC'

  Trying address 0x0ca8... Failed!

Some Super I/O chips may also contain sensors. Super I/O probes are

typically a bit more dangerous, as we have to write to I/O ports to do

this. This is usually safe though.

Do you want to scan for Super I/O sensors? (YES/no):

Probing for `ITE 8702F Super IO Sensors'

  Failed! (0x5d00)

Probing for `ITE 8705F Super IO Sensors'

  Failed! (0x5d00)

Probing for `ITE 8712F Super IO Sensors'

  Failed! (0x5d00)

Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87360 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87363 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87364 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87365 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87365 Super IO Voltage Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87365 Super IO Thermal Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87366 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87366 Super IO Voltage Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87366 Super IO Thermal Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87372 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87373 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87591 Super IO'

  Failed! (0x5d)

Probing for `Nat. Semi. PC87371 Super IO'

  Failed! (0x5d)

Probing for `Nat. Semi. PC97371 Super IO'

  Failed! (0x5d)

Probing for `Nat. Semi. PC8739x Super IO'

  Failed! (0x5d)

Probing for `Nat. Semi. PC8741x Super IO'

  Failed! (0x5d)

Probing for `Nat. Semi. PCPC87427 Super IO'

  Failed! (0x5d)

Probing for `SMSC 47B27x Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `SMSC 47M10x/13x Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `SMSC 47M14x Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `SMSC 47M15x/192 Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `SMSC 47S42x Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `SMSC 47S45x Super IO Fan Sensors'

  Failed! (0x5d)

Probing for `SMSC 47M172 Super IO'

  Failed! (0x5d)

Probing for `SMSC LPC47B397-NC Super IO'

  Failed! (0x5d)

Probing for `VT1211 Super IO Sensors'

  Failed! (skipping family)

Probing for `Winbond W83627EHF/EHG Super IO Sensors'

  Failed! (skipping family)

Do you want to scan for secondary Super I/O sensors? (YES/no):

Probing for `ITE 8702F Super IO Sensors'

  Failed! (skipping family)

Probing for `Nat. Semi. PC87351 Super IO Fan Sensors'

  Failed! (skipping family)

Probing for `SMSC 47B27x Super IO Fan Sensors'

  Failed! (skipping family)

Probing for `VT1211 Super IO Sensors'

  Failed! (skipping family)

Probing for `Winbond W83627EHF/EHG Super IO Sensors'

  Failed! (skipping family)

 Sorry, no chips were detected.

 Either your sensors are not supported, or they are

 connected to an I2C bus adapter that we do not support.

 See doc/FAQ, doc/lm_sensors-FAQ.html, or

 http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/lm_sensors-FAQ.html

 (FAQ #4.24.3) for further information.

 If you find out what chips are on your board, see

 http://secure.netroedge.com/~lm78/newdrivers.html for driver status.

```

I have read the lm-sensors website and it appears that the 82801BA needs the i2c-i801 kernel module but running sensors-detect doesn't load it and when I modprobe it it loads but sesnors-detect still doesn't pick up any sensors:

```

gentoo dev # lsmod

Module                  Size  Used by

i2c_dev                 8960  0

i2c_i810                5636  0

i2c_algo_bit            9992  1 i2c_i810

i2c_core               18688  2 i2c_dev,i2c_algo_bit

ndiswrapper           168340  0

```

Can anyone shed any light on what I'm doing wrong here?  

Thanks in advance

-Freestyling-

----------

## dgaffuri

It could be hidden by BIOS. Is it a notebook?

----------

## Telemin

No it's a desktop, and I've been through the bios.  Theres no mention of anything to do with hardware sensors, i2c busses etc.

----------

## dgaffuri

In many notebooks and in some desktop mb (like ASUS ones) the SMBus is hidden, and there's no option in BIOS to enable it. This is an excerpt of my lspci output (Toshiba Tecra M2 notebook)

```
0000:00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)

0000:00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)

0000:00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)

0000:00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)

0000:00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)
```

The device at 1f.3 needed a kernel patch to be visible (mine it's included starting from 2.6.13). If you want you may post your lspci and lspci -n results, so we may check if it this could be the case.

----------

## Telemin

sorry for the delay I've been away for a week.  Here they are though:

```

lspci

0000:00:00.0 Host bridge: Intel Corp. 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02)

0000:00:02.0 VGA compatible controller: Intel Corp. 82815 CGC [Chipset Graphics Controller] (rev 02)

0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev 01)

0000:00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 01)

0000:00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 01)

0000:00:1f.4 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #2) (rev 01)

0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801BA/BAM AC'97 Audio (rev 01)

0000:02:08.0 Ethernet controller: Intel Corp. 82801BA/BAM/CA/CAM Ethernet Controller (rev 01)

0000:02:09.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

0000:02:0a.0 USB Controller: OPTi Inc. 82C861 (rev 10)

```

and

```

lspci -n

0000:00:00.0 Class 0600: 8086:1130 (rev 02)

0000:00:02.0 Class 0300: 8086:1132 (rev 02)

0000:00:1e.0 Class 0604: 8086:244e (rev 01)

0000:00:1f.0 Class 0601: 8086:2440 (rev 01)

0000:00:1f.1 Class 0101: 8086:244b (rev 01)

0000:00:1f.4 Class 0c03: 8086:2444 (rev 01)

0000:00:1f.5 Class 0401: 8086:2445 (rev 01)

0000:02:08.0 Class 0200: 8086:2449 (rev 01)

0000:02:09.0 Class 0280: 14e4:4320 (rev 03)

0000:02:0a.0 Class 0c03: 1045:c861 (rev 10)

```

----------

## dgaffuri

OK, just follow these instructions if you want to find if it's hidden. Look at mine

```
# lspci -n

0000:00:00.0 Class 0600: 8086:3340 (rev 21)

0000:00:01.0 Class 0604: 8086:3341 (rev 21)

0000:00:1d.0 Class 0c03: 8086:24c2 (rev 03)

0000:00:1d.1 Class 0c03: 8086:24c4 (rev 03)

0000:00:1d.2 Class 0c03: 8086:24c7 (rev 03)

0000:00:1d.7 Class 0c03: 8086:24cd (rev 03)

0000:00:1e.0 Class 0604: 8086:2448 (rev 83)

0000:00:1f.0 Class 0601: 8086:24cc (rev 03)

0000:00:1f.1 Class 0101: 8086:24ca (rev 03)

0000:00:1f.3 Class 0c05: 8086:24c3 (rev 03)

0000:00:1f.5 Class 0401: 8086:24c5 (rev 03)

0000:00:1f.6 Class 0703: 8086:24c6 (rev 03)

0000:01:00.0 Class 0300: 10de:0328 (rev a1)

0000:02:05.0 Class 0280: 8086:4220 (rev 05)

0000:02:07.0 Class 0c00: 104c:8023

0000:02:09.0 Class 0200: 8086:1016 (rev 03)

0000:02:0b.0 Class 0607: 1179:0617 (rev 32)

0000:02:0b.1 Class 0607: 1179:0617 (rev 32)

0000:02:0d.0 Class 0880: 1179:0805 (rev 03)
```

Note that in my case you already see the unhidden SMBus chip:

```
0000:00:1f.3 Class 0c05: 8086:24c3 (rev 03)
```

that with plain lspci show

```
0000:00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)
```

The first line of lspci output is your host bridge (Intel Corp. 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02).  Look at device ID (3340 in my configuration, 1130 in yours). Grep this in

```
./include/linux/pci_ids.h:#define PCI_DEVICE_ID_INTEL_82815_MC    0x1130
```

Now run

```
# lspci -nvx -d 8086:3340

0000:00:00.0 Class 0600: 8086:3340 (rev 21)

        Subsystem: 1179:0001

        Flags: bus master, fast devsel, latency 0

        Memory at e0000000 (32-bit, prefetchable)

        Capabilities: [e4] #09 [4104]

        Capabilities: [a0] AGP version 2.0

00: 86 80 40 33 06 00 90 20 21 00 00 06 00 00 00 00

10: 08 00 00 e0 00 00 00 00 00 00 00 00 00 00 00 00

20: 00 00 00 00 00 00 00 00 00 00 00 00 79 11 01 00

30: 00 00 00 00 e4 00 00 00 00 00 00 00 00 00 00 00
```

substituting 3340 in the command with your device ID (1130). Look at the last four numbers in the 20 line: these are subvendor (1179) and subdevice id (0001). Look for subvendor id symbolic name in /include/linux/pci_ids.h. For me is:

```
#define PCI_VENDOR_ID_TOSHIBA           0x1179
```

Next you've to find the LPC bridge. Here is mine

```
# lspci

0000:00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)

# lspci -n

0000:00:1f.0 Class 0601: 8086:24cc (rev 03)

# grep 0x24cc include/linux/pci_ids.h

#define PCI_DEVICE_ID_INTEL_82801DB_12  0x24cc

```

Yours should be

```
# lspci

0000:00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 01) 

# lspci -n

0000:00:1f.0 Class 0601: 8086:2440 (rev 01)

# grep 0x2440 include/linux/pci_ids.h

#define PCI_DEVICE_ID_INTEL_82801BA_0   0x2440
```

Now you're ready to patch the drivers/pci/quirks.c. Look at the source code to get the picture (I'm looking at 2.6.14 now). There's a function named asus_hides_smbus_hostbridge which is invoked for the host bridges declared in the macros immediately following:

```
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82845_HB,   asus_hides_smbus_hostbridge );

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82845G_HB,  asus_hides_smbus_hostbridge );

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82850_HB,   asus_hides_smbus_hostbridge );

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82865_HB,   asus_hides_smbus_hostbridge );

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_7205_0,     asus_hides_smbus_hostbridge );

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82855PM_HB, asus_hides_smbus_hostbridge );

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82855GM_HB, asus_hides_smbus_hostbridge );

```

Your host bridge is not there, so you should add

```
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82815_MC, asus_hides_smbus_hostbridge );
```

The function body is a series of if statements like

```
        [else] if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) {

                if (dev->device == PCI_DEVICE_ID_INTEL_82845_HB)

                        switch(dev->subsystem_device) {

                        case 0x8025: /* P4B-LX */

                        case 0x8070: /* P4B */

                        case 0x8088: /* P4B533 */

                        case 0x1626: /* L3C notebook */

                                asus_hides_smbus = 1;

                        }

        }
```

The asus_hide_smbus variable name is because first vendor found to hide the SMBus in BIOS was ASUS. You should add an if at the end like this one (of course look is subvendor is already there and in that case use the existing if statement)

```
       [}] else if (unlikely(dev->subsystem_vendor == <your subvendor>)) {

                if (dev->device == PCI_DEVICE_ID_INTEL_82815_MC)

                        switch(dev->subsystem_device) {

                        case <your subdevice id>: /* <your model> */

                                asus_hides_smbus = 1;

                        }
```

The following function in the source is asus_hides_smbus_lpc, which tries to unhide the SMBus if the asus_hides_smbus variable is set. The macro to invoke it on your LPC bridge is already here:

```
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_82801BA_0,  asus_hides_smbus_lpc );
```

so you don't need to touch anything here.

After rebuilding and rebooting the kernel you should get one of two messages in dmesg

```
PCI: i801 SMBus device continues to play 'hide and seek'!

  or

PCI: Enabled i801 SMBus device
```

If your patch works you may submit it to the kernel mailing list to be included in some future release. For reference, this was my patch against vanilla 2.6.12, taht is now included in 2.6.13.

```

--- linux-2.6.12//drivers/pci/quirks.c.orig     2005-06-17 21:48:29.000000000 +0200

+++ linux-2.6.12//drivers/pci/quirks.c  2005-06-18 15:03:49.000000000 +0200

@@ -819,6 +819,11 @@ static void __init asus_hides_smbus_host

                        case 0x0001: /* Toshiba Satellite A40 */

                                asus_hides_smbus = 1;

                        }

+               if (dev->device ==  PCI_DEVICE_ID_INTEL_82855PM_HB)

+                       switch(dev->subsystem_device) {

+                       case 0x0001: /* Toshiba Tecra M2 */

+                               asus_hides_smbus = 1;

+                       }

        } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG)) {

                if (dev->device ==  PCI_DEVICE_ID_INTEL_82855PM_HB)

                        switch(dev->subsystem_device) {

```

Hope this may be helpful.

----------

## Telemin

Thanks for your help dgaffuri but unfortunately the output from lspci doesn't help me...

```

gentoo linux # lspci -nvx -d 8086:1130

0000:00:00.0 Class 0600: 8086:1130 (rev 02)

        Flags: bus master, fast devsel, latency 0

        Capabilities: [88] #09 [f104]

00: 86 80 30 11 06 01 90 20 02 00 00 06 00 00 00 00

10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

30: 00 00 00 00 88 00 00 00 00 00 00 00 00 00 00 00

```

as you can see it doesn't give me any vendor id's.

Any ideas on this one?

Thanks in advance 

Freestyling

----------

## dgaffuri

 *freestyling wrote:*   

> Any ideas on this one?

 

No, I'm sorry.

----------

