Skip to content

Commit cc4d04b

Browse files
Ken Sumrallstorulf
authored andcommitted
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 <[email protected]> [AmitP: cherry-picked this Android patch from aosp common kernel android-4.4] Signed-off-by: Amit Pundir <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent ded97e0 commit cc4d04b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/mmc/card/block.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,16 +948,22 @@ static int mmc_blk_cmd_error(struct request *req, const char *name, int error,
948948
req->rq_disk->disk_name, "timed out", name, status);
949949

950950
/* 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);
952954
return ERR_RETRY;
955+
}
953956

954957
/*
955958
* If it was a r/w cmd crc error, or illegal command
956959
* (eg, issued in wrong state) then retry - we should
957960
* have corrected the state problem above.
958961
*/
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);
960965
return ERR_RETRY;
966+
}
961967

962968
/* Otherwise abort the command */
963969
return ERR_ABORT;

0 commit comments

Comments
 (0)