* [PATCH] dma: shdma: add checking the DMAOR_AE in sh_dmae_err
@ 2011-02-09 6:51 Yoshihiro Shimoda
2011-02-09 7:19 ` Paul Mundt
2011-02-09 7:44 ` Yoshihiro Shimoda
0 siblings, 2 replies; 3+ messages in thread
From: Yoshihiro Shimoda @ 2011-02-09 6:51 UTC (permalink / raw)
To: linux-sh
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.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
drivers/dma/shdma.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 28720d3..588b92f 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -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)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dma: shdma: add checking the DMAOR_AE in sh_dmae_err
2011-02-09 6:51 [PATCH] dma: shdma: add checking the DMAOR_AE in sh_dmae_err Yoshihiro Shimoda
@ 2011-02-09 7:19 ` Paul Mundt
2011-02-09 7:44 ` Yoshihiro Shimoda
1 sibling, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2011-02-09 7:19 UTC (permalink / raw)
To: linux-sh
On Wed, Feb 09, 2011 at 03:51:44PM +0900, Yoshihiro Shimoda wrote:
> 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..
> 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;
> +
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dma: shdma: add checking the DMAOR_AE in sh_dmae_err
2011-02-09 6:51 [PATCH] dma: shdma: add checking the DMAOR_AE in sh_dmae_err Yoshihiro Shimoda
2011-02-09 7:19 ` Paul Mundt
@ 2011-02-09 7:44 ` Yoshihiro Shimoda
1 sibling, 0 replies; 3+ messages in thread
From: Yoshihiro Shimoda @ 2011-02-09 7:44 UTC (permalink / raw)
To: linux-sh
Hi Paul,
2011/02/09 16:19, Paul Mundt wrote:
> On Wed, Feb 09, 2011 at 03:51:44PM +0900, Yoshihiro Shimoda wrote:
>> 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..
>
>> 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;
>> +
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-09 7:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-09 6:51 [PATCH] dma: shdma: add checking the DMAOR_AE in sh_dmae_err Yoshihiro Shimoda
2011-02-09 7:19 ` Paul Mundt
2011-02-09 7:44 ` Yoshihiro Shimoda
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).