Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.1830);
	 Mon, 28 Jul 2008 06:32:18 -0700
Received: from dalesmta2-2.messageone.com ([129.41.169.249]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.1830);
	 Mon, 28 Jul 2008 06:32:17 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by dalesmta2-2.messageone.com (8.13.8/8.13.8) with ESMTP id m6SDWFbU028574
	for <andy.sharp@onstor.com>; Mon, 28 Jul 2008 08:32:16 -0500
Received: from localhost.localdomain ([127.0.0.1]:45212 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S20024964AbYG1Nbs (ORCPT <rfc822;andy.sharp@onstor.com>);
	Mon, 28 Jul 2008 14:31:48 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 28 Jul 2008 14:31:31 +0100 (BST)
Received: from fnoeppeil48.netpark.at ([217.175.205.176]:41668 "EHLO
	roarinelk.homelinux.net") by ftp.linux-mips.org with ESMTP
	id S20024818AbYG1NbY (ORCPT <rfc822;linux-mips@linux-mips.org>);
	Mon, 28 Jul 2008 14:31:24 +0100
Received: (qmail 29291 invoked by uid 1000); 28 Jul 2008 15:31:20 +0200
Date: 	Mon, 28 Jul 2008 15:31:20 +0200
From: Manuel Lauss <mano@roarinelk.homelinux.net>
To: drzeus@drzeus.cx, linux-mips@linux-mips.org
Subject: [PATCH] au1xmmc: raise segment size limit.
Message-ID: <20080728133120.GB26494@roarinelk.homelinux.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-09)
X-archive-position: 19989
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: mano@roarinelk.homelinux.net
Precedence: bulk
X-list: 	linux-mips
X-MessageOne-Virus-Version: vendor=fsecure engine=4.65.7161:2.4.4,1.2.40,4.0.164 definitions=2008-07-28_04:2008-07-24,2008-07-28,2008-07-28 signatures=0
X-MessageOne-Virus-Scanned: Clean
X-MessageOne-Envelope-Sender: linux-mips-bounce@linux-mips.org
X-MessageOne-Spam-Details: rule=m773emszm_notspam policy=m773emszm score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0805090000 definitions=main-0807280054
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 28 Jul 2008 13:32:17.0839 (UTC) FILETIME=[5AD08BF0:01C8F0B6]

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


