mmc: dw_mmc: handle "no CRC status" error
authorJames Hogan <james.hogan@imgtec.com>
Wed, 29 Jun 2011 08:29:58 +0000 (09:29 +0100)
committerChris Ball <cjb@laptop.org>
Wed, 20 Jul 2011 21:21:06 +0000 (17:21 -0400)
commit55c5efbc0dbcb20b7f0d264d172ab376494d79a1
treead31ddb71b4482c57b5affc9543a4d64c751ac6c
parentae837fe6ddb1e4e9238191629baa08c35ed4a6bb
mmc: dw_mmc: handle "no CRC status" error

When a data write isn't acknowledged by the card (so no CRC status token
is detected after the data), the error -EIO is returned instead of the
-ETIMEDOUT expected by mmc_test 15 - "Correct xfer_size at write (start
failure)" and 17 "Correct xfer_size at write (midway failure)". In PIO
mode the reported number of bytes transferred is also exaggerated since
the last block actually failed.

Handle the "Write no CRC" error specially, setting the error to
-ETIMEDOUT and setting the bytes_xferred to 0.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc.c