mmc_spi: Recover from CRC errors for r/w operation over SPI.
authorSonic Zhang <sonic.zhang@analog.com>
Mon, 12 Jul 2010 07:50:56 +0000 (15:50 +0800)
committerChris Ball <cjb@laptop.org>
Sat, 23 Oct 2010 13:11:22 +0000 (21:11 +0800)
commit061c6c847eeb11743e489a16e907b41c6f9042b6
tree37bb835b50342cc459366e36da1117b137760f6d
parent95f25efe0ce22e28d61722d655d2ef582f5f7520
mmc_spi: Recover from CRC errors for r/w operation over SPI.

The SPI bus is not reliable for large data transfers on all platforms.
The current mmc_spi driver fails SD read/write commands immediately if
occasional CRC errors are reported by the SD device.  This patch makes
the operation recover from CRC errors by repeating the last SD command.
The retry count is set to 5 to ensure the driver passes stress tests.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/mmc_spi.c