Skip to contentSkip to conversation

FAILED: patch "[PATCH] usb: musb: Fix suspend with devices connected for a64" failed to apply to 4.9-stable tree

PATCH [email protected] 1 participant 1 message Apr 5, 2021

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 92af4fc6ec331228aca322ca37c8aea7b150a151 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
Date: Wed, 24 Mar 2021 09:11:41 +0200
Subject: [PATCH] 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")
Cc stable <[email protected]>
drivers/usb/musb/musb_core.c +8 -4
index 1cd87729ba60..fc0457db62e1 100644
@@ -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,