diff options
author | Juha Yrjola <juha.yrjola@solidboot.com> | 2009-01-29 11:57:12 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-01-29 11:57:12 -0500 |
commit | 320ce6f6fb3d95e02a183709e51d8a16a8b00e0a (patch) | |
tree | c38b7f28be57747791e2c91a11ad87c8b2428550 /arch | |
parent | 06151158f2da4764479b4ec01688dc4bade6ce9d (diff) |
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: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index e77373c39f8c..bec8e363d545 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -1888,11 +1888,11 @@ static int omap2_dma_handle_ch(int ch) | |||
1888 | status = dma_read(CSR(ch)); | 1888 | status = dma_read(CSR(ch)); |
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | dma_write(status, CSR(ch)); | ||
1892 | |||
1891 | if (likely(dma_chan[ch].callback != NULL)) | 1893 | if (likely(dma_chan[ch].callback != NULL)) |
1892 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); | 1894 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); |
1893 | 1895 | ||
1894 | dma_write(status, CSR(ch)); | ||
1895 | |||
1896 | return 0; | 1896 | return 0; |
1897 | } | 1897 | } |
1898 | 1898 | ||