From: Alex Smith <alex.smith@imgtec.com>
To: linux-mmc@vger.kernel.org
Cc: Alex Smith <alex.smith@imgtec.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Ulf Hansson <ulf.hansson@linaro.org>,
Chris Ball <chris@printf.net>,
James Hogan <james.hogan@imgtec.com>
Subject: [PATCH] mmc: jz4740: don't wait for PRG_DONE after stop command with R1 response
Date: Tue, 29 Apr 2014 09:32:33 +0100 [thread overview]
Message-ID: <1398760353-12507-1-git-send-email-alex.smith@imgtec.com> (raw)
As of commit bcc3e1726d ("mmc: block: Use R1 responses for stop cmds for
read requests"), stop commands for reads do not have MMC_RSP_BUSY set.
In this case we should not wait for a PRG_DONE IRQ after sending the
stop command: it will not get raised when the busy flag is not set,
causing the request to fail with a timeout.
Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Chris Ball <chris@printf.net>
Cc: James Hogan <james.hogan@imgtec.com>
---
drivers/mmc/host/jz4740_mmc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index de2139c..1c3368b 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -515,10 +515,12 @@ static irqreturn_t jz_mmc_irq_worker(int irq, void *devid)
jz4740_mmc_send_command(host, req->stop);
- timeout = jz4740_mmc_poll_irq(host, JZ_MMC_IRQ_PRG_DONE);
- if (timeout) {
- host->state = JZ4740_MMC_STATE_DONE;
- break;
+ if (mmc_resp_type(req->stop) & MMC_RSP_BUSY) {
+ timeout = jz4740_mmc_poll_irq(host, JZ_MMC_IRQ_PRG_DONE);
+ if (timeout) {
+ host->state = JZ4740_MMC_STATE_DONE;
+ break;
+ }
}
case JZ4740_MMC_STATE_DONE:
break;
--
1.9.2
next reply other threads:[~2014-04-29 8:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 8:32 Alex Smith [this message]
2014-04-29 11:07 ` [PATCH] mmc: jz4740: don't wait for PRG_DONE after stop command with R1 response Ulf Hansson
2014-04-29 11:28 ` Lars-Peter Clausen
2014-04-29 12:11 ` Ulf Hansson
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=1398760353-12507-1-git-send-email-alex.smith@imgtec.com \
--to=alex.smith@imgtec.com \
--cc=chris@printf.net \
--cc=james.hogan@imgtec.com \
--cc=lars@metafoo.de \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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