Commit 5526b907 authored by Pali Rohár's avatar Pali Rohár Committed by Jialin Zhang
Browse files

serial: 8250: Fix restoring termios speed after suspend

stable inclusion
from stable-v5.10.150
commit 8f740c11d89157bd74849ae388288075e05e2a34
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8f740c11d89157bd74849ae388288075e05e2a34



--------------------------------

[ Upstream commit 379a3378 ]

Since commit edc6afc5 ("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 027b5717 ("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: 4516d50a ("serial: 8250: Use canary to restart console after suspend")
Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20220924104324.4035-1-pali@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent 4f9641fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment