[BUG] mxcmmc: SD card data transfer blocks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
the BUG was found in a Visstrim_M10 i.MX27 based board using the
following script:

#!/bin/sh

i=0
mount /dev/mmcblk0p1 /opt
while [ 0 -eq 0 ]
do
        echo "Iteration $i"
        cp /opt/release.trx /opt/lol.tmp
        sync
        MD5OLD=`md5sum /opt/release.trx | awk '{print $1}'`
        MD5NEW=`md5sum /opt/lol.tmp | awk '{print $1}'`
        if [ $MD5OLD = $MD5NEW ]
        then
                echo "OK: $MD5OLD == $MD5NEW"
        else
                echo "WRONG: $MD5OLD != $MD5NEW"
                dmesg | tail -n 30
        fi
        rm -rf /opt/lol.tmp
        sync
        i=`expr $i + 1`
done


After several iterations the 'cp' process just hangs waiting for a MMC
transfer completion, which never happens.

We've added a timeout so that we can detect whether this problem
occurs or not. Ideally, when a MMC irq is lost we should force a retry
but it seems retries are only handled under certain circumstances by
the upper layers:
http://lxr.linux.no/#linux+v3.5.3/drivers/mmc/core/core.c#L327

Has anybody found the same problem? What is the right way to force a
retry of the data transfer in the host driver?

NOTE: the BUG only triggers when using DMA transfers, not PIO.

Regards.
-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux