Linux-OMAP Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH RESEND] usb: musb: Fix suspend with devices connected for a64
@ 2021-03-24  7:11 Tony Lindgren
  2021-03-26 13:51 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2021-03-24  7:11 UTC (permalink / raw)
  To: Bin Liu, Greg Kroah-Hartman; +Cc: linux-usb, linux-omap, Bhushan Shah

Pinephone running on Allwinner A64 fails to suspend with USB devices
connected as reported by Bhushan Shah <bshah@kde.org>. 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")
Reported-by: Bhushan Shah <bshah@kde.org>
Tested-by: Bhushan Shah <bshah@kde.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>

---

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(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -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,
-- 
2.31.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] usb: musb: Fix suspend with devices connected for a64
  2021-03-24  7:11 [PATCH RESEND] usb: musb: Fix suspend with devices connected for a64 Tony Lindgren
@ 2021-03-26 13:51 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2021-03-26 13:51 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Bin Liu, linux-usb, linux-omap, Bhushan Shah

On Wed, Mar 24, 2021 at 09:11:41AM +0200, Tony Lindgren wrote:
> Pinephone running on Allwinner A64 fails to suspend with USB devices
> connected as reported by Bhushan Shah <bshah@kde.org>. 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")
> Reported-by: Bhushan Shah <bshah@kde.org>
> Tested-by: Bhushan Shah <bshah@kde.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> ---
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  7:11 [PATCH RESEND] usb: musb: Fix suspend with devices connected for a64 Tony Lindgren
2021-03-26 13:51 ` Greg Kroah-Hartman

Linux-OMAP Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-omap/0 linux-omap/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-omap linux-omap/ https://lore.kernel.org/linux-omap \
		linux-omap@vger.kernel.org
	public-inbox-index linux-omap

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-omap


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git