diff options
author | Ilya Yanok <yanok@emcraft.com> | 2010-10-27 03:52:56 +0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-12-30 08:28:14 +0300 |
commit | 2862559e8a1e7c47bb3003f0edbc9db9009dc32b (patch) | |
tree | 2737fe6a622fe36a1a9dc49224cdb39608e9cac8 /drivers/dma | |
parent | 6504cf3412373f42b53a675363c056901c1596cf (diff) | |
download | linux-2862559e8a1e7c47bb3003f0edbc9db9009dc32b.tar.xz |
powerpc/512x: fix the hanged dma transfer issue
Current code clears interrupt active status _after_ submitting new
transfers. This leaves a possibility of clearing the interrupt for this
new transfer (if it is triggered fast enough) and thus lose this
interrupt. We want to clear interrupt active status _before_ new
transfers is submitted and for current channel only.
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Acked-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/mpc512x_dma.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index 1bc04aa27b14..071752727718 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c @@ -276,6 +276,9 @@ static void mpc_dma_irq_process(struct mpc_dma *mdma, u32 is, u32 es, int off) spin_lock(&mchan->lock); + out_8(&mdma->regs->dmacint, ch + off); + out_8(&mdma->regs->dmacerr, ch + off); + /* Check error status */ if (es & (1 << ch)) list_for_each_entry(mdesc, &mchan->active, node) @@ -309,12 +312,6 @@ static irqreturn_t mpc_dma_irq(int irq, void *data) mpc_dma_irq_process(mdma, in_be32(&mdma->regs->dmaintl), in_be32(&mdma->regs->dmaerrl), 0); - /* Ack interrupt on all channels */ - out_be32(&mdma->regs->dmainth, 0xFFFFFFFF); - out_be32(&mdma->regs->dmaintl, 0xFFFFFFFF); - out_be32(&mdma->regs->dmaerrh, 0xFFFFFFFF); - out_be32(&mdma->regs->dmaerrl, 0xFFFFFFFF); - /* Schedule tasklet */ tasklet_schedule(&mdma->tasklet); |