| From df09e320ce8def6b95f5ae3fb7d3b547e0d275a8 Mon Sep 17 00:00:00 2001 |
| From: Ludovic Desroches <ludovic.desroches@atmel.com> |
| Date: Wed, 23 May 2012 15:46:00 +0200 |
| Subject: mmc: atmel-mci: fix data timeout issue |
| |
| commit b87cc1b5d3a96ef9f1b3a4f8ce7aaff18e96c994 upstream. |
| |
| 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@atmel.com> |
| --- |
| drivers/mmc/host/atmel-mci.c | 4 ++-- |
| 1 file changed, 2 insertions(+), 2 deletions(-) |
| |
| --- a/drivers/mmc/host/atmel-mci.c |
| +++ b/drivers/mmc/host/atmel-mci.c |
| @@ -2331,6 +2331,8 @@ static int __init atmci_probe(struct pla |
| |
| 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; |
| @@ -2369,8 +2371,6 @@ static int __init atmci_probe(struct pla |
| } |
| } |
| |
| - 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); |