]> git.baikalelectronics.ru Git - kernel.git/commit
serial: When UART is suspended, set RTS to false
authorAl Cooper <alcooperx@comcast.net>
Thu, 24 Mar 2022 14:56:20 +0000 (10:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Apr 2022 09:40:05 +0000 (11:40 +0200)
commit1425189babacb67f54ae6dbc42f339aeec431133
tree1e50db39b72fb5113436e5db17cee7b363efecb6
parent617617c93be212dd6da7a4f927049500dba3d81c
serial: When UART is suspended, set RTS to false

When flow control is enabled, the UART should set RTS to false
during suspend to stop incoming data. Currently, the suspend
routine sets the mctrl register in the uart to zero, but leaves
the shadow version in the uart_port struct alone so that resume
can restore it. This causes a problem later in suspend when
serial8250_do_shutdown() is called which uses the shadow mctrl
register to clear some additional bits but ends up restoring RTS.
The solution is to clear RTS from the shadow version before
serial8250_do_shutdown() is called and restore it after.

Signed-off-by: Al Cooper <alcooperx@comcast.net>
Link: https://lore.kernel.org/r/20220324145620.41573-1-alcooperx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c