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)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Jun 2017 22:47:06 +0000 (00:47 +0200)
commit98dcb81b30f999ad4850969f51f1c2adcf1d0d63
tree38374fe18c60bbc433c404e30eef52e7c54d1774
parentd106ce33dc18753c8c2e56d92813e46b11c9e693
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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/i2c/busses/i2c-at91.c