linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] dmaengine: Fix status handling in imx-dma.
Date: Fri, 6 Jan 2012 13:43:11 +0100	[thread overview]
Message-ID: <20120106124311.GJ5446@pengutronix.de> (raw)
In-Reply-To: <1325848224.1540.102.camel@vkoul-udesk3>

On Fri, Jan 06, 2012 at 04:40:24PM +0530, Vinod Koul wrote:
> On Fri, 2012-01-06 at 10:37 +0100, Sascha Hauer wrote:
> > On Fri, Jan 06, 2012 at 11:26:29AM +0530, Vinod Koul wrote:
> > > On Mon, 2012-01-02 at 13:18 +0100, Javier Martin wrote:
> > > > Status must only be changed to DMA_IN_PROGRESS
> > > > when the DMA transfer has really begun.
> > > > 
> > > > However, since this driver lacks of support for
> > > > multiple descriptors a new flag has to be introduced
> > > > to avoid the prepare function be called multiple times.
> > > Thanks this is the right approach to fix this driver
> > > 
> > > But this will obviously break any users of this driver as they need to
> > > call the right APIs now :D
> > > 
> > > Sacha: can you check this patch and see which users of this driver will
> > > break. we need those fixes to go along this patch as well
> > 
> > Which users should break? I just tried with the mxcmmc driver and this
> > one does not break.
> > 
> > I do not really understand this patch anyway. It changes imxdmac->status
> > to a write-only variable and introduces a imxdmac->prepared variable
> > with the same meaning. This patch is a complicated no-op.
> > 
> > What was the original problem? The fact that we used a enum dma_status
> > with the wrong semantics? In that case I suggest to simply replace this
> > variable. All we need to track is that we do not enter
> > imxdma_prep_slave_sg with an already running transfer.
> the memcpy patch submitted earlier didn't use correct dmaengine API. a
> descriptor is not supposed to be started in prepare. The reason given
> was the driver already does so for all other prepares, so i suggested to
> fix that. Descriptors should be started in issue_pending only.

The transfer is not started in prepare but in imxdmac->desc.tx_submit

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-01-06 12:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 12:18 [PATCH 1/2] dmaengine: Fix status handling in imx-dma Javier Martin
2012-01-02 12:18 ` [PATCH 2/2] [v2] dmaengine: Add support for MEMCPY for imx-dma Javier Martin
2012-01-06  5:56 ` [PATCH 1/2] dmaengine: Fix status handling in imx-dma Vinod Koul
2012-01-06  9:37   ` Sascha Hauer
2012-01-06 11:10     ` Vinod Koul
2012-01-06 12:43       ` Sascha Hauer [this message]
2012-01-07  8:14         ` Vinod Koul

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=20120106124311.GJ5446@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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).