From: Yoshii Takashi Date: Tue, 23 Aug 2011 08:27:18 +0000 (+0000) Subject: serial: sh-sci: report CTS as active for get_mctrl X-Git-Tag: v3.1-rc5~15^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4480a688b2beaa82ecac269b6e21bf1a26251bf9;p=profile%2Fcommon%2Fkernel-common.git serial: sh-sci: report CTS as active for get_mctrl sh-sci.c sets hardware up and then let the HW do all flow controls. There is no software code, nor needs to get/set real CTS signal. But, when turning CRTSCTS on through termios, uart_set_termios() in serial_core.c checks CTS, and stops TX if it is inactive at the moment. Because sci_get_mctrl() returns a fixed value DTR|RTS|DSR but CTS, the sequence open -> set CRTSCTS -> write hit the case and stop working, no more outputs. This patch makes sci_get_mctrl() report CTS in addition. Signed-off-by: Takashi YOSHII Signed-off-by: Paul Mundt --- diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 18e6342..161e700 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1083,7 +1083,7 @@ static unsigned int sci_get_mctrl(struct uart_port *port) /* This routine is used for getting signals of: DTR, DCD, DSR, RI, and CTS/RTS */ - return TIOCM_DTR | TIOCM_RTS | TIOCM_DSR; + return TIOCM_DTR | TIOCM_RTS | TIOCM_CTS | TIOCM_DSR; } #ifdef CONFIG_SERIAL_SH_SCI_DMA