i2c: iproc: handle invalid slave state
authorRoman Bacik <roman.bacik@broadcom.com>
Thu, 24 Aug 2023 21:23:51 +0000 (14:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:52:17 +0000 (11:52 +0100)
commit7ee2070589d201f096bdc58e563453568b1cfd14
tree0ee434ff406cfb141833c6ed8ec7e2c0b0f24eb1
parentb5974b0c893ca211a0e9dc63429884fa26f87f47
i2c: iproc: handle invalid slave state

[ Upstream commit ba15a14399c262f91ce30c19fcbdc952262dd1be ]

Add the code to handle an invalid state when both bits S_RX_EVENT
(indicating a transaction) and S_START_BUSY (indicating the end
of transaction - transition of START_BUSY from 1 to 0) are set in
the interrupt status register during a slave read.

Signed-off-by: Roman Bacik <roman.bacik@broadcom.com>
Fixes: 1ca1b4516088 ("i2c: iproc: handle Master aborted error")
Acked-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-bcm-iproc.c