]> asedeno.scripts.mit.edu Git - linux.git/commit
i2c: iproc: Fix i2c master read more than 63 bytes
authorRayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Wed, 24 Jul 2019 08:28:27 +0000 (13:58 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 1 Aug 2019 12:31:00 +0000 (14:31 +0200)
commitfd01eecdf9591453177d7b06faaabef8c300114a
tree1aad80ae0bbe3f6b1a149edcd34ee63cad0259d3
parent3a5ff11be8dc1f5ea4e89158623204672fc588de
i2c: iproc: Fix i2c master read more than 63 bytes

Use SMBUS_MASTER_DATA_READ.MASTER_RD_STATUS bit to check for RX
FIFO empty condition because SMBUS_MASTER_FIFO_CONTROL.MASTER_RX_PKT_COUNT
is not updated for read >= 64 bytes. This fixes the issue when trying to
read from the I2C slave more than 63 bytes.

Fixes: c24b8d574b7c ("i2c: iproc: Extend I2C read up to 255 bytes")
Cc: stable@kernel.org
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-bcm-iproc.c