[PATCH] mmc: failure of block read wait for long time

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Sep 20 09:37:03 EDT 2010


On Mon, Sep 20, 2010 at 04:09:15PM +0300, Adrian Hunter wrote:
> The SD/MMC protocol does not indicate which sector has the error.
> There is no possibility of trying the ith+1-segment because i is
> unknown.

Not entirely true.

I seem to remember that the MMC protocol (and probably SD protocol)
provides an ack at the end of each data block to say whether the data
block was correct or not.

Some hosts tell you when they receive this ack, and you can track how
many blocks have been successfully read without error.  The ARM MMCI
primecell does this.

However, some hosts don't give you this information, in which case you
don't know where the error occurred in the read - so when a read fails,
you can only safely report that no bytes were read successfully.  This
means that even if the error was on the last block, there's no way to
know this.



More information about the linux-arm-kernel mailing list