Thread (14 messages) 14 messages, 3 authors, 2011-12-12
STALE5301d

[PATCH RESEND 5/8] serial: 8250: reject delaying RTS with RS485

From: Wolfram Sang <hidden>
Date: 2011-12-09 17:07:39
Also in: lkml
Subsystem: 8250/16?50 (and clone uarts) serial driver, the rest, tty layer and serial drivers · Maintainers: Greg Kroah-Hartman, Linus Torvalds, Jiri Slaby

There might be chips capable of doing this, but for now nothing is implemented,
so reject usage of this feature.

Signed-off-by: Wolfram Sang <redacted>
---
 drivers/tty/serial/8250.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 6a2f47f..28b3608 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -2735,6 +2735,9 @@ static int serial8250_ioctl_port(struct uart_port *port,
 				   sizeof(rs485ctrl)))
 			return -EFAULT;
 
+		if (rs485ctrl.delay_rts_before_send || rs485ctrl.delay_rts_after_send)
+			return -EOPNOTSUPP;
+
 		spin_lock_irqsave(&up->port.lock, flags);
 		lcr = serial_inp(up, UART_LCR);
 		serial_outp(up, UART_LCR, UART_LCR_CONF_MODE_B);
-- 
1.7.7.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help