Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ARM: 6440/1: ep93xx: DMA: fix channel_disable

When channel_disable() is called, it disables per channel interrupts and
waits until channels state becomes STATE_STALL, and then disables the
channel. Now, if the DMA transfer is disabled while the channel is in
STATE_NEXT we will not wait anything and disable the channel immediately.
This seems to cause weird data corruption for example in audio transfers.

Fix is to wait while we are in STATE_NEXT or STATE_ON and only then
disable the channel.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Mika Westerberg and committed by
Russell King
10d48b39 c0bb5862

+1 -1
+1 -1
arch/arm/mach-ep93xx/dma-m2p.c
··· 276 276 v &= ~(M2P_CONTROL_STALL_IRQ_EN | M2P_CONTROL_NFB_IRQ_EN); 277 277 m2p_set_control(ch, v); 278 278 279 - while (m2p_channel_state(ch) == STATE_ON) 279 + while (m2p_channel_state(ch) >= STATE_ON) 280 280 cpu_relax(); 281 281 282 282 m2p_set_control(ch, 0x0);