mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
mxc : BUG in imx_dma_request
On MX2 platforms imx_dma_request() calls request_irq() which may sleep with interrupts disabled. Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
de0096d809
commit
f2292532a5
1 changed files with 4 additions and 8 deletions
|
@ -693,12 +693,15 @@ int imx_dma_request(int channel, const char *name)
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
memset(imxdma, 0, sizeof(imxdma));
|
||||||
|
imxdma->name = name;
|
||||||
|
local_irq_restore(flags); /* request_irq() can block */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_MX2
|
#ifdef CONFIG_ARCH_MX2
|
||||||
ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA",
|
ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA",
|
||||||
NULL);
|
NULL);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
local_irq_restore(flags);
|
imxdma->name = NULL;
|
||||||
printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n",
|
printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n",
|
||||||
MXC_INT_DMACH0 + channel, channel);
|
MXC_INT_DMACH0 + channel, channel);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -708,13 +711,6 @@ int imx_dma_request(int channel, const char *name)
|
||||||
imxdma->watchdog.data = channel;
|
imxdma->watchdog.data = channel;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
imxdma->name = name;
|
|
||||||
imxdma->irq_handler = NULL;
|
|
||||||
imxdma->err_handler = NULL;
|
|
||||||
imxdma->data = NULL;
|
|
||||||
imxdma->sg = NULL;
|
|
||||||
|
|
||||||
local_irq_restore(flags);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(imx_dma_request);
|
EXPORT_SYMBOL(imx_dma_request);
|
||||||
|
|
Loading…
Reference in a new issue