From dba05832cbe4f305dfd998fb26d7c685d91fbbd8 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 17 Apr 2012 16:41:10 +0100 Subject: SERIAL: core: add hardware assisted h/w flow control support Ports which are handling h/w flow control in hardware must not have their RTS state altered depending on the tty's hardware-stopped state. Avoid this additional logic when setting the termios state. Acked-by: Alan Cox Signed-off-by: Russell King --- drivers/tty/serial/serial_core.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/tty') diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index bd10bbd..9d8796e 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1255,6 +1255,13 @@ static void uart_set_termios(struct tty_struct *tty, uart_set_mctrl(uport, mask); } + /* + * If the port is doing h/w assisted flow control, do nothing. + * We assume that tty->hw_stopped has never been set. + */ + if (uport->flags & UPF_HARD_FLOW) + return; + /* Handle turning off CRTSCTS */ if ((old_termios->c_cflag & CRTSCTS) && !(cflag & CRTSCTS)) { spin_lock_irqsave(&uport->lock, flags); -- cgit v1.1