summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2011-01-24 18:34:16 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2011-01-24 18:34:16 +0000
commitf1fb96475a9ccfa8c7e5f3c52cb6b3a7908ae31f (patch)
tree24cf330382dc607a2a56f16193d460ecd524bc5b
parent4de89d86cd01c8cf7b02b9fa806c2e13413984b0 (diff)
Notes
-rw-r--r--sys/dev/uart/uart_tty.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c
index f306af53f163..21701088b4b0 100644
--- a/sys/dev/uart/uart_tty.c
+++ b/sys/dev/uart/uart_tty.c
@@ -168,6 +168,14 @@ uart_tty_outwakeup(struct tty *tp)
if (sc->sc_txbusy)
return;
+ /*
+ * Respect RTS/CTS (output) flow control if enabled and not already
+ * handled by hardware.
+ */
+ if ((tp->t_termios.c_cflag & CCTS_OFLOW) && !sc->sc_hwoflow &&
+ !(sc->sc_hwsig & SER_CTS))
+ return;
+
sc->sc_txdatasz = ttydisc_getc(tp, sc->sc_txbuf, sc->sc_txfifosz);
if (sc->sc_txdatasz != 0)
UART_TRANSMIT(sc);
@@ -315,11 +323,8 @@ uart_tty_intr(void *arg)
sig = pend & SER_INT_SIGMASK;
if (sig & SER_DDCD)
ttydisc_modem(tp, sig & SER_DCD);
- if ((sig & SER_DCTS) && (tp->t_termios.c_cflag & CCTS_OFLOW) &&
- !sc->sc_hwoflow) {
- if (sig & SER_CTS)
- uart_tty_outwakeup(tp);
- }
+ if (sig & SER_DCTS)
+ uart_tty_outwakeup(tp);
}
if (pend & SER_INT_TXIDLE)