]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250: Fix restoring termios speed after suspend
authorPali Rohár <pali@kernel.org>
Sat, 24 Sep 2022 10:43:24 +0000 (12:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:41 +0000 (13:22 +0200)
commitd0e1d2633667b23ae8d29efab6e0002432dd2679
tree18d10b17178080601c1b8ca9871d3451fbd9ada5
parent01829b5e5ae070d620fe33e2310ef664e6bf63fc
serial: 8250: Fix restoring termios speed after suspend

[ Upstream commit 85e4f797c775c349074c6fea170e9298d3b369cf ]

Since commit 59a9170a436f ("tty: switch to ktermios and new framework")
termios speed is no longer stored only in c_cflag member but also in new
additional c_ispeed and c_ospeed members. If BOTHER flag is set in c_cflag
then termios speed is stored only in these new members.

Since commit 472fa1cc4970 ("serial: core: Fix initializing and restoring
termios speed") termios speed is available also in struct console.

So properly restore also c_ispeed and c_ospeed members after suspend to fix
restoring termios speed which is not represented by Bnnn constant.

Fixes: 6017f0efb4e1 ("serial: 8250: Use canary to restart console after suspend")
Signed-off-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20220924104324.4035-1-pali@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/8250/8250_port.c