Skip to contentSkip to conversation

S3C24XX DMA resume regression fix

PATCH Superseded Gusakov Andrey 3 participants 4 messages Feb 24, 2012 – Mar 1, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 S3C24XX DMA resume regression fix

s3c2410_dma_suspend suspends channels from 0 to dma_channels. s3c2410_dma_resume resumes channels in reverse order. So pointer should be decremented insted of being incremented.

---
 arch/arm/plat-s3c24xx/dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s3c24xx/dma.c +1 -1
index 57abec9..16510d5 100644
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void)
 	struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1;
 	int channel;
 
-	for (channel = dma_channels - 1; channel >= 0; cp++, channel--)
+	for (channel = dma_channels - 1; channel >= 0; cp--, channel--)
 		s3c2410_dma_resume_chan(cp);
 }
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH v3 1/1 S3C24XX DMA resume regression fix

Am Freitag, 24. Februar 2012, 13:40:27 schrieb Gusakov Andrey:

Quoted 12 lines

s3c2410_dma_suspend suspends channels from 0 to dma_channels. s3c2410_dma_resume resumes channels in reverse order. So pointer should be decremented insted of being incremented.

---
 arch/arm/plat-s3c24xx/dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s3c24xx/dma.c +0 -0
index 57abec9..16510d5 100644

arch/arm/plat-s3c24xx/dma.c static void s3c2410_dma_resume(void) · line 1254

Quoted 7 lines
arch/arm/plat-s3c24xx/dma.c +1 -1
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void)
 	struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1;
 	int channel;
 
-	for (channel = dma_channels - 1; channel >= 0; cp++, channel--)
+	for (channel = dma_channels - 1; channel >= 0; cp--, channel--)
 		s3c2410_dma_resume_chan(cp);
 }

it's interesting, that this is broken since april 2011, so I guess it's time to fix it :-)

#2 lore raw

PATCH v3 1/1 S3C24XX DMA resume regression fix

Quoted 24 lines · Heiko St?bner

Am Freitag, 24. Februar 2012, 13:40:27 schrieb Gusakov Andrey:

Quoted 12 lines

s3c2410_dma_suspend suspends channels from 0 to dma_channels. s3c2410_dma_resume resumes channels in reverse order. So pointer should be decremented insted of being incremented.

---
 arch/arm/plat-s3c24xx/dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s3c24xx/dma.c +0 -0
index 57abec9..16510d5 100644

arch/arm/plat-s3c24xx/dma.c static void s3c2410_dma_resume(void) · line 1254

Quoted 7 lines
arch/arm/plat-s3c24xx/dma.c +1 -1
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void)
 	struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1;
 	int channel;
 
-	for (channel = dma_channels - 1; channel >= 0; cp++, channel--)
+	for (channel = dma_channels - 1; channel >= 0; cp--, channel--)
 		s3c2410_dma_resume_chan(cp);
 }
Quoted 3 lines

it's interesting, that this is broken since april 2011, so I guess it's time
to fix it :-)

Yes, absolutely. Will apply and send this with other fixes before 3.3 release.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#3 lore raw

PATCH v3 1/1 S3C24XX DMA resume regression fix

In reply to Heiko Stübner
Quoted 4 lines · Kukjin Kim
Quoted 2 lines · Heiko St?bner

Am Freitag, 24. Februar 2012, 13:40:27 schrieb Gusakov Andrey:

It's preferred that "ARM: S3C24XX: ..." in title.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

s3c2410_dma_suspend suspends channels from 0 to dma_channels. s3c2410_dma_resume resumes channels in reverse order. So pointer should be decremented insted of being incremented.

...decremented instead of...?

BTW, where is sign? Since it's very important, needs Gusakov's reply or re-sending with his sign.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Quoted 33 lines
Quoted 19 lines
Quoted 9 lines
---
 arch/arm/plat-s3c24xx/dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s3c24xx/dma.c +0 -0
index 57abec9..16510d5 100644

arch/arm/plat-s3c24xx/dma.c static void s3c2410_dma_resume(void) · line 1254

Quoted 7 lines
arch/arm/plat-s3c24xx/dma.c +1 -1
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void)
 	struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1;
 	int channel;
 
-	for (channel = dma_channels - 1; channel >= 0; cp++, channel--)
+	for (channel = dma_channels - 1; channel >= 0; cp--, channel--)
 		s3c2410_dma_resume_chan(cp);
 }
Quoted 3 lines

it's interesting, that this is broken since april 2011, so I guess it's time
to fix it :-)

Yes, absolutely. Will apply and send this with other fixes before 3.3 release.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.