From: Vinod Koul <vinod.koul@intel.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Stephen Warren <swarren@nvidia.com>,
Linus Walleij <linus.walleij@stericsson.com>,
Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>,
Barry Song <baohua.song@csr.com>,
Dan Williams <dan.j.williams@intel.com>,
linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 0/9] DMA engine cookie handling cleanups
Date: Mon, 19 Mar 2012 20:05:30 +0530 [thread overview]
Message-ID: <1332167730.7180.53.camel@vkoul-udesk3> (raw)
In-Reply-To: <1331649534.1727.27.camel@vkoul-udesk3>
On Tue, 2012-03-13 at 20:08 +0530, Vinod Koul wrote:
> On Tue, 2012-03-13 at 12:31 +0000, Russell King - ARM Linux wrote:
> > On Tue, Mar 13, 2012 at 02:10:36PM +0530, Vinod Koul wrote:
> > > Please see if the below patch is the right fix for build failures in
> > > addition to one suggested by Jassi.
> >
> > I'm not sure that Jassi's solution is correct - and I'm wondering whether
> > any of the DMA engine drivers do the right thing when transfers are
> > terminated. Is it right for the DMA status function to return IN_PROGRESS
> > for a previously submitted cookie which has been terminated?
> >
> > I can see two answers to that, both equally valid:
> >
> > 1. It allows you to find out exactly where the DMA engine got to before
> > the transfer was terminated, and therefore recover from the termination
> > if you wish to.
> >
> > 2. Returning in-progress when a cookie will never be completed is
> > misleading, and could be misinterpreted by users of the tx_status
> > function, especially if they are waiting for a particular transaction
> > to complete.
> >
> > Maybe we need to introduce a DMA_TERMINATED status?
> I would agree with you that DMA_TERMINATED seems to be correct option.
> IN_PROGRESS would certainly confuse...
> I will drop Jassi's fix from this branch. Care to send the patch?
Even after adding such a state in dmaengine for DMA_TERMINATED, it
doesn't make much sense. In TERMINATE_ALL we do not update the
chan->complete value. So after client has terminated the channel it can
easily test to see if cookie is completed (before terminate will return
SUCCESS) or aborted (will return DMA_IN_PROGRESS)
So at present I am leaning on 1 :)
If I don't hear any opposition I will merge this (with Jassi's fix) and
then send pull to Linus
--
~Vinod
next prev parent reply other threads:[~2012-03-19 14:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 22:33 [PATCH v2 0/9] DMA engine cookie handling cleanups Russell King - ARM Linux
2012-03-06 22:34 ` [PATCH 2/9] dmaengine: move last completed cookie into generic dma_chan structure Russell King - ARM Linux
2012-03-07 0:38 ` H Hartley Sweeten
2012-03-06 22:34 ` [PATCH 3/9] dmaengine: add private header file Russell King - ARM Linux
2012-03-07 0:47 ` H Hartley Sweeten
2012-03-06 22:34 ` [PATCH 4/9] dmaengine: consolidate assignment of DMA cookies Russell King - ARM Linux
2012-03-07 0:53 ` H Hartley Sweeten
2012-03-06 22:35 ` [PATCH 5/9] dmaengine: provide a common function for completing a dma descriptor Russell King - ARM Linux
2012-03-07 0:56 ` H Hartley Sweeten
2012-04-23 9:40 ` Boojin Kim
2012-04-23 9:50 ` Russell King - ARM Linux
2012-04-23 10:01 ` Vinod Koul
2012-04-23 11:06 ` Boojin Kim
2012-04-23 11:13 ` Russell King - ARM Linux
2012-03-06 22:35 ` [PATCH 6/9] dmaengine: consolidate tx_status functions Russell King - ARM Linux
2012-03-07 1:04 ` H Hartley Sweeten
2012-03-06 22:36 ` [PATCH 9/9] dmaengine: ensure all DMA engine drivers initialize their cookies Russell King - ARM Linux
2012-03-07 8:33 ` [PATCH v2 0/9] DMA engine cookie handling cleanups Linus Walleij
2012-03-07 9:06 ` Russell King - ARM Linux
2012-03-07 13:54 ` Vinod Koul
2012-03-12 16:11 ` Russell King - ARM Linux
2012-03-12 16:23 ` Vinod Koul
2012-03-13 8:40 ` Vinod Koul
2012-03-13 12:31 ` Russell King - ARM Linux
2012-03-13 14:38 ` Vinod Koul
2012-03-19 14:35 ` Vinod Koul [this message]
2012-03-07 18:09 ` Jassi Brar
2012-03-07 18:21 ` Russell King - ARM Linux
2012-03-07 18:44 ` Jassi Brar
2012-03-09 8:59 ` Shawn Guo
2012-03-13 11:45 ` Nicolas Ferre
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=1332167730.7180.53.camel@vkoul-udesk3 \
--to=vinod.koul@intel.com \
--cc=baohua.song@csr.com \
--cc=dan.j.williams@intel.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=srinidhi.kasagar@stericsson.com \
--cc=swarren@nvidia.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