Patch "serial: ar933x: Deassert Transmit Enable on ->rs485_config()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    serial: ar933x: Deassert Transmit Enable on ->rs485_config()

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-ar933x-deassert-transmit-enable-on-rs485_conf.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.



commit ed5a30b1b62a514b606e883884676bac9b544c25
Author: Lukas Wunner <lukas@xxxxxxxxx>
Date:   Sun Sep 11 11:12:15 2022 +0200

    serial: ar933x: Deassert Transmit Enable on ->rs485_config()
    
    [ Upstream commit 3a939433ddc1bab98be028903aaa286e5e7461d7 ]
    
    The ar933x_uart driver neglects to deassert Transmit Enable when
    ->rs485_config() is invoked.  Fix it.
    
    Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support")
    Cc: stable@xxxxxxxxxxxxxxx # v5.7+
    Cc: Daniel Golle <daniel@xxxxxxxxxxxxxx>
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
    Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx>
    Link: https://lore.kernel.org/r/5b36af26e57553f084334666e7d24c7fd131a01e.1662887231.git.lukas@xxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
index be3f5d8f683b..23f2d9937cfc 100644
--- a/drivers/tty/serial/ar933x_uart.c
+++ b/drivers/tty/serial/ar933x_uart.c
@@ -585,6 +585,13 @@ static const struct uart_ops ar933x_uart_ops = {
 static int ar933x_config_rs485(struct uart_port *port,
 				struct serial_rs485 *rs485conf)
 {
+	struct ar933x_uart_port *up =
+			container_of(port, struct ar933x_uart_port, port);
+
+	if (port->rs485.flags & SER_RS485_ENABLED)
+		gpiod_set_value(up->rts_gpiod,
+			!!(rs485conf->flags & SER_RS485_RTS_AFTER_SEND));
+
 	return 0;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux