Commit b3ee0bc1 authored by John Ogness's avatar John Ogness Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohn Ogness <john.ogness@linutronix.de>
Link: https://lore.kernel.org/r/20241216171244.12783-5-john.ogness@linutronix.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9c76c0fa
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -412,6 +412,12 @@ static void omap_8250_set_termios(struct uart_port *port,
	 */
	uart_update_timeout(port, termios->c_cflag, baud);

	/*
	 * Specify which conditions may be considered for error
	 * handling and the ignoring of characters. The actual
	 * ignoring of characters only occurs if the bit is set
	 * in @ignore_status_mask as well.
	 */
	up->port.read_status_mask = UART_LSR_OE | UART_LSR_DR;
	if (termios->c_iflag & INPCK)
		up->port.read_status_mask |= UART_LSR_FE | UART_LSR_PE;
+6 −0
Original line number Diff line number Diff line
@@ -2785,6 +2785,12 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
	 */
	uart_update_timeout(port, termios->c_cflag, baud);

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