[i2c] i2c-nforce patch adding a check for read/writes of >=31 bytes
Al Borchers
alb at google.com
Tue May 15 02:14:23 CEST 2007
Jean Delvare wrote:
>>I'm currently working on an issue with the i2c-nforce2 driver, which
>>happens when a block read/write is performed on a non-block register( up
>>until the patch of i2c-nforce.c dated 2006-12-10 it supported the block
>>reads - which is the version I'm using).
>>However, if a block read was done on, say a byte register, the
>>controller would halt and the only way I could bring it back up was to
>>reboot the host.
>
>
> Note that you are simply not supposed to do that in the first place.
> SMBus block transactions should only be run on "registers" which expect
> them.
But such a mistake should only generate an error from the hardware/driver,
not hang the I2C host controller. Unfortunately, the MCP51 I2C host controller
does hang if the device responds to a block read with a length of more than
32 bytes. The driver can save us from that--though it is a question
whether working around this hardware bug risks worse side effects.
> On top of that, the fact is that there are almost no users of SMBus
> block transactions in the kernel anyway, so we really had no reason to
> bother. Do you need these yourself?
We use smbus block transfers to read larger values and update firmware on
our devices--so we depend on them.
-- Al
More information about the i2c
mailing list