linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Bhushan Shah <bshah@kde.org>
Cc: Bin Liu <b-liu@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	Merlijn Wajer <merlijn@wizzup.org>, Pavel Machek <pavel@ucw.cz>,
	Sebastian Reichel <sre@kernel.org>,
	clayton@craftyguy.net
Subject: Re: [PATCH] usb: musb: fix idling for suspend after disconnect interrupt
Date: Wed, 28 Oct 2020 10:42:22 +0200	[thread overview]
Message-ID: <20201028084222.GF5639@atomide.com> (raw)
In-Reply-To: <20201027075915.GA1064075@aquila.localdomain>

* Bhushan Shah <bshah@kde.org> [201027 07:59]:
> Hello!
> 
> On Tue, Oct 27, 2020 at 08:17:41AM +0200, Tony Lindgren wrote:
> > Hmm maybe we're just missing the check for suspend here. Maybe
> > give the following untested patch a try?
> > 
> > I'll give it a try here too but it might be few days.
> 
> Thanks for quick patch! I tested this on my device and I can confirm
> that it fixes issue for me.
> 
> So from my side,
> 
> Tested-by: Bhushan Shah <bshah@kde.org>

OK good to hear :) Will post a proper patch after testing here too.

Regards,

Tony

> > Seems like we might be able to eventually simplify the suspend and
> > quirk check stuff, but let's fix the $subject issue first.
> > 
> > Regards,
> > 
> > Tony
> > 
> > 8< ----------------------
> > 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
> > @@ -2005,10 +2005,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;
> > +		}
> > +		/* fall through */
> >  	case MUSB_QUIRK_B_INVALID_VBUS_91:
> >  		if (musb->quirk_retries && !musb->flush_irq_work) {
> >  			musb_dbg(musb,
> 
> -- 
> Bhushan Shah
> http://blog.bshah.in
> IRC Nick : bshah on Freenode
> GPG key fingerprint : 0AAC 775B B643 7A8D 9AF7 A3AC FE07 8411 7FBC E11D



      reply	other threads:[~2020-10-29  2:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191126034151.38154-1-tony@atomide.com>
2020-10-27  4:55 ` [PATCH] usb: musb: fix idling for suspend after disconnect interrupt Bhushan Shah
2020-10-27  6:17   ` Tony Lindgren
2020-10-27  7:59     ` Bhushan Shah
2020-10-28  8:42       ` Tony Lindgren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201028084222.GF5639@atomide.com \
    --to=tony@atomide.com \
    --cc=b-liu@ti.com \
    --cc=bshah@kde.org \
    --cc=clayton@craftyguy.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=merlijn@wizzup.org \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).