On Mon, Mar 07, 2016 at 04:10:47PM +0100, Jan Glauber wrote: > From: David Daney <david.daney@xxxxxxxxxx> > > If I2C_M_RECV_LEN is set consider the length byte. > > Signed-off-by: David Daney <ddaney@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Jan Glauber <jglauber@xxxxxxxxxx> You also might want to set "| I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_BLOCK_PROC_CALL" in your functionality? > + if (recv_len && i == 0) { > + if (data[i] > I2C_SMBUS_BLOCK_MAX + 1) { > + dev_err(i2c->dev, > + "%s: read len > I2C_SMBUS_BLOCK_MAX %d\n", > + __func__, data[i]); > + return -EIO; According to Documentation/i2c/fault-codes this should be -EPROTO.
Attachment:
signature.asc
Description: PGP signature