Patch "serial: core: set missing supported flag for RX during TX GPIO" has been added to the 6.7-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: core: set missing supported flag for RX during TX GPIO

to the 6.7-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-core-set-missing-supported-flag-for-rx-during-tx-gpio.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 1a33e33ca0e80d485458410f149265cdc0178cfa Mon Sep 17 00:00:00 2001
From: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>
Date: Wed, 3 Jan 2024 07:18:13 +0100
Subject: serial: core: set missing supported flag for RX during TX GPIO
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>

commit 1a33e33ca0e80d485458410f149265cdc0178cfa upstream.

If the RS485 feature RX-during-TX is supported by means of a GPIO set the
according supported flag. Otherwise setting this feature from userspace may
not be possible, since in uart_sanitize_serial_rs485() the passed RS485
configuration is matched against the supported features and unsupported
settings are thereby removed and thus take no effect.

Cc:  <stable@xxxxxxxxxxxxxxx>
Fixes: 163f080eb717 ("serial: core: Add option to output RS485 RX_DURING_TX state via GPIO")
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Signed-off-by: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20240103061818.564-3-l.sanfilippo@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/tty/serial/serial_core.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -3650,6 +3650,8 @@ int uart_get_rs485_mode(struct uart_port
 	if (IS_ERR(desc))
 		return dev_err_probe(dev, PTR_ERR(desc), "Cannot get rs485-rx-during-tx-gpios\n");
 	port->rs485_rx_during_tx_gpio = desc;
+	if (port->rs485_rx_during_tx_gpio)
+		port->rs485_supported.flags |= SER_RS485_RX_DURING_TX;
 
 	return 0;
 }


Patches currently in stable-queue which might be from l.sanfilippo@xxxxxxxxxx are

queue-6.7/serial-omap-do-not-override-settings-for-rs485-support.patch
queue-6.7/serial-core-imx-do-not-set-rs485-enabled-if-it-is-not-supported.patch
queue-6.7/serial-8250_exar-set-missing-rs485_supported-flag.patch
queue-6.7/serial-do-not-hold-the-port-lock-when-setting-rx-during-tx-gpio.patch
queue-6.7/serial-core-set-missing-supported-flag-for-rx-during-tx-gpio.patch
queue-6.7/serial-core-fix-sanitizing-check-for-rts-settings.patch
queue-6.7/serial-core-make-sure-rs485-cannot-be-enabled-when-it-is-not-supported.patch




[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