提交 320ce6f6 编写于 作者: J Juha Yrjola 提交者: Tony Lindgren

ARM: OMAP: Fix race in OMAP2/3 DMA IRQ handling

CSR must be cleared before invoking the callback.

If the callback function starts a new, fast DMA transfer on the same
channel, the completion status might lost if CSR is cleared after
the callback invocation.
Signed-off-by: NJuha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>

上级 06151158
......@@ -1888,11 +1888,11 @@ static int omap2_dma_handle_ch(int ch)
status = dma_read(CSR(ch));
}
dma_write(status, CSR(ch));
if (likely(dma_chan[ch].callback != NULL))
dma_chan[ch].callback(ch, status, dma_chan[ch].data);
dma_write(status, CSR(ch));
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册