dma: shdma: add checking the DMAOR_AE in sh_dmae_err
PATCH 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.
--- drivers/dma/shdma.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/dma/shdma.c +6 -1
@@ -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 = (struct sh_dmae_device *)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
Quoted 3 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.
Looks ok, but..
drivers/dma/shdma.c static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev) · line 869
Quoted 5 lines
static
irqreturn_tsh_dmae_err(int irq, void *data){drivers/dma/shdma.c +2
-1-return IRQ_RETVAL (sh_dmae_reset (data)); +struct sh_dmae_device *shdev = (struct sh_dmae_device *)data; +
Please do not ever cast void pointers, it's completely pointless and just means someone else has to go and tidy up the patch manually.
Hi Paul,
Quoted 6 lines · Paul Mundt
Quoted 3 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.Looks ok, but..
Quoted 7 lines
drivers/dma/shdma.c static unsigned int sh_dmae_reset(struct sh_dmae_device *shdev) · line 869
Quoted 5 lines
static
irqreturn_tsh_dmae_err(int irq, void *data){drivers/dma/shdma.c +2
-1-return IRQ_RETVAL (sh_dmae_reset (data)); +struct sh_dmae_device *shdev = (struct sh_dmae_device *)data; +Please do not ever cast void pointers, it's completely pointless and just means someone else has to go and tidy up the patch manually.
Thank you very much for your prompt review.
I understood it. I will send the modified patch soon.
Thanks,
Yoshihiro Shimoda