[Tilt, TyTN II, MDA Vario III Windows Mobile ROM De] addisu:
Here is a patch to tnetw_sdio.c. The only changes are really in the SDIO_SyncWrite and SDIO_SyncRead functions where I changed the number of retries to start from 2 so it will skip the sdio_memcpy_fromio functions. The rest is all debug stuff.

diff --git a/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c b/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c
index bc88b9c..3f9bd58 100755
--- a/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c
+++ b/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c
@@ -4,7 +4,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Copyright © Texas Instruments Incorporated (Oct 2005)
+ * Copyright ï¿½ Texas Instruments Incorporated (Oct 2005)
* THIS CODE/PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDED BUT NOT LIMITED TO , THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -12,7 +12,7 @@
* Instruments Incorporated. These changes are covered under version 2
* of the GNU General Public License, dated June 1991.
*
- * Copyright © Google Inc (Feb 2008)
+ * Copyright ï¿½ Google Inc (Feb 2008)
*/
/*-------------------------------------------------------------------*/
#ifdef TIWLAN_MSM7000
@@ -25,6 +25,7 @@
#include "esta_drv.h"
#include "mmc_omap_api.h"
#include "osApi.h"
+
#define DM_DMA_WORKAROUND
/*-------------------------------------------------------------------*/
extern int tiwlan_sdio_init(struct sdio_func *func);
@@ -146,9 +147,10 @@ static int write_direct(struct sdio_func *func, unsigned long addr,
SDIO_Status SDIO_SyncRead(SDIO_Handle Handle, SDIO_Request_t *Req)
{
struct sdio_func *func = (struct sdio_func *)Handle;
-	int rc, retries = 5;
+	//int rc, retries = 5;
+	int rc, retries = 2;

-#if 0
+#if 1
printk("%s: p_addr = 0x%.8lx, sz = %d\n",
__FUNCTION__,
Req->peripheral_addr,
@@ -156,27 +158,34 @@ SDIO_Status SDIO_SyncRead(SDIO_Handle Handle, SDIO_Request_t *Req)
#endif

while(retries) {
- if( retries > 2 )
+	printk ("Starging retries %d\n",retries);
+ if( retries > 2 ){
#ifdef DM_DMA_WORKAROUND
if( Req->buffer_len < DMA_THRESHOLD_SIZE ) {
rc = sdio_memcpy_fromio(func, Req->buffer, Req->peripheral_addr, Req->buffer_len);
+ printk ("1Done reading from sdio %d\n",rc);
}
else {
rc = sdio_memcpy_fromio(func, sdio_dma_ptr, Req->peripheral_addr, Req->buffer_len);
+ printk ("2Done reading from sdio %d\n",rc);
memcpy( Req->buffer, sdio_dma_ptr, Req->buffer_len );
}
#else
rc = sdio_memcpy_fromio(func, Req->buffer, Req->peripheral_addr, Req->buffer_len);
+ printk ("3Done reading from sdio %d\n",rc);
#endif
- else
+ } else{
+ //	printk ("Reading directly\n");
rc = read_direct(func, Req->buffer, Req->peripheral_addr, Req->buffer_len);
-
+ // printk ("4Done reading from sdio %d\n",rc);
+ }
if (rc) {
printk(KERN_ERR "%s: Read operation failed (%d) (retries = %d)\n",
__FUNCTION__, rc, retries);
retries--;
continue;
}
+	//if (retries != 5)
if (retries != 5)
printk(KERN_ERR "%s: Retry succeeded\n", __FUNCTION__);
return SDIO_SUCCESS;
@@ -188,7 +197,8 @@ SDIO_Status SDIO_SyncRead(SDIO_Handle Handle, SDIO_Request_t *Req)
SDIO_Status SDIO_SyncWrite(SDIO_Handle Handle, SDIO_Request_t *Req)
{
struct sdio_func *func = (struct sdio_func *)Handle;
-	int rc, retries = 5;
+	//int rc, retries = 5;
+	int rc, retries = 2;
#ifdef DM_DMA_WORKAROUND
void *dma_ptr;
#endif
@@ -224,8 +234,8 @@ SDIO_Status SDIO_SyncWrite(SDIO_Handle Handle, SDIO_Request_t *Req)
retries--;
continue;
}
-
-	if (retries != 5)
+	//if (retries != 5)
+	if (retries != 2)
printk(KERN_ERR "%s: Retry succeeded\n", __FUNCTION__);
return SDIO_SUCCESS;
}