From: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
To: Daniel Mack <zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
neumann-SRDuVqtxQLSzQB+pC5nmwQ@public.gmane.org,
vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org
Subject: Re: [PATCH 3/3] dma: cppi41: move -EAGAIN in tear_down
Date: Wed, 2 Oct 2013 10:29:14 +0200 [thread overview]
Message-ID: <20131002082914.GA16680@linutronix.de> (raw)
In-Reply-To: <1380634271-27588-4-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
* Daniel Mack | 2013-10-01 15:31:11 [+0200]:
>In cppi41_tear_down_chan(), bail out earlier in case td_seen is unset
>instead of popping another descriptor when td_desc_seen is also unset.
>
>My system ran into WARN() condition multiple times when
>cppi41_tear_down_chan() was called for channels that had all of
>td_queued, td_seen and td_seen set to false.
Which one?
>Signed-off-by: Daniel Mack <zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>---
> drivers/dma/cppi41.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
>index 7747bf7..6decf34 100644
>--- a/drivers/dma/cppi41.c
>+++ b/drivers/dma/cppi41.c
>@@ -586,6 +586,9 @@ static int cppi41_tear_down_chan(struct cppi41_channel *c)
> }
> c->td_seen = 1;
> }
>+
>+ if (c->td_retry)
>+ return -EAGAIN;
So you return right away since the retry counter should be > 0 here. And
then you want to get the TDDOWN bit set and retry. Hmmm.
Let me answer to you 0/3 on this.
> }
> if (!c->td_desc_seen) {
> desc_phys = cppi41_pop_desc(cdd, c->q_comp_num);
>@@ -606,8 +609,6 @@ static int cppi41_tear_down_chan(struct cppi41_channel *c)
> * descriptor before the TD we fetch it from enqueue, it has to be
> * there waiting for us.
> */
>- if (!c->td_seen && c->td_retry)
>- return -EAGAIN;
>
> WARN_ON(!c->td_retry);
> if (!c->td_desc_seen) {
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-10-02 8:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 13:31 [PATCH 0/3] dma: cppi41: more suspend/resume patches Daniel Mack
[not found] ` <1380634271-27588-1-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-01 13:31 ` [PATCH 1/3] dma: cppi41: restore more registers Daniel Mack
2013-10-01 13:31 ` [PATCH 2/3] dma: cppi41: use cppi41_pop_desc() where possible Daniel Mack
2013-10-01 13:31 ` [PATCH 3/3] dma: cppi41: move -EAGAIN in tear_down Daniel Mack
[not found] ` <1380634271-27588-4-git-send-email-zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-02 8:29 ` Sebastian Andrzej Siewior [this message]
2013-10-02 9:19 ` Daniel Mack
2013-10-02 10:25 ` Sebastian Andrzej Siewior
2013-10-02 11:38 ` Daniel Mack
2013-10-02 10:20 ` [PATCH 0/3] dma: cppi41: more suspend/resume patches Sebastian Andrzej Siewior
[not found] ` <20131002102033.GB16680-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2013-10-02 11:07 ` Daniel Mack
2013-10-02 12:57 ` Sebastian Andrzej Siewior
2013-10-09 6:41 ` Sebastian Andrzej Siewior
2013-10-09 7:23 ` Daniel Mack
[not found] ` <5255047A.5010609-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-09 7:28 ` Sebastian Andrzej Siewior
2013-10-09 7:31 ` Daniel Mack
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=20131002082914.GA16680@linutronix.de \
--to=bigeasy-hfztesqfncyowbw4kg4ksq@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=neumann-SRDuVqtxQLSzQB+pC5nmwQ@public.gmane.org \
--cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=zonque-Re5JQEeQqe8AvxtiuMwx3w@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 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.