On 29 April 2014 10:32, Alex Smith <alex.sm...@imgtec.com> wrote:
> 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.sm...@imgtec.com>
> Cc: Lars-Peter Clausen <l...@metafoo.de>
> Cc: Ulf Hansson <ulf.hans...@linaro.org>
> Cc: Chris Ball <ch...@printf.net>
> Cc: James Hogan <james.ho...@imgtec.com>

Acked-by: Ulf Hansson <ulf.hans...@linaro.org>

> ---
>  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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to