[i2c] Request for help getting I2C driver to read SEEPROM on SMBus

Jean Delvare khali at linux-fr.org
Fri Jun 8 15:56:54 CEST 2007


Hi Patrick,

On Thu, 7 Jun 2007 08:20:30 -0700, Patrick Connolly wrote:
> We cannot get the lm-sensors user-space adapter to work on our embedded
> system.  Problem seems to be localized to the Intel 82801 Southbridge.

What is an "lm-sensors user-space adapter"?

> SHORT DESCRIPTION
> We are trying to read an eeprom located on the SMBus ( using
> i2c_smbus_read_byte_data() ).  Debug messages from the driver show that
> the SMBus is busy (or not ready to Transmit).  However there is other
> debug output just before the busy-check which shows some important host
> registers to have all FF's in them; this seems to be abnormal.  We have
> not used "sensors-detect"; it is a perlscript and getting perl onto our
> embedded system would be quite ungainly.  
>  
> Any help would be appreciated.  Details, souce code, and kernel config
> are below.
> Thanks,
> Patrick
>  
> DETAILS:
>  
> The fail occurs at the beginning of the following file/function:
>            drivers/i2c/busses/i2c-i801.c:i801_transaction()
>     Debug information shows that all five registers have FF in them and
> that the SMBus is busy:
> i801_smbus : Transaction (pre): CNT=ff, CMD=ff, ADD=ff, DAT0=ff, DAT1=ff
> i801_smbus : SMBus busy (1f). Resetting...
> i801_smbus : Failed! (1f)

The "SMBus busy" message isn't real. The driver thinks the bus is busy,
but the core problem is that the driver cannot read _anything_ from the
device. This seems to be a very low-level problem, and I don't remember
seeing anything similar.

What motherboard is this? Did you have to unhide the SMBus? Please
provide the output of:
lspci
lspci -n
lspci -s 00:1f.0 -xxx
lspci -s 00:1f.3 -vv
lspci -s 00:1f.3 -xxx

> KERNEL CONFIGURATION   (using 2.6.14.1)

Is this a vanilla 2.6.14.1 kernel, or are there additional patches
applied? Did you try a more recent kernel? 2.6.14 is getting old. You
should be using at least 2.6.14.7.

>    Since we need to reduce the size of the kernel, we've tried to
> eliminate any unnecessary drivers. We've followed the 2.6 Kernel
> Configuration instructions at:
>       http://www.lm-sensors.org/wiki/Kernel2.6
> <http://www.lm-sensors.org/wiki/Kernel2.6> 
>    ...with the following exceptions:
>   * Under I2C_support>I2C_Algorithms : all 3 drivers are configured as
> built-in instead of modules
>   * Under I2C_support>I2C_Hardware_Bus_Support : Intel 82801 is
> configured as built-in and the remaining 20 drivers are excluded
>   * Under I2C_support>Misc_I2C_Chip_support : EEPROM reader and the 3
> Phillips drivers are configured as built-in; remaining 4 drivers are
> excluded.
>   * Under Hardware Monitoring support:  "Hardware Monitoring Support" is
> included as a module but all 27 drivers under it are excluded
>          (all of the above options are under "Device Drivers", of
> course)

Please attach your exact kernel configuration.

-- 
Jean Delvare



More information about the i2c mailing list