linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] DMA: extend documentation to provide more API details
Date: Tue, 8 Oct 2013 09:22:43 +0530	[thread overview]
Message-ID: <20131008035243.GO2954@intel.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1310072244030.27047@axis700.grange>

On Mon, Oct 07, 2013 at 10:55:56PM +0200, Guennadi Liakhovetski wrote:
> > > > > > > > > > No, not something in the middle. I was thinking about
> > > > > > > > > > 
> > > > > > > > > > (1) cookie 1-3 are submitted
> > > > > > > > > > (2) cookie 1 succeeds
> > > > > > > > > > (3) a DMA error occurs, cookies 2-3 are discarded
> > > > > > > > discarded using terminate_all right?
> > > > > > > 
> > > > > > > No, by the dmaengine driver as a part of the error processing.
> > > > > > And how will that be done...?
> > > > > 
> > > > > Sorry, I meant - DMA descriptors with cookies #2 and #3 will be cancelled 
> > > > > and recycled by the dmaengine driver. That's what you have to do, when 
> > > > > processing DMA error IRQ.
> > > > Well how do you that?
> > > 
> > > Mmmh, maybe I'm missing something, but isn't it a part of the common DMA 
> > > processing? You get an error IRQ; on some DMAC types this means, that you 
> > > have to reset the hardware, so, you perform whatever actions you have to 
> > > do to reset the controller; you remove any descriptors from the pending 
> > > queue; reinsert them into the free queue and let any clients run on a 
> > > timeout. I don't think it would be a good idea to do anything more smart 
> > > like trying to restart the current transfer or drop it and continue with 
> > > the queue, because we don't know in what state the client hardware is, so, 
> > > we can only let the client driver try to recover.
> > No that would be very wrong thing to do behind clients back. Suppose you got a
> > trasaction which returned error irq and it was generated one half of the
> > requested transfer was done. Redoing the entrie transaction wont be right!
> > 
> > So I think you need to let client know the error status.
> > 
> > But again, is this usage fiarly common?
> 
> Hm, I think, the question is different: is this possible and realistic? If 
> there's just one DMAC and one platform, I think, there should be a way to 
> support it? There are controllers, that actually have separate error IRQ 
> outputs and special status bits for them. Actually, see commit
Fair enough, if this is something you commonly need to deal with then lets add a
new callback for error reporting. I think this would be simpler and then client
will know about the failure

On failure reporting the client should query the status to know what is pending
for this transaction then recover accordingly

Will send patch for this and moving to DMA_COMPLETE as status

--
~Vinod

  reply	other threads:[~2013-10-08  3:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-05 17:36 [PATCH] DMA: extend documentation to provide more API details Guennadi Liakhovetski
2013-10-05 19:02 ` Russell King - ARM Linux
2013-10-05 21:00   ` Guennadi Liakhovetski
2013-10-05 23:31     ` Russell King - ARM Linux
2013-10-06  5:20       ` Vinod Koul
2013-10-07 10:45         ` Guennadi Liakhovetski
2013-10-07 10:41           ` Vinod Koul
2013-10-07 12:17             ` Guennadi Liakhovetski
2013-10-07 11:17           ` Russell King - ARM Linux
2013-10-07 10:39             ` Vinod Koul
2013-10-07 12:15               ` Guennadi Liakhovetski
2013-10-07 14:25                 ` Vinod Koul
2013-10-07 15:28                   ` Guennadi Liakhovetski
2013-10-07 14:43                     ` Vinod Koul
2013-10-07 15:45                       ` Guennadi Liakhovetski
2013-10-07 15:52                         ` Vinod Koul
2013-10-07 20:55                           ` Guennadi Liakhovetski
2013-10-08  3:52                             ` Vinod Koul [this message]
2013-10-08  7:28                               ` Guennadi Liakhovetski
2013-10-07 15:48                     ` Vinod Koul
2013-10-07 20:43                       ` Guennadi Liakhovetski
2013-10-08  3:58                         ` Vinod Koul
2013-10-08  7:17                           ` Guennadi Liakhovetski
2013-10-09  1:34               ` Dan Williams
2013-10-10 16:15                 ` Vinod Koul
2013-10-16 19:33                 ` Stephen Warren
2013-10-17  5:16                   ` Vinod Koul
2013-10-17 14:55                     ` Stephen Warren
2013-10-17 17:00                       ` Dan Williams
2013-10-07  7:40       ` Guennadi Liakhovetski
2013-10-09  1:28         ` Dan Williams

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=20131008035243.GO2954@intel.com \
    --to=vinod.koul@intel.com \
    --cc=linux-arm-kernel@lists.infradead.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).