Talk:SD Cards

From A110 Wiki
Jump to: navigation, search


Contents

This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page


CLICK HERE


Does the cardreader driver making troubles?

Hi, maybe it depends on my SD-cards (I tried it extensively with one of them and had in a short test similar problems with another one), but the cardreader driver still seems to make problems if the filesystem is in heavy use. It's absolutely unpredictable when the error occurs, but it occours if you do heavy actions on the SD like unpacking a linux kernel source. In case of error, for example "tar" will stop doing anything. Also if you try "sync" on the command line this will not finish. Since "sync" is also done befor a "halt", you'll not be able to cleanly shutdown the machine. Regarding to cardreader driver version and kernel version: it's the problem with all versions of the cardreader driver (original, patched and all versions) and all versions of the kernel I tried (2.6.22.19 custom made, the 2.6.22.xx One kernel (with and without additional modules), 2.6.25.4 from Kanotix and a custom made 2.6.25.4). One of the error indicators is that "mmcqd" uses more than 90% of cpu time and you are not able to display SD contents. Well, maybe it's my SD-cards, but even then it should not result in such a desaster that nothing is really possible anymore (like "sync").<br /> Do you see similar problems? --Helmar Wodtke 13:13, 10 June 2008 (UTC)

Possible Solution

I have exactly the same kind of problems - especially this error -110 while requesting status. I searched for that in the source and found this in drivers/mmc/card/block.c:

err = mmc_wait_for_cmd(card->host, &cmd, 5);
 if (err) {
  printk(KERN_ERR "%s: error %d requesting status\n",

So... my guess: 5 retries are sometimes not enough! I increased it to 15 and also changed the standard retries from 3 to 6 (drivers/mmc/core/core.h):

#define MMC_CMD_RETRIES        6

This seems to work - right now I successfully sync'ed after untarring 50 MB on SD (very, very slow but with no error)

I put that into the SD page too, so please test!

Addition: Untarring a linux kernel on SD works. Furthermore, I have done this on an OCZ-SDHC that was not reliable with the unpatched driver - it stuck after some accesses with the -110 error.

Personal tools