linux-stable/drivers/mmc/card
Russell King - ARM Linux a01f3ccf84 mmc: block: improve error recovery from command channel errors
Command channel errors fall into four classes:

1. The command was issued with the card in the wrong state
2. The command failed to be received by the card correctly
3. The cards response failed to be received by the host (CRC error)
4. The card failed to respond to the card

For (1), in theory we should know that the card is in the correct state.
However, a failed stop command (or other failure) may result in the card
remaining in a data transfer state from the previous command.  If we
detect this condition, we try to recover by sending a stop command.

For the initial commands (set block count and the read/write command)
no data will have been transferred.  All that we need deal with is
retrying at this point.  A failed stop command can be remedied as
above.

If we are unable to recover the card (eg, the card ignores our requests
for status, or we don't recognise the error code) then we immediately
fail the request.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-07-20 17:20:54 -04:00
..
block.c mmc: block: improve error recovery from command channel errors 2011-07-20 17:20:54 -04:00
Kconfig mmc: Improve MMC_TEST config text. 2011-03-15 13:48:56 -04:00
Makefile mmc: Makefile: Fix EXTRA_CFLAGS assignment 2010-10-23 21:11:15 +08:00
mmc_test.c mmc: mmc_test: minor clean up, use t = &test.area everywhere 2011-05-24 23:53:49 -04:00
queue.c mmc: queue: bring discard_granularity/alignment into line with SCSI 2011-06-25 18:53:05 -04:00
queue.h mmc: queue: append partition subname to queue thread name 2011-06-25 18:52:57 -04:00
sdio_uart.c tiocmset: kill the file pointer argument 2011-02-17 11:52:43 -08:00