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)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 26 Oct 2015 14:44:59 +0000 (15:44 +0100)
commita9bed6b10bd117a300cceb9062003f7a2761ef99
tree6ab2b6481067ab4d759f4a206d84dd19745e6aae
parent43e9f2aa7788cc60eb11fe3cb4fb6f0b63c35de6
i2c: at91: manage unexpected RXRDY flag when starting a transfer

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")
Cc: stable@vger.kernel.org #4.1
drivers/i2c/busses/i2c-at91.c