diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-04-17 11:41:10 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-11-04 06:25:55 -0500 |
| commit | dba05832cbe4f305dfd998fb26d7c685d91fbbd8 (patch) | |
| tree | 823df80fdcdaa66587659bdf2c83106dd71d1c1a /drivers | |
| parent | 2cbacafd7af0f1cc7a433668c662a91ba6aabc1b (diff) | |
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 <alan@linux.intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/tty/serial/serial_core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index bd10bbd56446..9d8796e77188 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, | |||
| 1255 | uart_set_mctrl(uport, mask); | 1255 | uart_set_mctrl(uport, mask); |
| 1256 | } | 1256 | } |
| 1257 | 1257 | ||
| 1258 | /* | ||
| 1259 | * If the port is doing h/w assisted flow control, do nothing. | ||
| 1260 | * We assume that tty->hw_stopped has never been set. | ||
| 1261 | */ | ||
| 1262 | if (uport->flags & UPF_HARD_FLOW) | ||
| 1263 | return; | ||
| 1264 | |||
| 1258 | /* Handle turning off CRTSCTS */ | 1265 | /* Handle turning off CRTSCTS */ |
| 1259 | if ((old_termios->c_cflag & CRTSCTS) && !(cflag & CRTSCTS)) { | 1266 | if ((old_termios->c_cflag & CRTSCTS) && !(cflag & CRTSCTS)) { |
| 1260 | spin_lock_irqsave(&uport->lock, flags); | 1267 | spin_lock_irqsave(&uport->lock, flags); |
