[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1383995207-32188-1-git-send-email-nealb001@gmail.com>
Date: Sat, 9 Nov 2013 03:06:47 -0800
From: Neal Buckendahl <nealb001@...il.com>
To: nealb001@...il.com, cjb@...top.org
Cc: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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 <nealb001@...il.com>
---
drivers/mmc/host/sdhci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 6785fb1..480730f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -973,6 +973,8 @@ static void sdhci_finish_data(struct sdhci_host *host)
if (data->error) {
sdhci_reset(host, SDHCI_RESET_CMD);
sdhci_reset(host, SDHCI_RESET_DATA);
+ host->mrq->cmd->error = -ETIMEDOUT;
+ tasklet_schedule(&host->finish_tasklet);
}
sdhci_send_command(host, data->stop);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists