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

From: Wolfram Sang
Date: Fri Dec 09 2011 - 12:07:40 EST


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 <w.sang@xxxxxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/