summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorZeng Zhaoming <b32542@freescale.com>2011-04-29 02:34:05 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:13:35 +0800
commit2446be8eb39f6636b44534f59e0d18ccad7504ee (patch)
tree255cdbbe754e5721f747b9a20d6d2e887775dbc8 /drivers/dma
parentd0d60e76a45fa3602f890583a806efaefe0ec917 (diff)
ENGR00142734 SDMA: Fix sdma incorrect lock usage.
In very seldom, play audio will caused system hangs in 2.6.38 kernel. This is caused by new sdma driver wrongly enable irq after enable channel. Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/imx-sdma.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index a681051ad392..e11d754a8c8a 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -794,14 +794,15 @@ static dma_cookie_t sdma_tx_submit(struct dma_async_tx_descriptor *tx)
struct sdma_channel *sdmac = to_sdma_chan(tx->chan);
struct sdma_engine *sdma = sdmac->sdma;
dma_cookie_t cookie;
+ int flag;
- spin_lock_irq(&sdmac->lock);
+ spin_lock_irqsave(&sdmac->lock, flag);
cookie = sdma_assign_cookie(sdmac);
sdma_enable_channel(sdma, sdmac->channel);
- spin_unlock_irq(&sdmac->lock);
+ spin_unlock_irqrestore(&sdmac->lock, flag);
return cookie;
}