Re: [PATCH 2/3] xhci: Avoid USB autosuspend when resuming USB2 ports.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 19, 2018 at 10:54:45AM +0530, Anshuman Gupta wrote:
> 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@xxxxxxxxx>
> > > > 
> > > > 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@xxxxxxxxx>
> > > > Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
> > > 
> > > 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.

Great, then it shouldn't go into 4.19-final :)

Mathias, can you redo this patch series and resend?

thanks,

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux