From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: <vkoul@kernel.org>
Cc: <dmaengine@vger.kernel.org>, <dan.j.williams@intel.com>
Subject: Re: [PATCH] dmaengine: ti: k3-udma: Fix the TR initialization for prep_slave_sg
Date: Tue, 25 Aug 2020 08:34:12 +0300 [thread overview]
Message-ID: <acdbc662-c912-480d-02c6-47a7b6d1b671@ti.com> (raw)
In-Reply-To: <20200824120108.9178-1-peter.ujfalusi@ti.com>
Vinod,
On 24/08/2020 15.01, Peter Ujfalusi wrote:
> The TR which needs to be initialized for the next sg entry is indexed by
> tr_idx and not by the running i counter.
>
> In case any sub element in the SG needs more than one TR, the code would
> corrupt an already configured TR.
I forgot to add the Fixes tag:
Fixes: 6cf668a4ef829 ("dmaengine: ti: k3-udma: Use the TR counter helper for slave_sg and cyclic")
Can you add it or I can resend with the tag.
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> drivers/dma/ti/k3-udma.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index c14e6cb105cd..30cb514cee54 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -2059,9 +2059,9 @@ udma_prep_slave_sg_tr(struct udma_chan *uc, struct scatterlist *sgl,
> return NULL;
> }
>
> - cppi5_tr_init(&tr_req[i].flags, CPPI5_TR_TYPE1, false, false,
> - CPPI5_TR_EVENT_SIZE_COMPLETION, 0);
> - cppi5_tr_csf_set(&tr_req[i].flags, CPPI5_TR_CSF_SUPR_EVT);
> + cppi5_tr_init(&tr_req[tr_idx].flags, CPPI5_TR_TYPE1, false,
> + false, CPPI5_TR_EVENT_SIZE_COMPLETION, 0);
> + cppi5_tr_csf_set(&tr_req[tr_idx].flags, CPPI5_TR_CSF_SUPR_EVT);
>
> tr_req[tr_idx].addr = sg_addr;
> tr_req[tr_idx].icnt0 = tr0_cnt0;
>
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2020-08-25 5:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 12:01 [PATCH] dmaengine: ti: k3-udma: Fix the TR initialization for prep_slave_sg Peter Ujfalusi
2020-08-25 5:34 ` Peter Ujfalusi [this message]
2020-08-25 10:23 ` 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=acdbc662-c912-480d-02c6-47a7b6d1b671@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@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