From ed6929c552e1c7899bc09ca9a774d74a092d0fa7 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 19 Oct 2004 17:10:06 +0100 Subject: [PATCH] [SERIAL] Add explaination why we don't use RTS flow control. --- drivers/serial/8250.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 7232f14f3d594..e8b24bc57774f 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -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) { -- 2.53.0