GIT: unionfs2-2.6.27.y: i2c-i801: Don't use the block buffer for I2C block writes
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:24 EDT 2010
commit ae3936ed1af0224a2d38d6b6b1ee62fb8f4c3a5c
Author: Jean Delvare <khali at linux-fr.org>
Date: Sat Mar 13 20:56:53 2010 +0100
i2c-i801: Don't use the block buffer for I2C block writes
commit c074c39d62306efa5ba7c69c1a1531bc7333d252 upstream.
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.
Reported-by: Felix Rubinstein <felixru at gmail.com>
Signed-off-by: Jean Delvare <khali at linux-fr.org>
Cc: Oleg Ryjkov <oryjkov at gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index dc7ea32..177346e 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -413,9 +413,11 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
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);
More information about the unionfs-cvs
mailing list