mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [REGRESSION][PATCH] serial: 8250_pci: Fix broken RS485 for F81504/508/512
@ 2025-09-23 22:17 Marnix Rijnart
  2025-09-30 11:32 ` Ilpo Järvinen
  0 siblings, 1 reply; 4+ messages in thread
From: Marnix Rijnart @ 2025-09-23 22:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Marnix Rijnart, linux-kernel, linux-serial, regressions

Commit 4afeced ("serial: core: fix sanitizing check for RTS settings")
introduced a regression making it impossible to unset
SER_RS485_RTS_ON_SEND from userspace if SER_RS485_RTS_AFTER_SEND is
unsupported. Because these devices need RTS to be low on TX (fecf27a)
they are effectively broken.

The hardware supports both RTS_ON_SEND and RTS_AFTER_SEND,
so fix this by announcing support for SER_RS485_RTS_AFTER_SEND,
similar to commit 068d35a.

Signed-off-by: Marnix Rijnart <marnix.rijnart@iwell.eu>
---
 drivers/tty/serial/8250/8250_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 152f914c599d..a9da222bd174 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1645,7 +1645,7 @@ static int pci_fintek_rs485_config(struct uart_port *port, struct ktermios *term
 }
 
 static const struct serial_rs485 pci_fintek_rs485_supported = {
-	.flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND,
+	.flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND,
 	/* F81504/508/512 does not support RTS delay before or after send */
 };
 
-- 
2.51.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-08  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-23 22:17 [REGRESSION][PATCH] serial: 8250_pci: Fix broken RS485 for F81504/508/512 Marnix Rijnart
2025-09-30 11:32 ` Ilpo Järvinen
2025-09-30 17:20   ` Marnix Rijnart
2025-10-08  9:17     ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®