]> git.hungrycats.org Git - linux/commitdiff
[SERIAL] Add explaination why we don't use RTS flow control.
authorRussell King <rmk@flint.arm.linux.org.uk>
Tue, 19 Oct 2004 16:10:06 +0000 (17:10 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Tue, 19 Oct 2004 16:10:06 +0000 (17:10 +0100)
drivers/serial/8250.c

index 7232f14f3d594466f2f240aa5cda4fbcf380682d..e8b24bc57774f4b4cbb28d1f28581cf21617cad7 100644 (file)
@@ -1658,9 +1658,17 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios,
        serial_out(up, UART_IER, up->ier);
 
        if (up->capabilities & UART_CAP_EFR) {
+               unsigned char efr = 0;
+               /*
+                * TI16C752/Startech hardware flow control.  FIXME:
+                * - TI16C752 requires control thresholds to be set.
+                * - UART_MCR_RTS is ineffective if auto-RTS mode is enabled.
+                */
+               if (termios->c_cflag & CRTSCTS)
+                       efr |= UART_EFR_CTS;
+
                serial_outp(up, UART_LCR, 0xBF);
-               serial_outp(up, UART_EFR,
-                           termios->c_cflag & CRTSCTS ? UART_EFR_CTS :0);
+               serial_outp(up, UART_EFR, efr);
        }
 
        if (up->capabilities & UART_NATSEMI) {