提交 79e13b99 编写于 作者: T Tony Lindgren 提交者: Zheng Zengkai

usb: musb: Fix suspend with devices connected for a64

commit 92af4fc6 upstream.

Pinephone running on Allwinner A64 fails to suspend with USB devices
connected as reported by Bhushan Shah <bshah@kde.org>. Reverting
commit 5fbf7a25 ("usb: musb: fix idling for suspend after
disconnect interrupt") fixes the issue.

Let's add suspend checks also for suspend after disconnect interrupt
quirk handling like we already do elsewhere.

Fixes: 5fbf7a25 ("usb: musb: fix idling for suspend after disconnect interrupt")
Reported-by: NBhushan Shah <bshah@kde.org>
Tested-by: NBhushan Shah <bshah@kde.org>
Signed-off-by: NTony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20210324071142.42264-1-tony@atomide.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 0d8b8e93
...@@ -1868,10 +1868,14 @@ static void musb_pm_runtime_check_session(struct musb *musb) ...@@ -1868,10 +1868,14 @@ static void musb_pm_runtime_check_session(struct musb *musb)
MUSB_DEVCTL_HR; MUSB_DEVCTL_HR;
switch (devctl & ~s) { switch (devctl & ~s) {
case MUSB_QUIRK_B_DISCONNECT_99: case MUSB_QUIRK_B_DISCONNECT_99:
musb_dbg(musb, "Poll devctl in case of suspend after disconnect\n"); if (musb->quirk_retries && !musb->flush_irq_work) {
schedule_delayed_work(&musb->irq_work, musb_dbg(musb, "Poll devctl in case of suspend after disconnect\n");
msecs_to_jiffies(1000)); schedule_delayed_work(&musb->irq_work,
break; msecs_to_jiffies(1000));
musb->quirk_retries--;
break;
}
/* fall through */
case MUSB_QUIRK_B_INVALID_VBUS_91: case MUSB_QUIRK_B_INVALID_VBUS_91:
if (musb->quirk_retries && !musb->flush_irq_work) { if (musb->quirk_retries && !musb->flush_irq_work) {
musb_dbg(musb, musb_dbg(musb,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册