From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: "Janusz Użycki" <j.uzycki@elproma.com.pl>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
Richard Genoud <richard.genoud@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Marek Vasut <marex@denx.de>
Subject: Re: [PATCH 2/4] serial: mxs-auart: use mctrl_gpio helpers for handling modem signals
Date: Sat, 27 Sep 2014 13:18:14 +0100 [thread overview]
Message-ID: <20140927121814.GE5182@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <54269C34.8040702@elproma.com.pl>
On Sat, Sep 27, 2014 at 01:15:00PM +0200, Janusz Użycki wrote:
> It means it is possible but not in Linux today?
It depends on your maximum interrupt latency.
> I think the problem is not interrupt delay, which is often much below 100us
> (we get ~10us delay on DCD).
http://archive.arm.linux.org.uk/lurker/message/20130724.145238.44ad37b5.en.html
I can believe why this all happens, when you see USB interrupts taking
upwards of 3ms to complete:
Longest time: 3247506ns
Longest irq: 24
Longest handler: usb_hcd_irq+0x0/0x68
This no longer seems to be the case - the maximum interrupt time I'm seeing
on recent kernels is:
Longest time: 382236ns
Longest irq: 62
Longest handler: mv_interrupt+0x0/0x948
My Dove kernel runs permanently with my own maximum interrupt latency
tracking enabled.
> Isn't the problem rather how to break DMA transmission fast?
There are two factors there. The first is being able to tell the DMA
engine to stop, the second is the UART hardware FIFO draining.
> Hardware flow control not always requires to stop transmission
> immediately.
No. Hardware flow control is normally implemented at the UART, and
CTS is normally implemented to prevent the transmitter starting a new
character. Any in-progress character is completed before the transmitter
stops, so that there are no errors.
At least, this is the behaviour found on the UARTs which I've seen
implementing hardware flow control, and it is the only sane way to do
it.
> Usually delay of some chars is acceptable if remote receiver
> implements low/high water mark (overflow trigger lower than RX FIFO size).
The receiver you may be communicating with may have a receive FIFO of
only 16 characters. It may deassert CTS when it reaches half-full state.
That leaves you with only 8 characters to send before it overflows. At
115200 baud, you will have started to send the 9th characters by 700us.
However, that isn't the full picture. The full picture is that CTS is
normally controlled by software as well, and depends on the availability
of buffers to store characters. There's latency at the remote end to
deassert CTS in software when the software buffers reach their high
watermark, and there's the hope that there is sufficient room in those
buffers to take the excess characters that the remote end may continue
to send.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-27 12:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-27 9:46 [PATCH v3] serial: mxs-auart: gpios as modem signals (dirty) Janusz Uzycki
2014-09-27 9:46 ` [PATCH 1/4] serial: mxs-auart: ctrl removed from mxs_auart_port Janusz Uzycki
2014-09-27 10:03 ` Russell King - ARM Linux
2014-09-27 11:44 ` [PATCH] serial: mxs-auart: clean get_mctrl and set_mctrl Janusz Uzycki
2014-09-27 9:46 ` [PATCH 2/4] serial: mxs-auart: use mctrl_gpio helpers for handling modem signals Janusz Uzycki
2014-09-27 10:07 ` Russell King - ARM Linux
2014-09-27 20:32 ` serial: mxs-auart: gpios as modem signals (dirty) Janusz Uzycki
2014-09-27 20:32 ` [PATCH 1/2] serial: mxs-auart: use mctrl_gpio helpers for handling modem signals Janusz Uzycki
2014-09-27 20:32 ` [PATCH 2/2] serial: mxs-auart: add interrupts for modem control lines Janusz Uzycki
2014-09-27 10:33 ` [PATCH 2/4] serial: mxs-auart: use mctrl_gpio helpers for handling modem signals Janusz Użycki
2014-09-27 10:54 ` Russell King - ARM Linux
2014-09-27 11:15 ` Janusz Użycki
2014-09-27 12:18 ` Russell King - ARM Linux [this message]
2014-09-27 9:46 ` [PATCH 3/4] serial: mxs-auart: add interrupts for modem control lines Janusz Uzycki
2014-10-24 15:32 ` Richard Genoud
2014-10-24 15:36 ` Janusz Użycki
2014-09-27 9:46 ` [PATCH 4/4] serial: mxs-auart: enable PPS support Janusz Uzycki
2014-09-27 12:47 ` Sergei Shtylyov
2014-09-27 13:36 ` [PATCH] " Janusz Uzycki
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=20140927121814.GE5182@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=j.uzycki@elproma.com.pl \
--cc=jslaby@suse.cz \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=marex@denx.de \
--cc=richard.genoud@gmail.com \
/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).