]> git.baikalelectronics.ru Git - kernel.git/commit
serial: st-asc: Fix data corruption during long console bursts
authorDaniel Thompson <daniel.thompson@linaro.org>
Tue, 13 May 2014 16:08:57 +0000 (17:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 May 2014 19:24:31 +0000 (12:24 -0700)
commit1e48c5b5249660572e49f41416db7d8f4ef15111
tree911a73cd45a6f8ff494c71015ccc32dba086cff3
parentfcb0b60e5e6afe40b25ad76aa8a708b22bda42c3
serial: st-asc: Fix data corruption during long console bursts

On my test platform (B2020/STiH416) the serial port issues bad characters
during the initial message avalanche as the console comes up. The problem
also occurs when dense(ish) I/O is done using the polled I/O interface.

The problem is fixed for me by using the FIFO half-empty bit rather than
FIFO full bit. Note that using the half-empty bit causes the FIFO to be
managed in a similar way to interrupt based I/O (i.e. where the hardware
gets best test coverage).

Running the FIFO half full will have no impact (good or bad) on console
performance. The UART will still remain fully saturated and the busy-wait
until the FIFO is empty in asc_console_write() will complete at the same
time.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/st-asc.c