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:59:36 +0000 (11:59 +0100)
commitb925c9de46870853476456140cf2314c7fbcb667
treedecba0c44670908ca48100e3570a84a195330977
parent17e5530a74af3cd8a0f8af1d05651f271d61a58b
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