mmc: atmel-mci: fix data timeout issue
PATCH 1/1 mmc: atmel-mci: fix data timeout issue
From: Ludovic Desroches <[email protected]>
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 <[email protected]>
--- drivers/mmc/host/atmel-mci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/atmel-mci.c +2 -2
@@ -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);
Signature · 1 line
1.7.5.4
Chris Ball
AppliedPATCH 1/1 mmc: atmel-mci: fix data timeout issue
Hi,
Quoted 25 lines · ludovic.desroches at atmel.com
From: Ludovic Desroches <[email protected]>
The data timeout timer was configured after
mmc_add_hostcall. So, with bad timings, it was possible to have a mmc request causingmod_timercall on a non setup timer.Signed-off-by Ludovic Desroches <[email protected]>--- drivers/mmc/host/atmel-mci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/mmc/host/atmel-mci.c +2
-0@@ -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 ;
drivers/mmc/host/atmel-mci.c static int __init atmci_probe(struct platform_device *pdev) · line 2441
Quoted 8 lines
drivers/mmc/host/atmel-mci.c +0
-2@@ -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.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child