i2c: bfin-twi: Read and write the FIFO in loop
authorSonic Zhang <sonic.zhang@analog.com>
Tue, 28 May 2013 10:41:09 +0000 (18:41 +0800)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 12 Jun 2013 18:39:07 +0000 (20:39 +0200)
TWI transfer interrupts may be lost when system is heavily handling other
interrupts, while current transfer handler depends on each accurate interrupt
and misses some data in this case. Because there are 2 2-byte FIFOs in blackfin
TWI controller, the occurrence of the data loss can be reduced by reading till
the RX FIFO is empty and writing till the TX FIFO is full.

Reported-by: Bob Maris <mail@maris-ee.eu>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

No differences found