tty: fix termios input-speed encoding
[ Upstream commitpull/10/headfada18c48d
] Make sure to clear the CIBAUD bits before OR-ing the new mask when encoding the termios input baud rate. This could otherwise lead to an incorrect input rate being reported back and incidentally set on subsequent termios updates. Fixes:edc6afc549
("[PATCH] tty: switch to ktermios and new framework") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
3c11fe1eda
commit
49c90d012a
|
@ -172,6 +172,9 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,
|
|||
iclose = 0;
|
||||
#endif
|
||||
termios->c_cflag &= ~CBAUD;
|
||||
#ifdef IBSHIFT
|
||||
termios->c_cflag &= ~(CBAUD << IBSHIFT);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Our goal is to find a close match to the standard baud rate
|
||||
|
|
Loading…
Reference in New Issue