mxcmmc driver hangs on sync
Erik Oomen
erik.oomen at zepcam.com
Thu Jun 17 14:51:37 EDT 2010
Morgan,
> Daniel,
>
> On Tue, 15 Jun 2010 09:22:37 +0200
> Daniel Mack <daniel at caiaq.de> wrote:
>> On Tue, Jun 15, 2010 at 03:20:51PM +0800, Morgan Howe wrote:
>>> On Tue, 15 Jun 2010 08:31:43 +0200
>>> Daniel Mack <daniel at caiaq.de> wrote:
>>>> On Tue, Jun 15, 2010 at 11:29:36AM +0800, Morgan Howe wrote:
>>>>> With the older kernel this would hang on sync after a few
>>>>> thousand loops, and much sooner if you ran 2 or 3 of these
>>>>> processes at a time. I tried last night with the newer kernel
>>>>> and kicking off 3 processes and after ~100-150 loops per
>>>>> process I get this:
>>>>
>>>> Which 'newer kernel' did you try?
>>>
>>> Hey Daniel,
>>>
>>> Sorry, I said current mainline, but actually it's 2.6.35-rc1.
>>
>> Could you try two things:
>>
>> a) build a kernel without MX2 DMA support
>> b) try 2.6.34, as there were some updates to the mxcmmc driver after
>> 2.6.34 which could be related
We've had the same problems for various kernels and mxcmmc modifications. The following fixed it. We applied it to the 2.6.28 kernel and have been writing and reading *many* Gigabytes without a problem.
diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/plat-mxc/dma-mx1-mx2.c
index e16014b..f295d68 100644
--- a/arch/arm/plat-mxc/dma-mx1-mx2.c
+++ b/arch/arm/plat-mxc/dma-mx1-mx2.c
@@ -653,7 +653,9 @@ static void dma_irq_handle_channel(int chno)
static irqreturn_t dma_irq_handler(int irq, void *dev_id)
{
int i, disr;
+ unsigned long flags;
+ local_irq_save(flags);
#ifdef CONFIG_ARCH_MX2
if (cpu_is_mx21() || cpu_is_mx27())
dma_err_handler(irq, dev_id);
@@ -669,7 +671,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
if (disr & (1 << i))
dma_irq_handle_channel(i);
}
-
+ local_irq_restore(flags);
return IRQ_HANDLED;
}
Regards,
Erik
More information about the linux-arm-kernel
mailing list