[PATCH] mmc: atmel-mci: fix data timeout issue
From: Chris Ball <hidden>
Date: 2012-06-06 10:02:36
Also in:
linux-mmc
Hi, On Wed, May 23 2012, ludovic.desroches at atmel.com wrote:
quoted hunk
From: Ludovic Desroches <redacted> 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 <redacted> --- 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 [off-list ref] <http://printf.net/> One Laptop Per Child