Commit 1acee84b authored by Alex Smith's avatar Alex Smith Committed by Chris Ball

mmc: jz4740: don't wait for PRG_DONE after stop command with R1 response

As of commit bcc3e172 ("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: default avatarAlex 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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarChris Ball <chris@printf.net>
parent c373eb48
...@@ -515,10 +515,13 @@ static irqreturn_t jz_mmc_irq_worker(int irq, void *devid) ...@@ -515,10 +515,13 @@ static irqreturn_t jz_mmc_irq_worker(int irq, void *devid)
jz4740_mmc_send_command(host, req->stop); jz4740_mmc_send_command(host, req->stop);
timeout = jz4740_mmc_poll_irq(host, JZ_MMC_IRQ_PRG_DONE); if (mmc_resp_type(req->stop) & MMC_RSP_BUSY) {
if (timeout) { timeout = jz4740_mmc_poll_irq(host,
host->state = JZ4740_MMC_STATE_DONE; JZ_MMC_IRQ_PRG_DONE);
break; if (timeout) {
host->state = JZ4740_MMC_STATE_DONE;
break;
}
} }
case JZ4740_MMC_STATE_DONE: case JZ4740_MMC_STATE_DONE:
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment