From: Anshuman Gupta <anshuman.gupta@intel.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Anshuman Gupta <anshuman.gupta@intel.com>,
Greg KH <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org
Subject: [2/3] xhci: Avoid USB autosuspend when resuming USB2 ports.
Date: Wed, 19 Sep 2018 10:54:45 +0530 [thread overview]
Message-ID: <20180919052445.25524-1-anshuman.gupta@intel.com> (raw)
On Mon, Sep 17, 2018 at 11:24:20AM +0300, Mathias Nyman wrote:
> On 14.09.2018 16:00, Greg KH wrote:
> > On Fri, Sep 14, 2018 at 03:33:30PM +0300, Mathias Nyman wrote:
> > > From: Anshuman Gupta <anshuman.gupta@intel.com>
> > >
> > > When USB bus host controller root hub resumes from autosuspend,
> > > it immediately tries to enter auto-suspend, but there can be a
> > > scenario when root hub is resuming its usb2 ports, in that particular
> > > case USB host controller auto suspend fails since it is busy
> > > to resuming its usb2 ports.
> > >
> > > This makes multiple failed cycles of auto-suspend until all usb2
> > > ports of host controller root hub do not resume.
> > >
> > > This patch uses USB core framework usb_hcd_start_port_resume,
> > > usb_hcd_end_port_resume API's in order to autoresume/autosuspend
> > > root hub properly.
> > >
> > > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> > > Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> >
> > Not needed in stable? Does this fix a specific commit?
> >
> > thanks,
> >
> > greg k-h
> >
>
> This improves a bad initial design that prevented autosuspend by
> returning -EBUSY in xhci_bus_suspend() if a usb2 port was resuming.
>
> Instead increment usage count on the roothub to prevent pm from polling
> xhci_bus_suspend(). This is also what EHCI does.
>
> I'm not sure If this fixes a actual bug for Anshuman Gupta caused by
> the -EBUSY polling,(4.19 +stable), or if this is just a improvement in
> suspend/resume code for xhci (4.20).
>
> Anshuman Gupta, any comments?
This patch is not fixing any bug.
This patch provide improvement in runtime suspend/resume path of xhci.
>
> -Mathias
next reply other threads:[~2018-09-19 5:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 5:24 Anshuman Gupta [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-09-20 10:35 [2/3] xhci: Avoid USB autosuspend when resuming USB2 ports Greg Kroah-Hartman
2018-09-17 8:24 Mathias Nyman
2018-09-14 13:00 Greg Kroah-Hartman
2018-09-14 12:33 Mathias Nyman
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=20180919052445.25524-1-anshuman.gupta@intel.com \
--to=anshuman.gupta@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
/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).