From: jamie@shareable.org (Jamie Lokier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] amba-pl011: support hardware flow control
Date: Wed, 10 Feb 2010 01:16:37 +0000 [thread overview]
Message-ID: <20100210011637.GA8683@shareable.org> (raw)
In-Reply-To: <20100209221449.GA23083@n2100.arm.linux.org.uk>
Russell King - ARM Linux wrote:
> This means that when the kernel's buffers fill up, the kernel calls
> down to the serial core layer to throttle the input. This then
> calls into the set_mctrl function to de-assert RTS. However, because
> the hardware ignores the requested software state, the RTS signal
> is not de-asserted, and the remote end continues sending data.
>
> So, enabling hardware auto-RTS is bad news - you will lose data if
> the application stops reading data.
Surely the driver can just stop reading from the UART when the
kernel's buffers are full and hardware-RTS is enabled. Then the
hardware will deassert RTS itself.
The problem with relying on the kernel to deassert RTS is that it's
too slow when something disables interrupts for a few ms, and you get
lost data that way instead.
The ideal combination may be a bit of both:
1. When kernel deasserts RTS, do that and disable hardware-RTS
so it really is deasserted.
2. When kernel asserts RTS with mctrl, enable hardware-RTS
so what's output depends on the receive FIFO state.
That should solve both types of overrun.
-- Jamie
next prev parent reply other threads:[~2010-02-10 1:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 13:41 [PATCH] amba-pl011: support hardware flow control Rabin Vincent
2010-02-08 13:51 ` Russell King - ARM Linux
2010-02-09 14:30 ` Rabin VINCENT
2010-02-09 18:01 ` Russell King - ARM Linux
2010-02-09 22:14 ` Russell King - ARM Linux
2010-02-10 1:16 ` Jamie Lokier [this message]
2010-02-10 8:30 ` Russell King - ARM Linux
2010-02-10 10:12 ` Jamie Lokier
2010-02-10 13:45 ` Rabin VINCENT
2010-02-10 20:25 ` Russell King - ARM Linux
2010-02-11 16:56 ` Rabin VINCENT
2010-02-12 9:01 ` Linus Walleij
-- strict thread matches above, loose matches on Subject: below --
2010-02-02 3:32 Rabin Vincent
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=20100210011637.GA8683@shareable.org \
--to=jamie@shareable.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).