Message ID | 20160915162914.8164-2-tony@atomide.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -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);
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: 467d5c980709 ("usb: musb: Implement session bit based runtime PM for musb-core") Signed-off-by: Tony Lindgren <tony@atomide.com> --- drivers/usb/musb/musb_gadget.c | 3 +++ 1 file changed, 3 insertions(+)