mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Koul, Vinod" <vinod.koul@intel.com>
To: Viresh Kumar <viresh.kumar@st.com>
Cc: dan.j.williams@intel.com, linux-kernel@vger.kernel.org,
	jamie@jamieiles.com, shiraz.hashim@st.com,
	armando.visconti@st.com, ajay.khandelwal@st.com,
	amit.goel@st.com, viresh.linux@gmail.com
Subject: Re: [PATCH] dmaengine/dw_dmac fix: dwc_scan_descriptors must compare first desc address also with llp
Date: Thu, 31 Mar 2011 11:14:56 +0530	[thread overview]
Message-ID: <1301550296.18522.7.camel@vkoul-udesk3> (raw)
In-Reply-To: <d8ab376fabe638f25a66be559e64cc043e8d1dd4.1300946288.git.viresh.kumar@st.com>

On Thu, 2011-03-24 at 11:32 +0530, Viresh Kumar wrote:
> dwc_scan_descriptors scans all descriptors from active_list in case transfer is
> not completed.  It compares first_desc->lli.llp, and then all childrens of its
> tx_list. But it doesn't compare its own address, i.e. first_desc->txd.phys, as
> this is what we have initially programmed into the controller register. So this
> causes dma to stop and finish a transfer, which was never started. And thus
> fail.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
> ---
>  drivers/dma/dw_dmac.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> index b95e6d3..1bd4803 100644
> --- a/drivers/dma/dw_dmac.c
> +++ b/drivers/dma/dw_dmac.c
> @@ -304,6 +304,11 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
>  	dev_vdbg(chan2dev(&dwc->chan), "scan_descriptors: llp=0x%x\n", llp);
>  
>  	list_for_each_entry_safe(desc, _desc, &dwc->active_list, desc_node) {
> +		/* check first descriptors addr */
> +		if (desc->txd.phys == llp)
> +			return;
> +
> +		/* check first descriptors llp */
>  		if (desc->lli.llp == llp)
>  			/* This one is currently in progress */
>  			return;

Applied, Thanks

-- 
~Vinod


      reply	other threads:[~2011-03-31  6:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24  6:02 Viresh Kumar
2011-03-31  5:44 ` Koul, Vinod [this message]

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=1301550296.18522.7.camel@vkoul-udesk3 \
    --to=vinod.koul@intel.com \
    --cc=ajay.khandelwal@st.com \
    --cc=amit.goel@st.com \
    --cc=armando.visconti@st.com \
    --cc=dan.j.williams@intel.com \
    --cc=jamie@jamieiles.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shiraz.hashim@st.com \
    --cc=viresh.kumar@st.com \
    --cc=viresh.linux@gmail.com \
    /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

all inboxes | Powered by JetHome®