Commit f9a9111b authored by Christian Melki's avatar Christian Melki Committed by Greg Kroah-Hartman

8250.c: less than 2400 baud fix.

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: default avatarChristian Melki <christian.melki@ericsson.se>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aaa10eb1
...@@ -2259,10 +2259,11 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -2259,10 +2259,11 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
quot++; quot++;
if (up->capabilities & UART_CAP_FIFO && port->fifosize > 1) { if (up->capabilities & UART_CAP_FIFO && port->fifosize > 1) {
if (baud < 2400) fcr = uart_config[port->type].fcr;
fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1; if (baud < 2400) {
else fcr &= ~UART_FCR_TRIGGER_MASK;
fcr = uart_config[port->type].fcr; fcr |= UART_FCR_TRIGGER_1;
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment