[PATCH] mmc: atmel-mci: fix data timeout issue

Chris Ball cjb at laptop.org
Wed Jun 6 06:02:36 EDT 2012


Hi,

On Wed, May 23 2012, ludovic.desroches at atmel.com wrote:
> From: Ludovic Desroches <ludovic.desroches at atmel.com>
>
> The data timeout timer was configured after mmc_add_host call. So, with bad
> timings, it was possible to have a mmc request causing mod_timer call on a
> non setup timer.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches at atmel.com>
> ---
>  drivers/mmc/host/atmel-mci.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 93a1012..a25e23a 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -2396,6 +2396,8 @@ static int __init atmci_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, host);
>  
> +	setup_timer(&host->timer, atmci_timeout_timer, (unsigned long)host);
> +
>  	/* We need at least one slot to succeed */
>  	nr_slots = 0;
>  	ret = -ENODEV;
> @@ -2434,8 +2436,6 @@ static int __init atmci_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> -	setup_timer(&host->timer, atmci_timeout_timer, (unsigned long)host);
> -
>  	dev_info(&pdev->dev,
>  			"Atmel MCI controller at 0x%08lx irq %d, %u slots\n",
>  			host->mapbase, irq, nr_slots);

Pushed to mmc-next for 3.5, thanks.

- Chris.
-- 
Chris Ball   <cjb at laptop.org>   <http://printf.net/>
One Laptop Per Child



More information about the linux-arm-kernel mailing list