Skip to contentSkip to conversation

dma: shdma: add checking the DMAOR_AE in sh_dmae_err

PATCH In review Yoshihiro Shimoda 2 participants 2 messages Feb 9, 2011

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

PATCH v2 1/1 dma: shdma: add checking the DMAOR_AE in sh_dmae_err

The irq numbers of tranfer end and address error are assigned same number on some CPU. So the sh_dmae_err() should check the AE flag in DMAOR.

---
about v2:
- remove unnecessary cast

 drivers/dma/shdma.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/dma/shdma.c +6 -1
index 28720d3..3e4c627 100644
@@ -865,7 +865,12 @@ static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev)
 
 static irqreturn_t sh_dmae_err(int irq, void *data)
 {
-	return IRQ_RETVAL(sh_dmae_reset(data));
+	struct sh_dmae_device *shdev = data;
+
+	if (dmaor_read(shdev) & DMAOR_AE)
+		return IRQ_RETVAL(sh_dmae_reset(data));
+	else
+		return IRQ_NONE;
 }
 
 static void dmae_do_tasklet(unsigned long data)
Signature · 1 line
1.7.1
#1 lore raw
Quoted 4 lines · Yoshihiro Shimoda

The irq numbers of tranfer end and address error are assigned same number on some CPU. So the sh_dmae_err() should check the AE flag in DMAOR.

Thanks for cleaning it up! Applied.