patch "serial: sh-sci: Fix setting SCSCR_TIE while transferring data" added to tty-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
serial: sh-sci: Fix setting SCSCR_TIE while transferring data
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 93bcefd4c6bad4c69dbc4edcd3fbf774b24d930d Mon Sep 17 00:00:00 2001
From: Hoan Nguyen An <[email protected]>
Date: Mon, 18 Mar 2019 18:26:32 +0900
Subject: serial: sh-sci: Fix setting SCSCR_TIE while transferring data
We disable transmission interrupt (clear SCSCR_TIE) after all data has been transmitted (if uart_circ_empty(xmit)). While transmitting, if the data is still in the tty buffer, re-enable the SCSCR_TIE bit, which was done at sci_start_tx().
This is unnecessary processing, wasting CPU operation if the data transmission length is large. And further, transmit end, FIFO empty bits disabling have also been performed in the step above.
--- drivers/tty/serial/sh-sci.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/tty/serial/sh-sci.c +1 -11
@@ -838,19 +838,9 @@ static void sci_transmit_chars(struct uart_port *port)if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS )uart_write_wakeup (port); -if (uart_circ_empty (xmit)) { +if (uart_circ_empty (xmit))sci_stop_tx (port); - }else { - ctrl =serial_port_in (port,SCSCR ); - -if (port->type !=PORT_SCI ) { -serial_port_in (port, SCxSR);/* Dummy read */ -sci_clear_SCxSR (port,SCxSR_TDxE_CLEAR (port)); - } - ctrl |=SCSCR_TIE ; -serial_port_out (port,SCSCR , ctrl); - } }/* On SH3, SCIF may read end-of-break as a space->mark char */
Signature · 1 line
2.21.0