mmc: host: sdhci: prevent mmcqd from becoming locked on mmc timeout
PATCH 1/1 mmc: host: sdhci: prevent mmcqd from becoming locked on mmc timeout
fixed a condition where device issues a status cmd to sdcard but no response comes from sdcard. The sdhci irq fires and we hit a timeout case which calls sdhci_finish_data(). sdhci_finish_data eventually attempt to reset controller and issues stop cmd. However mmcdq is wait_for_completion(&mrq->completion) in function mmc_wait_for_req_done which never occurs.
Signed-off-by Neal Buckendahl <[email protected]>
Signed-off-by Narayanan Gopalakrishnan <[email protected]>
Signed-off-by Philip Rakity <[email protected]>
--- drivers/mmc/host/sdhci.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/host/sdhci.c +4 -0
@@ -973,6 +973,10 @@ static void sdhci_finish_data(struct sdhci_host *host)if (data->error) {sdhci_reset (host,SDHCI_RESET_CMD );sdhci_reset (host,SDHCI_RESET_DATA ); +if (data->error == -ETIMEDOUT ) { + host->mrq->cmd->error = -ETIMEDOUT ; +tasklet_schedule (&host->finish_tasklet); + } }sdhci_send_command (host, data->stop);
Signature · 1 line
1.7.10.4