8250.c: less than 2400 baud fix.
authorChristian Melki <christian.melki@ericsson.se>
Mon, 30 Apr 2012 09:21:26 +0000 (11:21 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 30 May 2012 23:43:34 +0000 (00:43 +0100)
commitab1cfbece9eb85ab6d0b108d0e3fde1daac9e4ca
tree660fcb353a17bf96ea0a230c270d8bdce2d9c049
parent60a3707d7f6b7d096a73e64c737e4e5625e97d11
8250.c: less than 2400 baud fix.

commit f9a9111b540fd67db5dab332f4b83d86c90e27b1 upstream.

We noticed that we were loosing data at speed less than 2400 baud.
It turned out our (TI16750 compatible) uart with 64 byte outgoing fifo
was truncated to 16 byte (bit 5 sets fifo len) when modifying the fcr
reg.
The input code still fills the buffer with 64 bytes if I remember
correctly and thus data is lost.
Our fix was to remove whiping of the fcr content and just add the
TRIGGER_1 which we want for latency.
I can't see why this would not work on less than 2400 always, for all
uarts ...
Otherwise one would have to make sure the filling of the fifo re-checks
the current state of available fifo size (urrk).

Signed-off-by: Christian Melki <christian.melki@ericsson.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust filename; replace *port with up->port]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/serial/8250.c