Commit 7d076c2f authored by Tony Lindgren's avatar Tony Lindgren Committed by Greg Kroah-Hartman

usb: musb: Check devctl status again for a spurious session request

On start-up, we can get a spurious session request interrupt with nothing
connected. After that the devctl session bit will silently clear, but the
musb hardware is never idled until a cable is plugged in, or the glue
layer module is reloaded.

Let's just check the session bit again in 3 seconds in peripheral mode
to catch the issue.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20210518150615.53464-1-tony@atomide.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 62d472d8
......@@ -2055,6 +2055,15 @@ static void musb_pm_runtime_check_session(struct musb *musb)
dev_err(musb->controller, "Could not enable: %i\n",
error);
musb->quirk_retries = 3;
/*
* We can get a spurious MUSB_INTR_SESSREQ interrupt on start-up
* in B-peripheral mode with nothing connected and the session
* bit clears silently. Check status again in 3 seconds.
*/
if (devctl & MUSB_DEVCTL_BDEVICE)
schedule_delayed_work(&musb->irq_work,
msecs_to_jiffies(3000));
} else {
musb_dbg(musb, "Allow PM with no session: %02x", devctl);
pm_runtime_mark_last_busy(musb->controller);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment