Date:2014-04-29 14:54:54 (6 years 1 month ago)
Author:Alex Smith
Commit:c9913093c244a42099fd2236c98554b95d75790c
Message: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>
Files: drivers/mmc/host/jz4740_mmc.c (1 diff)

Change Details

drivers/mmc/host/jz4740_mmc.c
516516
517517        jz4740_mmc_send_command(host, req->stop);
518518
519        timeout = jz4740_mmc_poll_irq(host, JZ_MMC_IRQ_PRG_DONE);
520        if (timeout) {
521            host->state = JZ4740_MMC_STATE_DONE;
522            break;
519        if (mmc_resp_type(req->stop) & MMC_RSP_BUSY) {
520            timeout = jz4740_mmc_poll_irq(host,
521                              JZ_MMC_IRQ_PRG_DONE);
522            if (timeout) {
523                host->state = JZ4740_MMC_STATE_DONE;
524                break;
525            }
523526        }
524527    case JZ4740_MMC_STATE_DONE:
525528        break;

Archive Download the corresponding diff file



interactive