From: Steven Scholz <steven.scholz@imc-berlin.de>
To: linux-serial@vger.kernel.org
Subject: HW Flow control in serial.c???
Date: Tue, 04 Feb 2003 13:26:08 +0100 [thread overview]
Message-ID: <3E3FB160.7040706@imc-berlin.de> (raw)
Hi there,
while playing around with some serial device using RTS/CTS flow control I
noticed the following behavior:
When the device activates it's CTS to signal that it can't take more date, the
sender (i.e. drivers/char/serial.c) is still sending up to 16 (!) Bytes! I
assume this is the contents of the 16550's FIFO.
Is it a bug or a feature?
Looking at the code drivers/char/serial.c and at the data sheet of a 16C550
shows that to enable the (real) HW flow control one has to set the bit AFE (auto
flow control enable) in the MCR register. But this is not done in serial.c.
Please look at drivers/char/mxser.c
...
#define UART_MCR_AFE 0x20
...
if (cflag & CRTSCTS) {
info->flags |= ASYNC_CTS_FLOW;
info->IER |= UART_IER_MSI;
if (info->type == PORT_16550A)
info->MCR |= UART_MCR_AFE;
} else {
info->flags &= ~ASYNC_CTS_FLOW;
}
...
I think this it the right way to do it.
BTW I am talking about linux 2.4.20.
Since I am not on the list so please CC me.
Thanks a million,
Steven Scholz
reply other threads:[~2003-02-04 10:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3E3FB160.7040706@imc-berlin.de \
--to=steven.scholz@imc-berlin.de \
--cc=linux-serial@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox