View Single Post
Posts: 1,141 | Thanked: 781 times | Joined on Dec 2009 @ Magical Unicorn Land
#4
Thanks for posting, I've been meaning to create a thread about it but have been extremely busy lately.

14 (0xA) is the standard DTO setting for SD cards. The omap_hsmmc driver tries to use some logic to dynamically change DTO based on the card timings but apparently this logic is buggy, or perhaps certain cards return bad timing information when the driver requests it. It affects all devices which use this driver, not just the N900, and other devices with other drivers too. The suggestion to use DTO=14 came from Texas Instruments, so it should be safe for all. Forcing DTO to 14 is the fix/workaround for all kinds of SD drivers. Apparently it is quite a common problem.

The set_data_timeout function can actually be reduced quite a bit, inserting the dto=14 line ultimately has the same effect, but really all of the stuff related to the DTO calculation in that function can be removed. I don't have access to my computer right now but I can post the one I've been using when I get home.

This fixes the cards that suffer corruption and constant -110 errors in dmesg (this is a timeout error, because the DTO was set incorrectly by the driver). The same cards that work perfectly fine in other devices, USB card readers, etc.

I've been using this fix with both affected and unaffected cards for a couple weeks and have seen no problems either way. Since it worked for AndrewX192 also I think it should be safe for human consumption.

I tried to apply the same fix to the latest Nitdroid kernel but haven't been able to get it working so far. I very likely could just be doing it wrong. It could also be getting confused by my existing nitdroid installation which runs on my other SD card. I haven't had time to really try much more with it yet.
 

The Following 11 Users Say Thank You to stlpaul For This Useful Post: