On Mon, May 30, 2011 at 6:43 PM, Frantisek Dufka dufkaf@gmail.com wrote:
So unless there is off by one bit shift bug in the code, or the TRM or HW is wrong, this looks like the *=2 just adds random safety margin for buggy cards (resulting in dto variable being +1 in the end). Let's hope this margin is big enough for all such cards.
Yeah, that code looks correct to me. Maybe it's too precise, most controllers might have some extra room "just in case", and card manufacturers could have started relying on it, who knows. Or it could be some hardware quirk, even one of my cards is affected by this on 2.6.37 where interrupt code has been rewritten, but works fine here on the older 2.6.27 code.
Yes, I have one specific card - Transcend Class 10 16GB and see this quite frequently when trying to write to it. No problems to test the fix.
Here, copy this to /boot/uImage: http://notaz.gp2x.de/tmp/uImage_mmc_tout_test
should be HF5 compatible, let me know if it helps.
GraÅžvydas