diff options
author | Tony Lindgren <tony@atomide.com> | 2021-05-18 18:06:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-21 14:07:57 +0200 |
commit | 7d076c2f5590e7a2eaba73ded1dbf553fa15a6af (patch) | |
tree | 9f0518163047ec4e15dd1cc199353ef6855a3254 /drivers/usb/musb | |
parent | 62d472d8ad886d3e3fe2da20ba0965f8628513db (diff) | |
download | linux-7d076c2f5590e7a2eaba73ded1dbf553fa15a6af.tar.gz linux-7d076c2f5590e7a2eaba73ded1dbf553fa15a6af.tar.bz2 linux-7d076c2f5590e7a2eaba73ded1dbf553fa15a6af.zip |
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: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20210518150615.53464-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 8f09a387b773..71ae84031c1f 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -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); |