linux/drivers/usb/host
Yin Kangkai 148fc55fd0 USB: EHCI: fix scheduling while atomic during suspend
There is a msleep with spin lock held during ehci pci suspend, which will
cause kernel BUG: scheduling while atomic. Fix that.

[  184.139620] BUG: scheduling while atomic: kworker/u:11/416/0x00000002
[  184.139632] 4 locks held by kworker/u:11/416:
[  184.139640]  #0:  (events_unbound){+.+.+.}, at: [<c104ddd4>] process_one_work+0x1b3/0x4cb
[  184.139669]  #1:  ((&entry->work)){+.+.+.}, at: [<c104ddd4>] process_one_work+0x1b3/0x4cb
[  184.139686]  #2:  (&__lockdep_no_validate__){+.+.+.}, at: [<c127cde3>] __device_suspend+0x2c/0x154
[  184.139706]  #3:  (&(&ehci->lock)->rlock){-.-...}, at: [<c132f3d8>] ehci_pci_suspend+0x35/0x7b
[  184.139725] Modules linked in: serio_raw pegasus joydev mrst_gfx(C) battery
[  184.139748] irq event stamp: 52
[  184.139753] hardirqs last  enabled at (51): [<c14fdaac>] mutex_lock_nested+0x258/0x293
[  184.139766] hardirqs last disabled at (52): [<c14fe7b4>] _raw_spin_lock_irqsave+0xf/0x3e
[  184.139777] softirqs last  enabled at (0): [<c10371c1>] copy_process+0x3d2/0x109d
[  184.139789] softirqs last disabled at (0): [<  (null)>]   (null)
[  184.139802] Pid: 416, comm: kworker/u:11 Tainted: G         C  2.6.37-6.3-adaptation-oaktrail #37
[  184.139809] Call Trace:
[  184.139820]  [<c102eeff>] __schedule_bug+0x5e/0x65
[  184.139829]  [<c14fbca5>] schedule+0xac/0xc4c
[  184.139840]  [<c11d4845>] ? string+0x37/0x8b
[  184.139853]  [<c1044f21>] ? lock_timer_base+0x1f/0x3e
[  184.139863]  [<c14fe7da>] ? _raw_spin_lock_irqsave+0x35/0x3e
[  184.139876]  [<c1061590>] ? trace_hardirqs_off+0xb/0xd
[  184.139885]  [<c14fccdc>] schedule_timeout+0x283/0x2d9
[  184.139896]  [<c104516f>] ? process_timeout+0x0/0xa
[  184.139906]  [<c14fcd47>] schedule_timeout_uninterruptible+0x15/0x17
[  184.139916]  [<c104566a>] msleep+0x10/0x16
[  184.139926]  [<c132f316>] ehci_adjust_port_wakeup_flags+0x69/0xf6
[  184.139937]  [<c132f3eb>] ehci_pci_suspend+0x48/0x7b
[  184.139946]  [<c1326587>] suspend_common+0x52/0xbb
[  184.139956]  [<c1326625>] hcd_pci_suspend+0x26/0x28
[  184.139967]  [<c11e7182>] pci_pm_suspend+0x5f/0xd0
[  184.139976]  [<c127ca3a>] pm_op+0x5d/0xf0
[  184.139986]  [<c127ceac>] __device_suspend+0xf5/0x154
[  184.139996]  [<c127d2c8>] async_suspend+0x16/0x3a
[  184.140006]  [<c1058f54>] async_run_entry_fn+0x89/0x111
[  184.140016]  [<c104deb6>] process_one_work+0x295/0x4cb
[  184.140026]  [<c1058ecb>] ? async_run_entry_fn+0x0/0x111
[  184.140036]  [<c104e3d0>] worker_thread+0x17f/0x298
[  184.140045]  [<c104e251>] ? worker_thread+0x0/0x298
[  184.140055]  [<c105277f>] kthread+0x64/0x69
[  184.140064]  [<c105271b>] ? kthread+0x0/0x69
[  184.140075]  [<c1002efa>] kernel_thread_helper+0x6/0x1a

Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <dbrownell@users.sourceforge.net>
CC: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-03 16:57:43 -08:00
..
whci USB: whci-hcd: fix compiler warning 2010-12-10 14:18:35 -08:00
Kconfig Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2011-01-07 13:16:28 -08:00
Makefile USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
ehci-atmel.c usb: Add in missing EHCI helpers. 2010-11-30 16:51:21 -08:00
ehci-au1xxx.c USB: EHCI: fix scheduling while atomic during suspend 2011-02-03 16:57:43 -08:00
ehci-cns3xxx.c USB: cns3xxx: Add EHCI and OHCI bus glue for cns3xxx SOCs 2010-11-29 18:32:47 +03:00
ehci-dbg.c Merge branch 'usb-next' into musb-merge 2010-12-16 10:05:06 -08:00
ehci-fsl.c USB: ehci-fsl: Fix 'have_sysif_regs' detection 2011-01-22 18:38:58 -08:00
ehci-fsl.h USB: ehci-fsl: Fix 'have_sysif_regs' detection 2011-01-22 18:38:58 -08:00
ehci-hcd.c USB: EHCI: fix DMA deallocation bug 2011-01-22 18:36:43 -08:00
ehci-hub.c USB: EHCI: fix scheduling while atomic during suspend 2011-02-03 16:57:43 -08:00
ehci-ixp4xx.c
ehci-lpm.c USB: EHCI: EHCI 1.1 addendum: Basic LPM feature support 2010-08-10 14:35:35 -07:00
ehci-mem.c USB: EHCI: AMD periodic frame list table quirk 2010-11-16 13:36:40 -08:00
ehci-msm.c USB: EHCI: msm: Add support for power management 2010-12-10 14:23:32 -08:00
ehci-mxc.c USB: ehci-mxc: add work-around for efika mx/sb bug 2011-01-22 18:48:10 -08:00
ehci-octeon.c USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
ehci-omap.c usb: ehci-omap: Show fatal probing time errors to end user 2011-02-01 11:06:09 +02:00
ehci-orion.c
ehci-pci.c USB: EHCI: fix scheduling while atomic during suspend 2011-02-03 16:57:43 -08:00
ehci-ppc-of.c USB: ehci-ppc-of: problems in unwind 2010-09-03 17:33:40 -07:00
ehci-ps3.c
ehci-q.c USB: convert usb_hcd bitfields into atomic flags 2010-08-10 14:35:37 -07:00
ehci-sched.c Merge branch 'usb-next' into musb-merge 2010-12-16 10:05:06 -08:00
ehci-sh.c usb: ehci-sh: Add missing ehci helpers. 2010-11-26 16:48:31 +09:00
ehci-spear.c USB host: Adding USB ehci & ohci support for spear platform 2010-11-16 13:53:29 -08:00
ehci-vt8500.c usb: Add support for VIA VT8500 and compatibles in EHCI HCD 2010-11-11 06:24:54 -08:00
ehci-w90x900.c usb: Add in missing EHCI helpers. 2010-11-30 16:51:21 -08:00
ehci-xilinx-of.c usb: Add in missing EHCI helpers. 2010-11-30 16:51:21 -08:00
ehci.h Merge branch 'usb-next' into musb-merge 2010-12-16 10:05:06 -08:00
fhci-dbg.c
fhci-hcd.c drivers: fix comment typo diable -> disable. 2011-01-03 16:08:59 +01:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c fix comment/printk typos concerning "already" 2010-07-11 21:45:40 +02:00
fhci-tds.c drivers: fix comment typo diable -> disable. 2011-01-03 16:08:59 +01:00
fhci.h
fsl-mph-dr-of.c USB: ehci-fsl: Fix 'have_sysif_regs' detection 2011-01-22 18:38:58 -08:00
hwa-hc.c USB: convert usb_hcd bitfields into atomic flags 2010-08-10 14:35:37 -07:00
imx21-dbg.c
imx21-hcd.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
imx21-hcd.h USB: imx21-hcd accept arbitary transfer buffer alignement. 2010-10-22 10:22:03 -07:00
isp116x-hcd.c USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro 2010-10-22 10:22:14 -07:00
isp116x.h
isp1362-hcd.c Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2010-11-24 08:21:43 +09:00
isp1362.h USB: host: Remove dead CONFIG_ARCH_KARO 2010-08-10 14:35:40 -07:00
isp1760-hcd.c USB: isp1760: use a write barrier to ensure proper ndelay timing 2010-08-23 20:50:15 -07:00
isp1760-hcd.h
isp1760-if.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
octeon2-common.c USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
ohci-at91.c
ohci-au1xxx.c
ohci-cns3xxx.c USB: cns3xxx: Add EHCI and OHCI bus glue for cns3xxx SOCs 2010-11-29 18:32:47 +03:00
ohci-da8xx.c
ohci-dbg.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ohci-ep93xx.c
ohci-hcd.c Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2011-01-07 16:58:04 -08:00
ohci-hub.c USB: controller resume should check the root hub 2010-08-10 14:35:37 -07:00
ohci-jz4740.c USB: ohci-jz4740: Fix spelling in MODULE_ALIAS 2010-11-11 07:14:07 -08:00
ohci-lh7a404.c
ohci-mem.c
ohci-octeon.c USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
ohci-omap.c
ohci-omap3.c usb: ohci-omap3: fix trivial typo 2010-12-16 13:36:12 -08:00
ohci-pci.c OHCI: work around for nVidia shutdown problem 2010-10-22 10:21:36 -07:00
ohci-pnx4008.c i2c: Add support for custom probe function 2010-08-11 18:20:56 +02:00
ohci-pnx8550.c
ohci-ppc-of.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
ohci-ppc-soc.c
ohci-ps3.c
ohci-pxa27x.c ARM: ohci-pxa27x: enable OHCI over U2DC for pxa3xx 2010-10-08 16:21:17 +08:00
ohci-q.c
ohci-s3c2410.c
ohci-sa1111.c
ohci-sh.c usb: ohci-sh: Set IRQ as shared. 2010-11-01 17:01:27 -04:00
ohci-sm501.c USB: ohci-sm501: add iounmap on error path 2010-10-22 10:21:35 -07:00
ohci-spear.c USB host: Adding USB ehci & ohci support for spear platform 2010-11-16 13:53:29 -08:00
ohci-ssb.c USB: Add USB 2.0 to ssb ohci driver 2010-08-10 14:35:44 -07:00
ohci-tmio.c
ohci.h OHCI: work around for nVidia shutdown problem 2010-10-22 10:21:36 -07:00
oxu210hp-hcd.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
oxu210hp.h
pci-quirks.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
pci-quirks.h
r8a66597-hcd.c usb: Fix up r8a66597-hcd section mismatches. 2010-09-16 17:16:31 +09:00
r8a66597.h usb: r8a66597-hcd: Change mistake of the outsw function 2010-10-22 10:22:11 -07:00
sl811-hcd.c USB SL811HS HCD: Fix memory leak in sl811h_urb_enqueue() 2011-02-03 16:42:17 -08:00
sl811.h
sl811_cs.c pcmcia: move driver name to struct pcmcia_driver 2010-09-29 17:20:24 +02:00
u132-hcd.c drivers/usb: Remove unnecessary return's from void functions 2010-08-10 14:25:42 +02:00
uhci-debug.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
uhci-hcd.c drivers/usb/host/uhci-hcd.c: Remove unnecessary casts of pci_get_drvdata 2010-11-16 13:54:18 -08:00
uhci-hcd.h USB: UHCI: add support for Intel's wakeup flags 2010-08-10 14:35:38 -07:00
uhci-hub.c USB: controller resume should check the root hub 2010-08-10 14:35:37 -07:00
uhci-q.c USB: host: uhci-q: Fixed minor coding style issues 2010-12-10 14:18:36 -08:00
xhci-dbg.c
xhci-ext-caps.h
xhci-hub.c xhci: Don't let the USB core disable SuperSpeed ports. 2010-11-19 16:23:31 -08:00
xhci-mem.c xhci: Fix issue with port array setup and buggy hosts. 2010-12-09 11:59:42 -08:00
xhci-pci.c USB: xHCI: PCI power management implementation 2010-10-22 10:22:13 -07:00
xhci-ring.c xhci: Remove more doorbell-related reads 2011-01-14 15:52:00 -08:00
xhci.c xhci: Use GFP_NOIO during device reset. 2011-01-14 15:51:51 -08:00
xhci.h xhci: Remove more doorbell-related reads 2011-01-14 15:52:00 -08:00