Skip to content

Commit 46c6975

Browse files
Marc Zyngiergregkh
authored andcommitted
serial: mvebu-uart: Fix local flags handling on termios update
Commit 68a0db1 reworked the baud rate selection, but also added a (not so) subtle change in the way the local flags (c_lflag in the termios structure) are handled, forcing the new flags to always be the same as the old ones. The reason for that particular change is both obscure and undocumented. It also completely breaks userspace. Something as trivial as getty is unusable: <example> Debian GNU/Linux 9 sy-borg ttyMV0 sy-borg login: root root [timeout] Debian GNU/Linux 9 sy-borg ttyMV0 </example> which is quite obvious in retrospect: getty cannot get in control of the echo mode, is stuck in canonical mode, and times out without ever seeing anything valid. It also begs the question of how this change was ever tested. The fix is pretty obvious: stop messing with c_lflag, and the world will be a happier place. Cc: [email protected] # 4.15+ Fixes: 68a0db1 ("serial: mvebu-uart: add function to change baudrate") Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b2d89ad commit 46c6975

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/tty/serial/mvebu-uart.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,6 @@ static void mvebu_uart_set_termios(struct uart_port *port,
495495
termios->c_iflag |= old->c_iflag & ~(INPCK | IGNPAR);
496496
termios->c_cflag &= CREAD | CBAUD;
497497
termios->c_cflag |= old->c_cflag & ~(CREAD | CBAUD);
498-
termios->c_lflag = old->c_lflag;
499498
}
500499

501500
spin_unlock_irqrestore(&port->lock, flags);

0 commit comments

Comments
 (0)