Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1465029 > unrolled thread
| Started by | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| First post | 2016-08-18 11:20 +0200 |
| Last post | 2016-08-24 09:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v1 1/5] dma: Add QorIQ qDMA engine driver support Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-08-18 11:20 +0200
RE: [PATCH v1 1/5] dma: Add QorIQ qDMA engine driver support Yao Yuan <yao.yuan@nxp.com> - 2016-08-24 09:20 +0200
| From | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| Date | 2016-08-18 11:20 +0200 |
| Subject | Re: [PATCH v1 1/5] dma: Add QorIQ qDMA engine driver support |
| Message-ID | <s7rEt-6bL-3@gated-at.bofh.it> |
On Thu, Aug 18, 2016 at 02:38:44PM +0800, Yuan Yao wrote: > + spin_lock(&fsl_comp->qchan->vchan.lock); > + if (status == DMA_COMPLETE) > + vchan_cookie_complete(&fsl_comp->vdesc); > + fsl_comp->qchan->status = status; This is buggy - if the DMA has finished processing it, even if it finished in error, it must _complete_ the transaction. Completion is not the same as being successful - it means that the DMA is no longer processing the cookie. The issue here is that when the _following_ transaction completes successfully, _this_ transaction will effectively be marked as complete due to the way the cookie system works. So... to get this straight - "completion" means "I have finished processing this transaction". It does not mean "I successfully processed this transaction without any errors." -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
[toc] | [next] | [standalone]
| From | Yao Yuan <yao.yuan@nxp.com> |
|---|---|
| Date | 2016-08-24 09:20 +0200 |
| Message-ID | <s9ADE-7nn-11@gated-at.bofh.it> |
| In reply to | #1465029 |
On Thu, Aug 18, 2016 at 05:16 PM +0800, Russell King wrote: > On Thu, Aug 18, 2016 at 02:38:44PM +0800, Yuan Yao wrote: > > + spin_lock(&fsl_comp->qchan->vchan.lock); > > + if (status == DMA_COMPLETE) > > + vchan_cookie_complete(&fsl_comp->vdesc); > > + fsl_comp->qchan->status = status; > > This is buggy - if the DMA has finished processing it, even if it finished in error, it > must _complete_ the transaction. Completion is not the same as being > successful - it means that the DMA is no longer processing the cookie. > > The issue here is that when the _following_ transaction completes successfully, > _this_ transaction will effectively be marked as complete due to the way the > cookie system works. > > So... to get this straight - "completion" means "I have finished processing this > transaction". It does not mean "I successfully processed this transaction > without any errors." > Thanks for your review. So you mean that I should call vchan_cookie_complete no matter whether the error issue in QDMA? I have some random DMA error test case, it seems work will.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web