android_kernel_xiaomi_sdm845/drivers/usb/core
Alan Stern 6d19c009cc USB: implement non-tree resume ordering constraints for PCI host controllers
This patch (as1331) adds non-tree ordering constraints needed for
proper resume of PCI USB host controllers from hibernation.  The main
issue is that non-high-speed devices must not be resumed before the
high-speed root hub, because it is the ehci_bus_resume() routine which
takes care of handing the device connection over to the companion
controller.  If the device resume is attempted before the handover
then the device won't be found and it will be treated as though it had
disconnected.

The patch adds a new field to the usb_bus structure; for each
full/low-speed bus this field will contain a pointer to the companion
high-speed bus (if one exists).  It is used during normal device
resume; if the hs_companion pointer isn't NULL then we wait for the
root-hub device on the hs_companion bus.

A secondary issue is that an EHCI controlller shouldn't be resumed
before any of its companions.  On some machines I have observed
handovers failing if the companion controller is reinitialized after
the handover.  Thus, the EHCI resume routine must wait for the
companion controllers to be resumed.

The patch also fixes a small bug in usb_hcd_pci_probe(); an error path
jumps to the wrong label, causing a memory leak.

[rjw: Fixed compilation for CONFIG_PM_SLEEP unset.]

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2010-02-26 20:39:12 +01:00
..
buffer.c USB: pass mem_flags to dma_alloc_coherent 2009-04-23 14:15:28 -07:00
config.c USB: Fix SS endpoint companion descriptor parsing. 2009-09-23 06:46:18 -07:00
devices.c USB: Don't use GFP_KERNEL while we cannot reset a storage device 2010-01-20 15:24:34 -08:00
devio.c USB: usbfs: properly clean up the as structure on error paths 2010-02-16 15:11:02 -08:00
driver.c USB: implement non-tree resume ordering constraints for PCI host controllers 2010-02-26 20:39:12 +01:00
endpoint.c driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
file.c USB: fix possible null deref in init_usb_class() 2009-12-11 11:55:22 -08:00
generic.c USB: Convert a dev_info to a dev_dbg 2009-12-11 11:55:13 -08:00
hcd-pci.c USB: implement non-tree resume ordering constraints for PCI host controllers 2010-02-26 20:39:12 +01:00
hcd.c USB: Fix duplicate sysfs problem after device reset. 2010-01-20 15:24:35 -08:00
hcd.h const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
hub.c USB: Fix duplicate sysfs problem after device reset. 2010-01-20 15:24:35 -08:00
hub.h USB: fix the clear_tt_buffer interface 2009-07-12 15:16:38 -07:00
inode.c const: mark remaining super_operations const 2009-09-22 07:17:24 -07:00
Kconfig Revert USB: usbfs: deprecate and hide option for !embedded 2009-07-12 15:16:39 -07:00
Makefile USB: add the usbfs devices file to debugfs 2009-06-15 21:44:43 -07:00
message.c USB: Don't use GFP_KERNEL while we cannot reset a storage device 2010-01-20 15:24:34 -08:00
notify.c USB : correct comments in usb/core/notify.c 2008-02-01 14:34:44 -08:00
otg_whitelist.h USB: fix codingstyle issues in drivers/usb/core/*.h 2008-02-01 14:35:07 -08:00
quirks.c USB: add quirk to avoid config and interface strings 2009-03-24 16:20:25 -07:00
sysfs.c USB: add speed values for USB 3.0 and wireless controllers 2010-01-20 15:24:35 -08:00
urb.c USB: allow interrupt transfers to WUSB devices 2009-12-11 11:55:14 -08:00
usb.c USB core: fix recent kernel-doc warnings 2009-12-23 11:34:12 -08:00
usb.h USB: add a "remove hardware" sysfs attribute 2009-12-11 11:55:18 -08:00