Skip to content

Commit

Permalink
mmc: block: improve logging of handling emmc timeouts
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ken Sumrall authored and Ulf Hansson committed May 16, 2016
1 parent ded97e0 commit cc4d04b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/mmc/card/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,16 +948,22 @@ static int mmc_blk_cmd_error(struct request *req, const char *name, int error,
req->rq_disk->disk_name, "timed out", name, status);

/* If the status cmd initially failed, retry the r/w cmd */
if (!status_valid)
if (!status_valid) {
pr_err("%s: status not valid, retrying timeout\n",
req->rq_disk->disk_name);
return ERR_RETRY;
}

/*
* If it was a r/w cmd crc error, or illegal command
* (eg, issued in wrong state) then retry - we should
* have corrected the state problem above.
*/
if (status & (R1_COM_CRC_ERROR | R1_ILLEGAL_COMMAND))
if (status & (R1_COM_CRC_ERROR | R1_ILLEGAL_COMMAND)) {
pr_err("%s: command error, retrying timeout\n",
req->rq_disk->disk_name);
return ERR_RETRY;
}

/* Otherwise abort the command */
return ERR_ABORT;
Expand Down

0 comments on commit cc4d04b

Please sign in to comment.