]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: sh-sci: Fix setting SCSCR_TIE while transferring data
authorHoan Nguyen An <na-hoan@jinso.co.jp>
Mon, 18 Mar 2019 09:26:32 +0000 (18:26 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:23:27 +0000 (06:23 +0200)
commit327ee45823eb2c757e3c5507e763dea88568e424
tree0cc5cb36cb20e5e0af9842b75dea0034f45d389e
parent7124c71944ee422c0f56b1f2093bfdb7bd6f5f97
serial: sh-sci: Fix setting SCSCR_TIE while transferring data

commit 93bcefd4c6bad4c69dbc4edcd3fbf774b24d930d upstream.

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.

Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c