xhci: Avoid USB autosuspend when resuming USB2 ports.
Greg Kroah-Hartman
maintainerPATCH 2/3 xhci: Avoid USB autosuspend when resuming USB2 ports.
Quoted 34 lines · Anshuman Gupta
Quoted 33 lines · Mathias Nyman
Quoted 16 lines · Greg KH
Quoted 15 lines · Mathias Nyman
From: Anshuman Gupta <[email protected]>
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_resumeAPI's in order to autoresume/autosuspend root hub properly.Quoted 9 lines
Quoted 2 lines
Signed-off-by Anshuman Gupta <[email protected]>Signed-off-by Mathias Nyman <[email protected]>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
-EBUSYinxhci_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.
Quoted 7 lines
Quoted 5 lines
I'm not sure If this fixes a actual bug for Anshuman Gupta caused by the
-EBUSYpolling,(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