提交 4e719183 编写于 作者: T Tony Lindgren 提交者: Greg Kroah-Hartman

usb: musb: Fix PM runtime for disconnect after unconfigure

If we unconfigure musb as a USB peripheral with cable connected,
and then remove the cable, no interrupts will happen. And musb
thinks we're still connected keeping the device active.

Now with the session bit based PM runtime working for musb, we
can fix this issue by calling musb irq_work. That rechecks the
devctl register and reconfigures PM runtime based on the devctl.

Fixes: 467d5c98 ("usb: musb: Implement session bit based runtime PM for musb-core")
Signed-off-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NBin Liu <b-liu@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b36df090
......@@ -1964,6 +1964,9 @@ static int musb_gadget_stop(struct usb_gadget *g)
* that currently misbehaves.
*/
/* Force check of devctl register for PM runtime */
schedule_work(&musb->irq_work);
pm_runtime_mark_last_busy(musb->controller);
pm_runtime_put_autosuspend(musb->controller);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册