aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorKen Sumrall <ksumrall@android.com>2016-05-10 05:23:13 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2016-05-16 05:31:26 -0400
commitcc4d04be94e34fc6d53307b534f830c6854c8721 (patch)
treebd5e870f8ec5e19e0330c4a8f59bbde1e3070517 /drivers/mmc
parentded97e0b165076556714d4a5708c87f5bcf03783 (diff)
mmc: block: improve logging of handling emmc timeouts
Add some logging to make it clear just how the emmc timeout was handled. Signed-off-by: Ken Sumrall <ksumrall@android.com> [AmitP: cherry-picked this Android patch from aosp common kernel android-4.4] Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/block.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 9ce679255775..5f2a3d69344f 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -948,16 +948,22 @@ static int mmc_blk_cmd_error(struct request *req, const char *name, int error,
948 req->rq_disk->disk_name, "timed out", name, status); 948 req->rq_disk->disk_name, "timed out", name, status);
949 949
950 /* If the status cmd initially failed, retry the r/w cmd */ 950 /* If the status cmd initially failed, retry the r/w cmd */
951 if (!status_valid) 951 if (!status_valid) {
952 pr_err("%s: status not valid, retrying timeout\n",
953 req->rq_disk->disk_name);
952 return ERR_RETRY; 954 return ERR_RETRY;
955 }
953 956
954 /* 957 /*
955 * If it was a r/w cmd crc error, or illegal command 958 * If it was a r/w cmd crc error, or illegal command
956 * (eg, issued in wrong state) then retry - we should 959 * (eg, issued in wrong state) then retry - we should
957 * have corrected the state problem above. 960 * have corrected the state problem above.
958 */ 961 */
959 if (status & (R1_COM_CRC_ERROR | R1_ILLEGAL_COMMAND)) 962 if (status & (R1_COM_CRC_ERROR | R1_ILLEGAL_COMMAND)) {
963 pr_err("%s: command error, retrying timeout\n",
964 req->rq_disk->disk_name);
960 return ERR_RETRY; 965 return ERR_RETRY;
966 }
961 967
962 /* Otherwise abort the command */ 968 /* Otherwise abort the command */
963 return ERR_ABORT; 969 return ERR_ABORT;