linux/drivers/usb/chipidea
Peter Chen 65b2fb32b5 usb: chipidea: udc: Fix calling spin_lock_irqsave at sleep context
Fixing the below dump:

root@freescale ~$ modprobe g_serial
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
BUG: sleeping function called from invalid context at /home/b29397/work/projects/upstream/usb/usb/drivers/base/power/runtime.c:952
in_atomic(): 1, irqs_disabled(): 128, pid: 805, name: modprobe
2 locks held by modprobe/805:
 #0:  (udc_lock){+.+.+.}, at: [<7f000a74>] usb_gadget_probe_driver+0x44/0xb4 [udc_core]
 #1:  (&(&ci->lock)->rlock){......}, at: [<7f033488>] ci_udc_start+0x94/0x110 [ci_hdrc]
irq event stamp: 3878
hardirqs last  enabled at (3877): [<806b6720>] _raw_spin_unlock_irqrestore+0x40/0x6c
hardirqs last disabled at (3878): [<806b6474>] _raw_spin_lock_irqsave+0x2c/0xa8
softirqs last  enabled at (3872): [<8002ec0c>] __do_softirq+0x1c8/0x2e8
softirqs last disabled at (3857): [<8002f180>] irq_exit+0xbc/0x110
CPU: 0 PID: 805 Comm: modprobe Not tainted 3.11.0-next-20130910+ #85
[<80016b94>] (unwind_backtrace+0x0/0xf8) from [<80012e0c>] (show_stack+0x20/0x24)
[<80012e0c>] (show_stack+0x20/0x24) from [<806af554>] (dump_stack+0x9c/0xc4)
[<806af554>] (dump_stack+0x9c/0xc4) from [<8005940c>] (__might_sleep+0xf4/0x134)
[<8005940c>] (__might_sleep+0xf4/0x134) from [<803a04a4>] (__pm_runtime_resume+0x94/0xa0)
[<803a04a4>] (__pm_runtime_resume+0x94/0xa0) from [<7f0334a4>] (ci_udc_start+0xb0/0x110 [ci_hdrc])
[<7f0334a4>] (ci_udc_start+0xb0/0x110 [ci_hdrc]) from [<7f0009b4>] (udc_bind_to_driver+0x5c/0xd8 [udc_core])
[<7f0009b4>] (udc_bind_to_driver+0x5c/0xd8 [udc_core]) from [<7f000ab0>] (usb_gadget_probe_driver+0x80/0xb4 [udc_core])
[<7f000ab0>] (usb_gadget_probe_driver+0x80/0xb4 [udc_core]) from [<7f008618>] (usb_composite_probe+0xac/0xd8 [libcomposite])
[<7f008618>] (usb_composite_probe+0xac/0xd8 [libcomposite]) from [<7f04b168>] (init+0x8c/0xb4 [g_serial])
[<7f04b168>] (init+0x8c/0xb4 [g_serial]) from [<800088e8>] (do_one_initcall+0x108/0x16c)
[<800088e8>] (do_one_initcall+0x108/0x16c) from [<8008e518>] (load_module+0x1b00/0x20a4)
[<8008e518>] (load_module+0x1b00/0x20a4) from [<8008eba8>] (SyS_init_module+0xec/0x100)
[<8008eba8>] (SyS_init_module+0xec/0x100) from [<8000ec40>] (ret_fast_syscall+0x0/0x48)

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 16:25:15 -07:00
..
bits.h usb: chipidea: add ci_hdrc_enter_lpm API 2013-09-30 18:54:07 -07:00
ci_hdrc_imx.c usb: chipidea: imx: remove PHY operations 2013-09-30 18:54:06 -07:00
ci_hdrc_imx.h USB: chipidea: i.MX: simplify usbmisc 2013-08-14 12:37:20 -07:00
ci_hdrc_msm.c usb: chipidea: retire flag CI_HDRC_PULLUP_ON_VBUS 2013-08-14 12:37:20 -07:00
ci_hdrc_pci.c usb: chipidea: add Intel Clovertrail pci id 2013-10-03 15:41:54 -07:00
ci.h usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts 2013-08-14 12:37:20 -07:00
core.c usb: chipidea: add ci_hdrc_enter_lpm API 2013-09-30 18:54:07 -07:00
debug.c usb: chipidea: drop "13xxx" infix 2013-06-24 16:16:55 -07:00
debug.h usb: chipidea: drop "13xxx" infix 2013-06-24 16:16:55 -07:00
host.c usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
host.h usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
Kconfig usb: chipidea: USB_CHIPIDEA should depend on HAS_DMA 2013-09-25 17:30:39 -07:00
Makefile usb: chipidea: otg: add otg file used to access otgsc 2013-08-14 12:37:19 -07:00
otg.c usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts 2013-08-14 12:37:20 -07:00
otg.h usb: chipidea: add vbus interrupt handler 2013-08-14 12:37:20 -07:00
udc.c usb: chipidea: udc: Fix calling spin_lock_irqsave at sleep context 2013-10-11 16:25:15 -07:00
udc.h usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
usbmisc_imx.c USB: chipidea: i.MX: simplify usbmisc 2013-08-14 12:37:20 -07:00