Skip to contentSkip to conversation

usb: musb: Fix suspend with devices connected for a64

PATCH RESEND In review Tony Lindgren 2 participants 2 messages Mar 24, 2021 – Mar 26, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 usb: musb: Fix suspend with devices connected for a64

Pinephone running on Allwinner A64 fails to suspend with USB devices connected as reported by Bhushan Shah <[email protected]>. Reverting commit 5fbf7a253470 ("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 5fbf7a253470 ("usb: musb: fix idling for suspend after disconnect interrupt")

---

Looks like this fix is still pending, can you guys please apply? This is also needed on am335x to suspend with devices connected in addition to a64

---
 drivers/usb/musb/musb_core.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/usb/musb/musb_core.c +8 -4
@@ -2004,10 +2004,14 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 		MUSB_DEVCTL_HR;
 	switch (devctl & ~s) {
 	case MUSB_QUIRK_B_DISCONNECT_99:
-		musb_dbg(musb, "Poll devctl in case of suspend after disconnect\n");
-		schedule_delayed_work(&musb->irq_work,
-				      msecs_to_jiffies(1000));
-		break;
+		if (musb->quirk_retries && !musb->flush_irq_work) {
+			musb_dbg(musb, "Poll devctl in case of suspend after disconnect\n");
+			schedule_delayed_work(&musb->irq_work,
+					      msecs_to_jiffies(1000));
+			musb->quirk_retries--;
+			break;
+		}
+		fallthrough;
 	case MUSB_QUIRK_B_INVALID_VBUS_91:
 		if (musb->quirk_retries && !musb->flush_irq_work) {
 			musb_dbg(musb,
Signature · 1 line
2.31.0
#1 lore raw
Quoted 13 lines · Tony Lindgren

Pinephone running on Allwinner A64 fails to suspend with USB devices connected as reported by Bhushan Shah <[email protected]>. Reverting commit 5fbf7a253470 ("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 5fbf7a253470 ("usb: musb: fix idling for suspend after disconnect interrupt")
Quoted 4 lines

---

Looks like this fix is still pending, can you guys please apply? This is also needed on am335x to suspend with devices connected in addition to a64

Now queued up, thanks.

greg k-h