diff options
author | Alex Smith <alex.smith@imgtec.com> | 2014-04-29 08:54:54 -0400 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-05-12 18:08:22 -0400 |
commit | 1acee84b6fcfccb2f3488bfdf23664b47e0c445b (patch) | |
tree | 05db89df2849dabf8f2436acc42b46b69702da98 | |
parent | c373eb489b27b268c9b8c267b212d10864bc8cdd (diff) |
mmc: jz4740: don't wait for PRG_DONE after stop command with R1 response
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>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
-rw-r--r-- | drivers/mmc/host/jz4740_mmc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index de2139cf3444..537d6c7a5ae4 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c | |||
@@ -515,10 +515,13 @@ static irqreturn_t jz_mmc_irq_worker(int irq, void *devid) | |||
515 | 515 | ||
516 | jz4740_mmc_send_command(host, req->stop); | 516 | jz4740_mmc_send_command(host, req->stop); |
517 | 517 | ||
518 | timeout = jz4740_mmc_poll_irq(host, JZ_MMC_IRQ_PRG_DONE); | 518 | if (mmc_resp_type(req->stop) & MMC_RSP_BUSY) { |
519 | if (timeout) { | 519 | timeout = jz4740_mmc_poll_irq(host, |
520 | host->state = JZ4740_MMC_STATE_DONE; | 520 | JZ_MMC_IRQ_PRG_DONE); |
521 | break; | 521 | if (timeout) { |
522 | host->state = JZ4740_MMC_STATE_DONE; | ||
523 | break; | ||
524 | } | ||
522 | } | 525 | } |
523 | case JZ4740_MMC_STATE_DONE: | 526 | case JZ4740_MMC_STATE_DONE: |
524 | break; | 527 | break; |