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.15-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.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From linux@xxxxxxxxxxxxxxxxxx Thu Jan 12 13:40:41 2023 From: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Date: Thu, 22 Dec 2022 12:44:14 +0100 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>, "Lukas Wunner" <lukas@xxxxxxxxx>, "Dominique Martinet" <dominique.martinet@xxxxxxxxxxxxxxxxx>, "Daisuke Mizobuchi" <mizo@xxxxxxxxxxxxxxxxx>, "Ilpo Järvinen" <ilpo.jarvinen@xxxxxxxxxxxxxxx> Cc: linux-serial@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Message-ID: <20221222114414.1886632-1-linux@xxxxxxxxxxxxxxxxxx> From: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> When 7c7f9bc986e6 ("serial: Deassert Transmit Enable on probe in driver-specific way") got backported to 5.15.y, there known as b079d3775237, some hunks were accidentally left out. In fsl_lpuart.c, this amounts to uart_remove_one_port() being called in an error path despite uart_add_one_port() not having been called. 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. Fixes: b079d3775237 ("serial: Deassert Transmit Enable on probe in driver-specific way") Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Reviewed-by: Dominique MARTINET <dominique.martinet@xxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/tty/serial/fsl_lpuart.c | 2 +- drivers/tty/serial/serial_core.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -2784,9 +2784,9 @@ static int lpuart_probe(struct platform_ return 0; failed_irq_request: -failed_get_rs485: uart_remove_one_port(&lpuart_reg, &sport->port); failed_attach_port: +failed_get_rs485: failed_reset: lpuart_disable_clks(sport); return ret; --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2225,7 +2225,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 linux@xxxxxxxxxxxxxxxxxx are queue-5.15/serial-fixup-backport-of-serial-deassert-transmit-enable-on-probe-in-driver-specific-way.patch