Patch "serial: 8250_exar: Set missing rs485_supported flag" 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: 8250_exar: Set missing rs485_supported flag

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-8250_exar-set-missing-rs485_supported-flag.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 e11401133e5ca6e646dac894df2b19b0731b478b
Author: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>
Date:   Wed Jan 3 07:18:18 2024 +0100

    serial: 8250_exar: Set missing rs485_supported flag
    
    [ Upstream commit 0c2a5f471ce58bca8f8ab5fcb911aff91eaaa5eb ]
    
    The UART supports an auto-RTS mode in which the RTS pin is automatically
    activated during transmission. So mark this mode as being supported even
    if RTS is not controlled by the driver but the UART.
    
    Also the serial core expects now at least one of both modes rts-on-send or
    rts-after-send to be supported. This is since during sanitization
    unsupported flags are deleted from a RS485 configuration set by userspace.
    However if the configuration ends up with both flags unset, the core prints
    a warning since it considers such a configuration invalid (see
    uart_sanitize_serial_rs485()).
    
    Cc:  <stable@xxxxxxxxxxxxxxx>
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
    Signed-off-by: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240103061818.564-8-l.sanfilippo@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 19de9f535c67..6e33c74e569f 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -425,7 +425,7 @@ static int generic_rs485_config(struct uart_port *port,
 }
 
 static const struct serial_rs485 generic_rs485_supported = {
-	.flags = SER_RS485_ENABLED,
+	.flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND,
 };
 
 static const struct exar8250_platform exar8250_default_platform = {
@@ -468,7 +468,8 @@ static int iot2040_rs485_config(struct uart_port *port,
 }
 
 static const struct serial_rs485 iot2040_rs485_supported = {
-	.flags = SER_RS485_ENABLED | SER_RS485_RX_DURING_TX | SER_RS485_TERMINATE_BUS,
+	.flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND |
+		 SER_RS485_RX_DURING_TX | SER_RS485_TERMINATE_BUS,
 };
 
 static const struct property_entry iot2040_gpio_properties[] = {




[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