Skip to content

Commit c9f49e3

Browse files
jognessgregkh
authored andcommitted
serial: 8250: Use @ier bits to determine if Rx is stopped
Commit f19c3f6 ("serial: 8250_port: Don't service RX FIFO if throttled") uses @read_status_mask (bit UART_LSR_DR) to determine if Rx has been stopped. However, the bit UART_LSR_DR is not managed properly in @read_status_mask for all Rx stop/start situations and is therefore not suitable for this purpose. Use the UART_IER_RLSI and UART_IER_RDI bits in @ier instead, as this is already common in 8250-variants and drivers. 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 e95cb63 commit c9f49e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
19311931
*/
19321932
if (!(status & (UART_LSR_FIFOE | UART_LSR_BRK_ERROR_BITS)) &&
19331933
(port->status & (UPSTAT_AUTOCTS | UPSTAT_AUTORTS)) &&
1934-
!(port->read_status_mask & UART_LSR_DR))
1934+
!(up->ier & (UART_IER_RLSI | UART_IER_RDI)))
19351935
skip_rx = true;
19361936

19371937
if (status & (UART_LSR_DR | UART_LSR_BI) && !skip_rx) {

0 commit comments

Comments
 (0)