Hi Felix, On Mon, 22 Feb 2010 18:12:41 +0200, Felix Rubinstein wrote: > Hi Jean/i2c guys, > > I'm having hard time to send straight I2C transaction of arbitrary length. > I use i2c_smbus_write_i2c_block_data(fd, buf[0], datac - 1, &buf[1]); > from user-space to send the aforementioned transaction, but I get > operation not permitted as a result. > I tried to understand what's going on in the driver and found out that > timeout occurs. Unlikely. If a timeout occurred, the error message would say so. What is the exact error message? Can we see your complete code? Don't forget that you must be root to use i2c-dev. > As a consequence, I'd like to get something clear to me: > Since ICH9 supports 32-Byte Buffer (E32B) and according to the data > sheet the DS bit of the HST_STS is meaningless when E32B is enabled > and it's (E32B) enabled by the i801 driver. > On the other hand, in i801_check_pre called (from > i801_block_transaction_by_block) the macro STATUS_FLAGS verifies the > DS bit (designated as SMBHSTSTS_BYTE_DONE in the code). > Looking at the previous version of the driver, like in 2.5.25 there > was a mask 0x1f but it has gone since. > Is this behavior correct? The change happened in this patch: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=cf898dc5e9dfd1487b28ca0176b68722f05d4d48 The new behavior is believed to be correct. I agree that SMBHSTSTS_BYTE_DONE doesn't matter for block transactions, but checking this bit can't hurt. > And another question related. Have you/anyone tried to output I2C > write transaction of arbitrary length, i.e. DATA0 is not sent on the > bus, from ICH9? I don't have any device on my ICH SMBus to which I can issue an I2C block write, sorry. I did test block reads though, and successfully. -- Jean Delvare http://khali.linux-fr.org/wishlist.html -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html