Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632098

Re: [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver
Date Thu, 27 Apr 2017 15:30:02 +0200
Message-ID <tAREB-1aB-15@gated-at.bofh.it> (permalink)
References <ttCKl-8a9-5@gated-at.bofh.it> <ttCKl-8a9-3@gated-at.bofh.it> <txAAh-6aM-7@gated-at.bofh.it> <tyHJo-6SD-35@gated-at.bofh.it> <tyKed-8vc-3@gated-at.bofh.it> <tzOz9-q9-47@gated-at.bofh.it> <tzPvb-118-15@gated-at.bofh.it> <tAaq0-6oY-87@gated-at.bofh.it> <tAdea-88w-3@gated-at.bofh.it> <tAx3d-46S-43@gated-at.bofh.it>
X-Original-To "andriy.shevchenko@linux.intel.com" <andriy.shevchenko@linux.intel.com>
Thread-Topic [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver
Thread-Index AQHSr6fifaPEtWYJzkyOcLiQLbUIqKHK/piAgATX+YCAAAwigIAEwr2AgAAREQCAAXZjgIAAMTuAgAFd34CAAXWUAA==
Accept-Language en-US
Content-Language en-US
X-Originating-IP [10.121.8.113]
Content-Type text/plain; charset="utf-8"
Content-ID <B7F2B3D16C45B743AD0B276C42D7C890@internal.synopsys.com>
Content-Transfer-Encoding base64
MIME-Version 1.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 41
Organization linux.* mail to news gateway
X-Original-Cc "vinod.koul@intel.com" <vinod.koul@intel.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "robh+dt@kernel.org" <robh+dt@kernel.org>, "Alexey.Brodkin@synopsys.com" <Alexey.Brodkin@synopsys.com>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "Eugeniy.Paltsev@synopsys.com" <Eugeniy.Paltsev@synopsys.com>, "linux-snps-arc@lists.infradead.org" <linux-snps-arc@lists.infradead.org>, "dan.j.williams@intel.com" <dan.j.williams@intel.com>, "dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>
X-Original-Date Thu, 27 Apr 2017 13:21:41 +0000
X-Original-Message-ID <1493299300.25985.17.camel@synopsys.com>
X-Original-References <1491573855-1039-1-git-send-email-Eugeniy.Paltsev@synopsys.com> <1491573855-1039-3-git-send-email-Eugeniy.Paltsev@synopsys.com> <1492518695.24567.56.camel@linux.intel.com> <1492784977.16657.6.camel@synopsys.com> <1492787583.24567.120.camel@linux.intel.com> <1493049305.25985.4.camel@synopsys.com> <1493052970.24567.168.camel@linux.intel.com> <1493133369.25985.10.camel@synopsys.com> <1493143941.24567.196.camel@linux.intel.com> <1493219075.24567.211.camel@linux.intel.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1632098

Show key headers only | View raw


On Wed, 2017-04-26 at 18:04 +0300, Andy Shevchenko wrote:
> On Tue, 2017-04-25 at 21:12 +0300, Andy Shevchenko wrote:
> > On Tue, 2017-04-25 at 15:16 +0000, Eugeniy Paltsev wrote:
> > > On Mon, 2017-04-24 at 19:56 +0300, Andy Shevchenko wrote:
> > > > On Mon, 2017-04-24 at 15:55 +0000, Eugeniy Paltsev wrote:
> > > > Descriptor is active until terminate_all() is called or new
> > > > descriptor
> > > > is supplied. So, the caller has a quite time to check on it.
> > > >
> > > > So, what's wrong on it by your opinion?
> > >
> > > Hmm, this looks OK. (In my example (hsu/hsu.c driver) error
> > > descriptors
> > > are not freed even after terminate_all is called)
> >
> > If it's active it will be freed.
> > Otherwise caller should check somewhere that descriptor fails.
> >
> > But actually this is fragile and we need to monitor failed
> > descriptors.
> > Thanks for reporting.
> >
> > >
> > > > Of course, if you want to keep by some reason (should be stated
> > > > what
> > > > the reason in comment) erred descriptors, you can do that.
> > >
> > > So, I'll create desc_error list and store failed descriptors in
> > > this
> > > list until terminate_all() is called.
> > > Is it OK implementation?
> >
> > Nope, we need to amend virt-chan API for that. I'm on it. Will send
> > a series soon.
>
> I have to correct what I wrote before.
>
> We have two options:
> a) one I proposed above;
> b) move descriptor to complete list and call complete callback with
> result.
>
> So, it looks like the b) variant is what is done already in 4 (did I
> calculate correctly?) drivers and respective users.

In my opinion we should call error descriptor complete callback.
But I don't think we should move error descriptor to desc_completed
list.

When descriptor following our error descriptor will be completed
successfully vchan tasklet will be called.
So all descriptors from desc_completed list will be freed (including
our error descriptor)
We'll lost information about error descriptors and we'll not be able to
return correct status from dma_async_is_tx_complete().

In my opinion, we should create desc_error list.
When we get error we'll move descriptor to desc_error list and call
complete callback.

--
 Eugeniy Paltsev

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> - 2017-04-25 17:20 +0200
  Re: [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-25 20:20 +0200
    Re: [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-26 17:30 +0200
      Re: [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> - 2017-04-27 15:30 +0200
        Re: [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-27 15:40 +0200
    Re: [PATCH v2 2/2] dmaengine: Add DW AXI DMAC driver Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> - 2017-04-27 17:40 +0200

csiph-web