Skip to content

Commit 9d31746

Browse files
jognessgregkh
authored andcommitted
serial: 8250: Do not set UART_LSR_THRE in @read_status_mask
Since Linux 2.1.8 @read_status_mask is no longer used as a general control of which bits are used from the LSR register. Instead it has become an additional mask applied to @ignore_status_mask. Since UART_LSR_THRE is never set for @ignore_status_mask, it serves no purpose to set it for @read_status_mask. In fact, it propagates the misconception that @read_status_mask can be used as a general mask for LSR bits. Do not set UART_LSR_THRE for @read_status_mask. Signed-off-by: John Ogness <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c9f49e3 commit 9d31746

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/tty/serial/8250/8250_omap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ static void omap_8250_set_termios(struct uart_port *port,
412412
*/
413413
uart_update_timeout(port, termios->c_cflag, baud);
414414

415-
up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
415+
up->port.read_status_mask = UART_LSR_OE | UART_LSR_DR;
416416
if (termios->c_iflag & INPCK)
417417
up->port.read_status_mask |= UART_LSR_FE | UART_LSR_PE;
418418
if (termios->c_iflag & (IGNBRK | PARMRK))

drivers/tty/serial/8250/8250_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
27862786
*/
27872787
uart_update_timeout(port, termios->c_cflag, baud);
27882788

2789-
port->read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
2789+
port->read_status_mask = UART_LSR_OE | UART_LSR_DR;
27902790
if (termios->c_iflag & INPCK)
27912791
port->read_status_mask |= UART_LSR_FE | UART_LSR_PE;
27922792
if (termios->c_iflag & (IGNBRK | BRKINT | PARMRK))

0 commit comments

Comments
 (0)