All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] au1xmmc: raise segment size limit.
@ 2008-07-28 13:31 Manuel Lauss
  2008-07-28 22:21 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Manuel Lauss @ 2008-07-28 13:31 UTC (permalink / raw)
  To: drzeus, linux-mips

Hi Pierre,

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>
---
 drivers/mmc/host/au1xmmc.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

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 */
+#ifdef CONFIG_SOC_AU1100
+#define AU1XMMC_DESCRIPTOR_SIZE 0x0000ffff
+#else	/* Au1200 */
+#define AU1XMMC_DESCRIPTOR_SIZE 0x003fffff
+#endif
 
 #define AU1XMMC_OCR (MMC_VDD_27_28 | MMC_VDD_28_29 | MMC_VDD_29_30 | \
 		     MMC_VDD_30_31 | MMC_VDD_31_32 | MMC_VDD_32_33 | \
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] au1xmmc: raise segment size limit.
  2008-07-28 13:31 [PATCH] au1xmmc: raise segment size limit Manuel Lauss
@ 2008-07-28 22:21 ` Sergei Shtylyov
  2008-07-29  5:03   ` Manuel Lauss
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2008-07-28 22:21 UTC (permalink / raw)
  To: Manuel Lauss; +Cc: drzeus, linux-mips

Hello.

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... :-)

WBR, Sergei

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] au1xmmc: raise segment size limit.
  2008-07-28 22:21 ` Sergei Shtylyov
@ 2008-07-29  5:03   ` Manuel Lauss
  0 siblings, 0 replies; 3+ messages in thread
From: Manuel Lauss @ 2008-07-29  5:03 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: drzeus, linux-mips

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-29  5:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-28 13:31 [PATCH] au1xmmc: raise segment size limit Manuel Lauss
2008-07-28 22:21 ` Sergei Shtylyov
2008-07-29  5:03   ` Manuel Lauss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.