linux-mips
[Top] [All Lists]

Re: [PATCH] au1xmmc: raise segment size limit.

To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Subject: Re: [PATCH] au1xmmc: raise segment size limit.
From: Manuel Lauss <mano@roarinelk.homelinux.net>
Date: Tue, 29 Jul 2008 07:03:38 +0200
Cc: drzeus@drzeus.cx, linux-mips@linux-mips.org
In-reply-to: <488E4670.7090305@ru.mvista.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20080728133120.GB26494@roarinelk.homelinux.net> <488E4670.7090305@ru.mvista.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.16 (2007-06-09)
Hi Sergei,

> Manuel Lauss wrote:
>> Please apply this patch, as it fixes an oops when MMC-DMA and network
>> traffic are active at the same time.  This seems to be a 2.6.27-only 
>> thing;
>> the current au1xmmc code (minus the polling parts) works fine on 2.6.26.
>>
>> ---
>>
>> Raise the DMA block size limit from 2048 bytes to the maximum supported
>> by the DMA controllers on the chip (128kB on Au1100, 4MB on Au1200).
>>
>> This gives a small performance boost and apparently fixes an oops when
>> MMC-DMA and network traffic are active at the same time.
>>
>> Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
>>
>>   
> [...]
>> diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
>> index 99b2091..dd414f1 100644
>> --- a/drivers/mmc/host/au1xmmc.c
>> +++ b/drivers/mmc/host/au1xmmc.c
>> @@ -61,7 +61,13 @@
>>   /* Hardware definitions */
>>  #define AU1XMMC_DESCRIPTOR_COUNT 1
>> -#define AU1XMMC_DESCRIPTOR_SIZE  2048
>> +
>> +/* max DMA seg size: 64kB on Au1100, 4MB on Au1200 */
>>   
>
>  So, it's 64 or 128 KB? KB since k prefix usualy means decimal kilo... :-)

I'm not so sure myself.  If I understand the datasheet correctly, the Au1100
DMA ctrl always transfers 2 segments of up to 64KB each.  I'll correct the
commit-text and resend. Someone else with Au1100 hardware can figure that
out if they want; for now this only matter for Au1200 DMA.

(And I refuse to acknowledge the existence of that 'kibibyte' crap ;-) )

> WBR, Sergei

Thank you Sergei,
        Manuel Lauss

<Prev in Thread] Current Thread [Next in Thread>