linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neal Buckendahl <nealb001@gmail.com>
To: nealb001@gmail.com, cjb@laptop.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mmc: host: sdhci: prevent mmcqd from becoming locked on mmc timeout
Date: Sat,  9 Nov 2013 03:06:47 -0800	[thread overview]
Message-ID: <1383995207-32188-1-git-send-email-nealb001@gmail.com> (raw)

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@gmail.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


             reply	other threads:[~2013-11-09 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09 11:06 Neal Buckendahl [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-11-14  4:22 [PATCH] mmc: host: sdhci: prevent mmcqd from becoming locked on mmc timeout Neal Buckendahl
2013-11-14 16:36 Neal Buckendahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383995207-32188-1-git-send-email-nealb001@gmail.com \
    --to=nealb001@gmail.com \
    --cc=cjb@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).