OSDN Git Service

serial: 8250_dw: Allow TX FIFO to drain before writing to UART_LCR
authorJoshua Scott <joshua.scott@alliedtelesis.co.nz>
Thu, 8 Feb 2018 21:59:56 +0000 (10:59 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Feb 2018 12:40:22 +0000 (13:40 +0100)
commit914eaf935ec78d3a3ce03751b1e0f8395035d94a
tree753dc7a4933800b87c127c4b908fa7d00cf0f2b4
parentb96408b47480f9947eee933fcce35ed4ae74cc9a
serial: 8250_dw: Allow TX FIFO to drain before writing to UART_LCR

An issue has been observed on the Marvell Armada 38x serial port.

Writes to UART_LCR can result in characters that are currently held in the
TX FIFO being lost rather than sent, even if the userspace process has
attempted to flush them.

This is most visible when using the "resize" command (tested on Busybox),
where we have observed the escape code for restoring cursor position
becoming mangled.

Signed-off-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c