This is a note to let you know that I've just added the patch titled serial: fixup backport of "serial: Deassert Transmit Enable on probe in driver-specific way" to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: serial-fixup-backport-of-serial-deassert-transmit-enable-on-probe-in-driver-specific-way.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From dominique.martinet@xxxxxxxxxxxxxxxxx Thu Jan 12 13:46:08 2023 From: Dominique Martinet <dominique.martinet@xxxxxxxxxxxxxxxxx> Date: Fri, 23 Dec 2022 13:23:54 +0900 Subject: serial: fixup backport of "serial: Deassert Transmit Enable on probe in driver-specific way" To: "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>, "Jiri Slaby" <jirislaby@xxxxxxxxxx>, "Ilpo Järvinen" <ilpo.jarvinen@xxxxxxxxxxxxxxx>, "Lukas Wunner" <lukas@xxxxxxxxx>, "Rasmus Villemoes" <linux@xxxxxxxxxxxxxxxxxx> Cc: Daisuke Mizobuchi <mizo@xxxxxxxxxxxxxxxxx>, stable@xxxxxxxxxxxxxxx, linux-serial@xxxxxxxxxxxxxxx, Dominique Martinet <dominique.martinet@xxxxxxxxxxxxxxxxx> Message-ID: <20221223042354.4080724-2-dominique.martinet@xxxxxxxxxxxxxxxxx> From: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> When 7c7f9bc986e6 ("serial: Deassert Transmit Enable on probe in driver-specific way") got backported to 5.10.y, there known as 26a2b9c468de, some hunks were accidentally left out. In serial_core.c, it is possible that the omission in uart_suspend_port() is harmless, but the backport did have the corresponding hunk in uart_resume_port(), it runs counter to the original commit's intention of Skip any invocation of ->set_mctrl() if RS485 is enabled. and it's certainly better to be aligned with upstream. Link: https://lkml.kernel.org/r/20221222114414.1886632-1-linux@xxxxxxxxxxxxxxxxxx Fixes: 26a2b9c468de ("serial: Deassert Transmit Enable on probe in driver-specific way") Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> [the fsl_lpuart part of the 5.15 patch is not required on 5.10, because the code before 26a2b9c468de was incorrectly not calling uart_remove_one_port on failed_get_rs485] Signed-off-by: Dominique Martinet <dominique.martinet@xxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/tty/serial/serial_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2254,7 +2254,8 @@ int uart_suspend_port(struct uart_driver spin_lock_irq(&uport->lock); ops->stop_tx(uport); - ops->set_mctrl(uport, 0); + if (!(uport->rs485.flags & SER_RS485_ENABLED)) + ops->set_mctrl(uport, 0); ops->stop_rx(uport); spin_unlock_irq(&uport->lock); Patches currently in stable-queue which might be from dominique.martinet@xxxxxxxxxxxxxxxxx are queue-5.10/fsl_lpuart-don-t-enable-interrupts-too-early.patch queue-5.10/serial-fixup-backport-of-serial-deassert-transmit-enable-on-probe-in-driver-specific-way.patch