SUPERH platform development
 help / color / mirror / Atom feed
* [PATCH] serial: sh-sci: report CTS as active for get_mctrl
@ 2011-08-23  8:27 Yoshii Takashi
  2011-08-23 10:31 ` Paul Mundt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yoshii Takashi @ 2011-08-23  8:27 UTC (permalink / raw)
  To: linux-sh

Hi, anybody want to use RTS/CTS on sh-sci?

It does not seems to have been working for long time.
Here is the one-line fix.

I'm not sure what is the optimal set of the "false" signal for get_mctrl.
I guess it might be CD|DSR|CTS, but this patch does only minimum change.

Description follows...

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 <takashi.yoshii.zj@renesas.com>
---
 drivers/tty/serial/sh-sci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 7149a2c..e0229a4 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1076,7 +1076,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
-- 1.7.3.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-29  7:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-23  8:27 [PATCH] serial: sh-sci: report CTS as active for get_mctrl Yoshii Takashi
2011-08-23 10:31 ` Paul Mundt
2011-08-24 11:04 ` takashi.yoshii.zj
2011-08-29  7:25 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox