linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sricharan@codeaurora.org (Sricharan R)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dmaengine: qcom-bam: Process multiple pending descriptors
Date: Mon, 21 Aug 2017 17:46:31 +0530	[thread overview]
Message-ID: <b7aaeb1b-cd86-1b5d-d1f6-f1333f8cd940@codeaurora.org> (raw)
In-Reply-To: <20170617133716.GG19154@localhost>

Hi Vinod,

<snip>

>>>>  	async_desc->num_desc = num_alloc;
>>>>  	async_desc->curr_desc = async_desc->desc;
>>>> @@ -680,13 +684,18 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
>>>>  static int bam_dma_terminate_all(struct dma_chan *chan)
>>>>  {
>>>>  	struct bam_chan *bchan = to_bam_chan(chan);
>>>> +	struct bam_async_desc *async_desc;
>>>>  	unsigned long flag;
>>>>  	LIST_HEAD(head);
>>>>  
>>>>  	/* remove all transactions, including active transaction */
>>>>  	spin_lock_irqsave(&bchan->vc.lock, flag);
>>>>  	if (bchan->curr_txd) {
>>>> -		list_add(&bchan->curr_txd->vd.node, &bchan->vc.desc_issued);
>>>> +		list_for_each_entry(async_desc, &bchan->desc_list, desc_node) {
>>>> +			bchan->curr_txd = async_desc;
>>>> +			list_add(&bchan->curr_txd->vd.node,
>>>> +				 &bchan->vc.desc_issued);
>>>
>>> that is wrong, terminated should not add to issued list
>>
>>  hmm, since it was already done like that, i added the same for list of descriptors now.
> 
> Sounds like you should fix existing behaviour too :)
> 

 Just to clarify, the code below this, does a vchan_dma_desc_free_list, which
 removes the descriptors from issued list as well. So this is to pull and remove even all
 those descriptors submitted to the hardware as well. That said, posted a V3 and it
 would cause a conflict with https://patchwork.kernel.org/patch/9874691/ based on which goes
 in first.
 
Regards,
 Sricharan

-- 
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

      reply	other threads:[~2017-08-21 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 12:29 [PATCH] dmaengine: qcom-bam: Process multiple pending descriptors Sricharan R
2017-06-15  4:10 ` Vinod Koul
2017-06-15 14:49   ` Sricharan R
2017-06-17 13:37     ` Vinod Koul
2017-08-21 12:16       ` Sricharan R [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=b7aaeb1b-cd86-1b5d-d1f6-f1333f8cd940@codeaurora.org \
    --to=sricharan@codeaurora.org \
    --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).