From: Jean Delvare <[email protected]> Subject: i2c-i801: Don't use the block buffer for I2C block writes
Experience has shown that the block buffer can only be used for SMBus (not I2C) block transactions, even though the datasheet doesn't mention this limitation. Signed-off-by: Jean Delvare <[email protected]> Cc: Felix Rubinstein <[email protected]> Cc: Oleg Ryjkov <[email protected]> Cc: Seth Heasley <[email protected]> --- Oleg, can you remember which transaction types you tested when you added support for the block buffer originally? Seth, do you have any additional information regarding the use of the 32-byte block buffer with I2C block read and write transactions on Intel ICH chips? The datasheet doesn't say it won't work, but experience suggests that this is the case. Which is unfortunate because it degrades performance quite a bit. drivers/i2c/busses/i2c-i801.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- linux-2.6.34-rc0.orig/drivers/i2c/busses/i2c-i801.c 2010-03-04 10:54:22.000000000 +0100 +++ linux-2.6.34-rc0/drivers/i2c/busses/i2c-i801.c 2010-03-04 10:54:28.000000000 +0100 @@ -416,9 +416,11 @@ static int i801_block_transaction(union data->block[0] = 32; /* max for SMBus block reads */ } + /* Experience has shown that the block buffer can only be used for + SMBus (not I2C) block transactions, even though the datasheet + doesn't mention this limitation. */ if ((i801_features & FEATURE_BLOCK_BUFFER) - && !(command == I2C_SMBUS_I2C_BLOCK_DATA - && read_write == I2C_SMBUS_READ) + && command != I2C_SMBUS_I2C_BLOCK_DATA && i801_set_block_buffer_mode() == 0) result = i801_block_transaction_by_block(data, read_write, hwpec); -- Jean Delvare -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
