Skip to content

Commit b3ee0bc

Browse files
jognessgregkh
authored andcommitted
serial: 8250: Explain the role of @read_status_mask
The role of @read_status_mask has changed over time and seems to still cause confusion. This can be expected since there is zero documentation about this driver-specific variable. Add comments to the initialization of @read_status_mask to clarify its role. 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 9c76c0f commit b3ee0bc

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,12 @@ static void omap_8250_set_termios(struct uart_port *port,
412412
*/
413413
uart_update_timeout(port, termios->c_cflag, baud);
414414

415+
/*
416+
* Specify which conditions may be considered for error
417+
* handling and the ignoring of characters. The actual
418+
* ignoring of characters only occurs if the bit is set
419+
* in @ignore_status_mask as well.
420+
*/
415421
up->port.read_status_mask = UART_LSR_OE | UART_LSR_DR;
416422
if (termios->c_iflag & INPCK)
417423
up->port.read_status_mask |= UART_LSR_FE | UART_LSR_PE;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2785,6 +2785,12 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
27852785
*/
27862786
uart_update_timeout(port, termios->c_cflag, baud);
27872787

2788+
/*
2789+
* Specify which conditions may be considered for error
2790+
* handling and the ignoring of characters. The actual
2791+
* ignoring of characters only occurs if the bit is set
2792+
* in @ignore_status_mask as well.
2793+
*/
27882794
port->read_status_mask = UART_LSR_OE | UART_LSR_DR;
27892795
if (termios->c_iflag & INPCK)
27902796
port->read_status_mask |= UART_LSR_FE | UART_LSR_PE;

0 commit comments

Comments
 (0)