From: Yoshii Takashi <takashi.yoshii.zj@renesas.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] serial: sh-sci: report CTS as active for get_mctrl
Date: Tue, 23 Aug 2011 08:27:18 +0000 [thread overview]
Message-ID: <4E536466.6020604@renesas.com> (raw)
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
next reply other threads:[~2011-08-23 8:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 8:27 Yoshii Takashi [this message]
2011-08-23 10:31 ` [PATCH] serial: sh-sci: report CTS as active for get_mctrl Paul Mundt
2011-08-24 11:04 ` takashi.yoshii.zj
2011-08-29 7:25 ` Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E536466.6020604@renesas.com \
--to=takashi.yoshii.zj@renesas.com \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.