From: Nicolas Ferre Date: Mon, 16 Apr 2012 12:46:30 +0000 (+0200) Subject: dmaengine: at_hdmac: remove clear-on-read in atc_dostart() X-Git-Tag: v3.3.5~62 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f2a395ea7f39652cbadb4a519c7d5cdaf2f5866e;p=karo-tx-linux.git dmaengine: at_hdmac: remove clear-on-read in atc_dostart() commit ed8b0d67f33518a16c6b2450fe5ebebf180c2d04 upstream. This loop on EBCISR register was designed to clear IRQ sources before enabling a DMA channel. This register is clear-on-read so a race condition can appear if another channel is already active and has just finished its transfer. Removing this read on EBCISR is fixing the issue as there is no case where an IRQ could be pending: we already make sure that this register is drained at probe() time and during resume. Signed-off-by: Nicolas Ferre Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index f4aed5fc2cb6..a342873526f8 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -241,10 +241,6 @@ static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first) vdbg_dump_regs(atchan); - /* clear any pending interrupt */ - while (dma_readl(atdma, EBCISR)) - cpu_relax(); - channel_writel(atchan, SADDR, 0); channel_writel(atchan, DADDR, 0); channel_writel(atchan, CTRLA, 0);