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 v2] dmaengine: at_xdmac: rework slave configuration part
Date: Tue, 2 Jun 2015 18:52:08 +0530	[thread overview]
Message-ID: <20150602132208.GX3140@localhost> (raw)
In-Reply-To: <1433173324-13182-1-git-send-email-ludovic.desroches@atmel.com>

On Mon, Jun 01, 2015 at 05:40:48PM +0200, Ludovic Desroches wrote:
> @@ -604,16 +636,18 @@ at_xdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
>  			return NULL;
>  		}
>  
> +		if (at_xdmac_compute_chan_conf(chan, direction))
> +			return NULL;
> +
You forgot to release the lock. Also in prev call, you are getting the desc,
that needs to be put back or moved before getting descriptor

>  		/* Linked list descriptor setup. */
>  		if (direction == DMA_DEV_TO_MEM) {
> -			desc->lld.mbr_sa = atchan->per_src_addr;
> +			desc->lld.mbr_sa = atchan->sconfig.src_addr;
>  			desc->lld.mbr_da = mem;
> -			desc->lld.mbr_cfg = atchan->cfg[AT_XDMAC_DEV_TO_MEM_CFG];
>  		} else {
>  			desc->lld.mbr_sa = mem;
> -			desc->lld.mbr_da = atchan->per_dst_addr;
> -			desc->lld.mbr_cfg = atchan->cfg[AT_XDMAC_MEM_TO_DEV_CFG];
> +			desc->lld.mbr_da = atchan->sconfig.dst_addr;
>  		}
> +		desc->lld.mbr_cfg = atchan->cfg;
>  		dwidth = at_xdmac_get_dwidth(desc->lld.mbr_cfg);
>  		fixed_dwidth = IS_ALIGNED(len, 1 << dwidth)
>  			       ? at_xdmac_get_dwidth(desc->lld.mbr_cfg)
> @@ -696,15 +730,17 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
>  			"%s: desc=0x%p, tx_dma_desc.phys=%pad\n",
>  			__func__, desc, &desc->tx_dma_desc.phys);
>  
> +		if (at_xdmac_compute_chan_conf(chan, direction))
> +			return NULL;
same here as well

-- 
~Vinod

  reply	other threads:[~2015-06-02 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 15:40 [PATCH v2] dmaengine: at_xdmac: rework slave configuration part Ludovic Desroches
2015-06-02 13:22 ` Vinod Koul [this message]
2015-06-03  8:28   ` Ludovic Desroches

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=20150602132208.GX3140@localhost \
    --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).