From: Johannes Thumshirn Date: Mon, 16 Jun 2014 05:33:38 +0000 (+0200) Subject: tty: serial: men_z135_uart: Wakeup UART after transmitting X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a9977620a448f12a7337daca452fd20e89a96e23;p=linux-beck.git tty: serial: men_z135_uart: Wakeup UART after transmitting 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 Tested-by: Jun Shih Signed-off-by: Johannes Thumshirn Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z135_uart.c index c9d18548783a..30e9e60bc5cd 100644 --- a/drivers/tty/serial/men_z135_uart.c +++ b/drivers/tty/serial/men_z135_uart.c @@ -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) @@ -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);