From: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Hamza Farooq <hamzahfrq.sub-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Christopher Freeman
<cfreeman-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Alexandre Courbot
<acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Laxman Dewangan
<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] serial: tegra: handle rx race
Date: Fri, 2 Oct 2015 17:26:30 +0100 [thread overview]
Message-ID: <560EB036.6030407@nvidia.com> (raw)
In-Reply-To: <CAJ--JmyA+NyTbj3_bSWVcJwsOiMS6ENWmjDvu9YtMjh5jurDqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 01/10/15 10:30, Hamza Farooq wrote:
> Hi,
>
> Sorry if I'm out of context. I saw this thread and found it very
> similar to the problem that we have fixed with the renesas sh-sci
> serial driver. We have made the two handlers (dma packet complete and
> timer expired) mutually exclusive by using spinlocks. Additionally,
> the race condition has been handled by not stopping the dma engine in
> timer expiry handler. If the both happen at the same time, let the dma
> packet complete handler push the data, by simply exiting the timer
> handler. If the interrupts are redirected to CPU in timer expiry
> handler, do it _only_ when you are sure no more data is coming in.
Yes that is the key. I guess if flow-control is used, then you can
prevent more data coming, otherwise I am not sure.
> The development history can be viewed at Geert Uytterhoeven's renesas
> drivers tree:
> https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git
>
> Interesting files are drivers/tty/serial/sh-sci and drivers/dma/sh/rcar-dmac.c
Which branch are you referring to? Is this not in the mainline yet.
Thanks for the info!
Jon
next prev parent reply other threads:[~2015-10-02 16:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1443051326-1979-1-git-send-email-cfreeman@nvidia.com>
[not found] ` <1443051326-1979-1-git-send-email-cfreeman-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-24 9:24 ` [PATCH] serial: tegra: handle rx race Jon Hunter
[not found] ` <5603C158.4000002-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-25 6:58 ` Christopher Freeman
2015-09-25 19:06 ` Jon Hunter
[not found] ` <56059B27.2060902-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-10-01 9:30 ` Hamza Farooq
[not found] ` <CAJ--JmyA+NyTbj3_bSWVcJwsOiMS6ENWmjDvu9YtMjh5jurDqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-02 16:26 ` Jon Hunter [this message]
2015-10-09 13:35 ` Jon Hunter
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=560EB036.6030407@nvidia.com \
--to=jonathanh-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=cfreeman-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=hamzahfrq.sub-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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).