i2c: at91: manage unexpected RXRDY flag when starting a transfer
authorLudovic Desroches <ludovic.desroches@atmel.com>
Mon, 26 Oct 2015 09:38:27 +0000 (10:38 +0100)
committerJiri Slaby <jslaby@suse.cz>
Tue, 11 Apr 2017 06:04:34 +0000 (08:04 +0200)
commit6255124914980206bfdfa65f280653d864d493b4
tree43ab9ebd66cb8f143a307b120454ed0108cf8356
parentee54a9b48c5459ec0b3c4fdd53d4c17bd60bc179
i2c: at91: manage unexpected RXRDY flag when starting a transfer

commit a9bed6b10bd117a300cceb9062003f7a2761ef99 upstream.

In some cases, we could start a new i2c transfer with the RXRDY flag
set. It is not a clean state and it leads to print annoying error
messages even if there no real issue. The cause is only having garbage
data in the Receive Holding Register because of a weird behavior of the
RXRDY flag.

Reported-by: Peter Rosin <peda@lysator.liu.se>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Tested-by: Peter Rosin <peda@lysator.liu.se>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: 93563a6a71bb ("i2c: at91: fix a race condition when using the DMA controller")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/i2c/busses/i2c-at91.c