* [PATCH] mmc: at91_mci: reorder timer setup and mmc_add_host() call
@ 2008-11-27 16:23 Nicolas Ferre
2008-11-28 7:28 ` Marc Pignat
2008-11-30 22:53 ` Pierre Ossman
0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Ferre @ 2008-11-27 16:23 UTC (permalink / raw)
To: Pierre Ossman
Cc: wux, Andrew Victor, ARM Linux Mailing List, Linux Kernel list
As said in function comment mmc_add_host() requires that:
"The host must be prepared to start servicing requests
before this function completes."
During this function, at91_mci_request() can be invoqued
without timer beeing setup leading to a kernel Oops.
This has been reported inserting this driver as a module.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reported-by: Wu Xuan <wux@landicorp.com>
---
drivers/mmc/host/at91_mci.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 1f8b5b3..e556d42 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -1088,6 +1088,8 @@ static int __init at91_mci_probe(struct platform_device *pdev)
goto fail0;
}
+ setup_timer(&host->timer, at91_timeout_timer, (unsigned long)host);
+
platform_set_drvdata(pdev, mmc);
/*
@@ -1101,8 +1103,6 @@ static int __init at91_mci_probe(struct platform_device *pdev)
mmc_add_host(mmc);
- setup_timer(&host->timer, at91_timeout_timer, (unsigned long)host);
-
/*
* monitor card insertion/removal if we can
*/
--
1.5.3.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: at91_mci: reorder timer setup and mmc_add_host() call
2008-11-27 16:23 [PATCH] mmc: at91_mci: reorder timer setup and mmc_add_host() call Nicolas Ferre
@ 2008-11-28 7:28 ` Marc Pignat
2008-11-30 22:53 ` Pierre Ossman
1 sibling, 0 replies; 3+ messages in thread
From: Marc Pignat @ 2008-11-28 7:28 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Nicolas Ferre, Pierre Ossman, wux, Andrew Victor,
Linux Kernel list
On Thursday 27 November 2008, Nicolas Ferre wrote:
> As said in function comment mmc_add_host() requires that:
> "The host must be prepared to start servicing requests
> before this function completes."
>
> During this function, at91_mci_request() can be invoqued
> without timer beeing setup leading to a kernel Oops.
> This has been reported inserting this driver as a module.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Reported-by: Wu Xuan <wux@landicorp.com>
Bug introduced by me ;)
Ack
Best regards
Marc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: at91_mci: reorder timer setup and mmc_add_host() call
2008-11-27 16:23 [PATCH] mmc: at91_mci: reorder timer setup and mmc_add_host() call Nicolas Ferre
2008-11-28 7:28 ` Marc Pignat
@ 2008-11-30 22:53 ` Pierre Ossman
1 sibling, 0 replies; 3+ messages in thread
From: Pierre Ossman @ 2008-11-30 22:53 UTC (permalink / raw)
To: Nicolas Ferre
Cc: wux, Andrew Victor, ARM Linux Mailing List, Linux Kernel list
[-- Attachment #1: Type: text/plain, Size: 775 bytes --]
On Thu, 27 Nov 2008 17:23:49 +0100
Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> As said in function comment mmc_add_host() requires that:
> "The host must be prepared to start servicing requests
> before this function completes."
>
> During this function, at91_mci_request() can be invoqued
> without timer beeing setup leading to a kernel Oops.
> This has been reported inserting this driver as a module.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Reported-by: Wu Xuan <wux@landicorp.com>
> ---
Queued up.
--
-- Pierre Ossman
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-30 22:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-27 16:23 [PATCH] mmc: at91_mci: reorder timer setup and mmc_add_host() call Nicolas Ferre
2008-11-28 7:28 ` Marc Pignat
2008-11-30 22:53 ` Pierre Ossman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox