dwc3: gadget: Update dwc->irq after resuming controller
dwc3_gadget_start() API is being called when android gadget driver
is binding with UDC driver. With device bootup without USB cable
connect case when dwc3_gadget_start() is called, it resumes controller
and puts it back into LPM. dwc3_msm_resume() API also enables same IRQ
as dwc3_msm_suspend() disables it. Here dwc3_gadget_start() is already
requesting same core IRQ before resuming controller which results into
unbalanced IRQ enable warning as below:
Unbalanced enable for IRQ 660
Call trace:
[<ffffffc000088544>] dump_backtrace+0x0/0x270
[<ffffffc0000887c4>] show_stack+0x10/0x1c
[<ffffffc000be30d8>] dump_stack+0x74/0xb8
[<ffffffc0000a0b30>] warn_slowpath_common+0x88/0xb0
[<ffffffc0000a0ba4>] warn_slowpath_fmt+0x4c/0x58
[<ffffffc0000ed03c>] __enable_irq+0x3c/0x88
[<ffffffc0000ed0ec>] enable_irq+0x64/0x78
[<ffffffc0006108d8>] dwc3_msm_resume+0x3f0/0x42c
[<ffffffc000610948>] dwc3_msm_runtime_resume+0x34/0x44
[<ffffffc000507698>] pm_generic_runtime_resume+0x28/0x3c
[<ffffffc000508f5c>] __rpm_callback+0x3c/0x74
[<ffffffc000508ff4>] rpm_callback+0x60/0x84
[<ffffffc000509f70>] rpm_resume+0x368/0x47c
[<ffffffc000509f24>] rpm_resume+0x31c/0x47c
[<ffffffc00050a0f0>] __pm_runtime_resume+0x6c/0x94
[<ffffffc000605b9c>] dwc3_gadget_start+0x90/0x190
[<ffffffc000642178>] udc_bind_to_driver+0x7c/0xf0
[<ffffffc000642354>] usb_gadget_probe_driver+0xc4/0xe8
[<ffffffc00063d10c>] usb_composite_probe+0xf4/0x108
[<ffffffc0006731f8>] android_probe+0x4f8/0x640
[<ffffffc000503e20>] platform_drv_probe+0x34/0x84
[<ffffffc000502244>] driver_probe_device+0x160/0x360
[<ffffffc0005024f0>] __driver_attach+0x60/0x90
[<ffffffc000501130>] bus_for_each_dev+0x74/0x94
[<ffffffc000501bd4>] driver_attach+0x1c/0x28
[<ffffffc000501844>] bus_add_driver+0x128/0x204
[<ffffffc000502dc8>] driver_register+0x94/0xe4
[<ffffffc000503d68>] __platform_driver_register+0x5c/0x68
[<ffffffc001298664>] init+0x38/0xb8
[<ffffffc000081a1c>] do_one_initcall+0x1a4/0x1c4
[<ffffffc00125cb08>] kernel_init_freeable+0x148/0x1e8
[<ffffffc000bdd430>] kernel_init+0x10/0xd4
Fix this issue by updating dwc->irq after resuming USB controller.
Change-Id: Ib0bff744c23104377c637be60cc4e717495d5a11
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment