LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] dmaengine: fsl-edma: fix calculation of remaining bytes
@ 2014-11-13 11:56 Stefan Agner
2014-12-02 16:53 ` Stefan Agner
2014-12-08 13:14 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Stefan Agner @ 2014-11-13 11:56 UTC (permalink / raw)
To: vinod.koul
Cc: jingchang.lu, dan.j.williams, dmaengine, shawn.guo,
linux-arm-kernel, linux-kernel, kernel, Stefan Agner
If the current transfer control descriptor (TCD) was not yet started,
the address will be the same as the initial address. Hence test if the
current address is less than or equal to the start address of each TCD.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
This bug was discovered during development on a AC97 capable SAI driver,
I don't think that this is currently a issue since only a few drivers
use DMA on Vybrid so far and don't use the remaining bytes information.
drivers/dma/fsl-edma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c
index 3c5711d..58c6fc7 100644
--- a/drivers/dma/fsl-edma.c
+++ b/drivers/dma/fsl-edma.c
@@ -386,7 +386,7 @@ static size_t fsl_edma_desc_residue(struct fsl_edma_chan *fsl_chan,
&(edesc->tcd[i].vtcd->daddr));
len -= size;
- if (cur_addr > dma_addr && cur_addr < dma_addr + size) {
+ if (cur_addr >= dma_addr && cur_addr < dma_addr + size) {
len += dma_addr + size - cur_addr;
break;
}
--
2.1.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: fsl-edma: fix calculation of remaining bytes
2014-11-13 11:56 [PATCH] dmaengine: fsl-edma: fix calculation of remaining bytes Stefan Agner
@ 2014-12-02 16:53 ` Stefan Agner
2014-12-08 13:14 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Agner @ 2014-12-02 16:53 UTC (permalink / raw)
To: vinod.koul
Cc: jingchang.lu, dan.j.williams, dmaengine, shawn.guo,
linux-arm-kernel, linux-kernel, kernel
On 2014-11-13 12:56, Stefan Agner wrote:
> If the current transfer control descriptor (TCD) was not yet started,
> the address will be the same as the initial address. Hence test if the
> current address is less than or equal to the start address of each TCD.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> This bug was discovered during development on a AC97 capable SAI driver,
> I don't think that this is currently a issue since only a few drivers
> use DMA on Vybrid so far and don't use the remaining bytes information.
>
> drivers/dma/fsl-edma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c
> index 3c5711d..58c6fc7 100644
> --- a/drivers/dma/fsl-edma.c
> +++ b/drivers/dma/fsl-edma.c
> @@ -386,7 +386,7 @@ static size_t fsl_edma_desc_residue(struct
> fsl_edma_chan *fsl_chan,
> &(edesc->tcd[i].vtcd->daddr));
>
> len -= size;
> - if (cur_addr > dma_addr && cur_addr < dma_addr + size) {
> + if (cur_addr >= dma_addr && cur_addr < dma_addr + size) {
> len += dma_addr + size - cur_addr;
> break;
> }
Hi Vinod,
Afaik, this has not been applied yet, any reasons why?
--
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: fsl-edma: fix calculation of remaining bytes
2014-11-13 11:56 [PATCH] dmaengine: fsl-edma: fix calculation of remaining bytes Stefan Agner
2014-12-02 16:53 ` Stefan Agner
@ 2014-12-08 13:14 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2014-12-08 13:14 UTC (permalink / raw)
To: Stefan Agner
Cc: jingchang.lu, dan.j.williams, dmaengine, shawn.guo,
linux-arm-kernel, linux-kernel, kernel
On Thu, Nov 13, 2014 at 12:56:02PM +0100, Stefan Agner wrote:
> If the current transfer control descriptor (TCD) was not yet started,
> the address will be the same as the initial address. Hence test if the
> current address is less than or equal to the start address of each TCD.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-08 13:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13 11:56 [PATCH] dmaengine: fsl-edma: fix calculation of remaining bytes Stefan Agner
2014-12-02 16:53 ` Stefan Agner
2014-12-08 13:14 ` Vinod Koul
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).