From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Sricharan R <sricharan@codeaurora.org>,
agross@kernel.org, david.brown@linaro.org,
dan.j.williams@intel.com, vkoul@kernel.org,
linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] dmaengine: qcom: bam_dma: Fix completed descriptors count
Date: Fri, 28 Jun 2019 13:26:48 +0100 [thread overview]
Message-ID: <6cc5080c-e72f-c97c-715c-9169508cf2d9@linaro.org> (raw)
In-Reply-To: <1561723786-22500-1-git-send-email-sricharan@codeaurora.org>
On 28/06/2019 13:09, Sricharan R wrote:
> One space is left unused in circular FIFO to differentiate
> 'full' and 'empty' cases. So take that in to account while
> counting for the descriptors completed.
>
> Fixes the issue reported here,
> https://lkml.org/lkml/2019/6/18/669
>
> Cc: stable@vger.kernel.org
> Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Thanks for the patch, It works for me now!
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
--srini
> ---
> drivers/dma/qcom/bam_dma.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
> index 4b43844..8e90a40 100644
> --- a/drivers/dma/qcom/bam_dma.c
> +++ b/drivers/dma/qcom/bam_dma.c
> @@ -799,6 +799,9 @@ static u32 process_channel_irqs(struct bam_device *bdev)
> /* Number of bytes available to read */
> avail = CIRC_CNT(offset, bchan->head, MAX_DESCRIPTORS + 1);
>
> + if (offset < bchan->head)
> + avail--;
> +
> list_for_each_entry_safe(async_desc, tmp,
> &bchan->desc_list, desc_node) {
> /* Not enough data to read */
>
next prev parent reply other threads:[~2019-06-28 12:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 12:09 [PATCH] dmaengine: qcom: bam_dma: Fix completed descriptors count Sricharan R
2019-06-28 12:26 ` Srinivas Kandagatla [this message]
2019-07-05 7:49 ` 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=6cc5080c-e72f-c97c-715c-9169508cf2d9@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=agross@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=david.brown@linaro.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sricharan@codeaurora.org \
--cc=stable@vger.kernel.org \
--cc=vkoul@kernel.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