Skip to content

Commit

Permalink
tty: serial: men_z135_uart: Wakeup UART after transmitting
Browse files Browse the repository at this point in the history
Call uart_write_wakeup() after writing the hardware FIFO and updateing the FIFO
pointers.

This fixes high latency and jitter on PPP over Serial links.

Reported-by: Jun Shih <Jun.Shih@pason.com>
Tested-by: Jun Shih <Jun.Shih@pason.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@men.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johannes Thumshirn authored and Greg Kroah-Hartman committed Jul 10, 2014
1 parent 8b152f1 commit a997762
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/tty/serial/men_z135_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,6 @@ static void men_z135_handle_tx(struct men_z135_port *uart)
if (port->x_char)
goto out;

if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(port);

/* calculate bytes to copy */
qlen = uart_circ_chars_pending(xmit);
if (qlen <= 0)
Expand Down Expand Up @@ -357,6 +354,9 @@ static void men_z135_handle_tx(struct men_z135_port *uart)

port->icount.tx += n;

if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(port);

irq_en:
if (!uart_circ_empty(xmit))
men_z135_reg_set(uart, MEN_Z135_CONF_REG, MEN_Z135_IER_TXCIEN);
Expand Down

0 comments on commit a997762

Please sign in to comment.