mmc: Retry some MMC cmds on failure
authorVignesh R <vigneshr@ti.com>
Fri, 12 May 2017 18:16:40 +0000 (20:16 +0200)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:11 +0000 (02:37 +0800)
commite5249ead22cc59dafed05c8dd445a210db9012ba
tree7d270926736c62378f46e74a73697d832ea403ee
parent72be45ef150067c3ee68789f67a27a7b35897dc0
mmc: Retry some MMC cmds on failure

With certain SD cards like Kingston 8GB/16GB UHS card, it is seen that
MMC_CMD_ALL_SEND_CID cmd fails on first attempt, but succeeds
subsequently. Therefore, retry MMC_CMD_ALL_SEND_CID cmd at least thrice
as done in Linux kernel.
Similarly, it is seen that MMC_CMD_SET_BLOCKLEN may fail on first
attempt, therefore retry this cmd five times as done in kernel.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/mmc/mmc.c