aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-02-12 06:21:11 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2010-02-26 14:39:12 -0500
commit6d19c009cc780c63de25a046509ebc9473809fd6 (patch)
treed3a6186a5b3b2cd75a5778ba355ea9c3c7823a6c /include/linux/usb.h
parenta1e4d72cd3024999bfb6703092ea271438805c89 (diff)
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>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index d7ace1b80f09..332eaea61021 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -339,6 +339,7 @@ struct usb_bus {
339 339
340 struct usb_devmap devmap; /* device address allocation map */ 340 struct usb_devmap devmap; /* device address allocation map */
341 struct usb_device *root_hub; /* Root hub */ 341 struct usb_device *root_hub; /* Root hub */
342 struct usb_bus *hs_companion; /* Companion EHCI bus, if any */
342 struct list_head bus_list; /* list of busses */ 343 struct list_head bus_list; /* list of busses */
343 344
344 int bandwidth_allocated; /* on this bus: how much of the time 345 int bandwidth_allocated; /* on this bus: how much of the time