diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch b/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch new file mode 100644 index 0000000000..2bbde84c16 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-omap-2.6.29/musb/0012-musb-fix-possible-panic-while-resuming.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From b9a61b80ea89d9d6d78a23d96a28df94fd612298 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kim Kyuwon <q1.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> | ||
3 | Date: Thu, 26 Mar 2009 18:56:51 -0700 | ||
4 | Subject: [PATCH] musb: fix possible panic while resuming | ||
5 | |||
6 | During driver resume processing, musb could cause a kernel panic. | ||
7 | Fix by enabling the clock earlier, with the resume_early method. | ||
8 | |||
9 | Signed-off-by: Kim Kyuwon <q1.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> | ||
10 | Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> | ||
11 | --- | ||
12 | drivers/usb/musb/musb_core.c | 8 ++------ | ||
13 | 1 files changed, 2 insertions(+), 6 deletions(-) | ||
14 | |||
15 | diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c | ||
16 | index 338cd16..3019725 100644 | ||
17 | --- a/drivers/usb/musb/musb_core.c | ||
18 | +++ b/drivers/usb/musb/musb_core.c | ||
19 | @@ -2170,16 +2170,13 @@ static int musb_suspend(struct platform_device *pdev, pm_message_t message) | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | -static int musb_resume(struct platform_device *pdev) | ||
24 | +static int musb_resume_early(struct platform_device *pdev) | ||
25 | { | ||
26 | - unsigned long flags; | ||
27 | struct musb *musb = dev_to_musb(&pdev->dev); | ||
28 | |||
29 | if (!musb->clock) | ||
30 | return 0; | ||
31 | |||
32 | - spin_lock_irqsave(&musb->lock, flags); | ||
33 | - | ||
34 | if (musb->set_clock) | ||
35 | musb->set_clock(musb->clock, 1); | ||
36 | else | ||
37 | @@ -2189,7 +2186,6 @@ static int musb_resume(struct platform_device *pdev) | ||
38 | * unless for some reason the whole soc powered down and we're | ||
39 | * not treating that as a whole-system restart (e.g. swsusp) | ||
40 | */ | ||
41 | - spin_unlock_irqrestore(&musb->lock, flags); | ||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | @@ -2207,7 +2203,7 @@ static struct platform_driver musb_driver = { | ||
46 | .remove = __devexit_p(musb_remove), | ||
47 | .shutdown = musb_shutdown, | ||
48 | .suspend = musb_suspend, | ||
49 | - .resume = musb_resume, | ||
50 | + .resume_early = musb_resume_early, | ||
51 | }; | ||
52 | |||
53 | /*-------------------------------------------------------------------------*/ | ||
54 | -- | ||
55 | 1.6.0.4 | ||
56 | |||