]> git.itanic.dy.fi Git - linux-stable/commit
i2c: imx: Check for I2SR_IAL after every byte
authorChristian Eggers <ceggers@arri.de>
Fri, 9 Oct 2020 11:03:19 +0000 (13:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Dec 2020 12:36:45 +0000 (13:36 +0100)
commit735f3adc2b4b75cf8e6c554759346edf772939fd
tree2bb15ba357fb29efe0d6d53cd03cbe2c3e70569e
parentf8927031e07b904aa775dadecaa732e8b3bd809e
i2c: imx: Check for I2SR_IAL after every byte

commit 1de67a3dee7a279ebe4d892b359fe3696938ec15 upstream.

Arbitration Lost (IAL) can happen after every single byte transfer. If
arbitration is lost, the I2C hardware will autonomously switch from
master mode to slave. If a transfer is not aborted in this state,
consecutive transfers will not be executed by the hardware and will
timeout.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Tested (not extensively) on Vybrid VF500 (Toradex VF50):
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-imx.c