diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2005-11-14 11:45:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-04 16:48:31 -0500 |
commit | 1c50c317e2e7f15427149cbc216a63366468710e (patch) | |
tree | d48dc0b03090e89c644f73f9997b4f70b6ec9b41 /drivers/usb/host/ohci-hcd.c | |
parent | 8364d6b0be2dbbf162c6aea79615b5025a0d67c2 (diff) |
[PATCH] USB: central handling for host controllers that were reset during suspend/resume
This patch (as515b) adds a routine to usbcore to simplify handling of
host controllers that lost power or were reset during suspend/resume.
The new core routine marks all the child devices of the root hub as
NOTATTACHED and tells khubd to disconnect the device structures as soon
as possible.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index e3af3ac4416a..a4b12404ae08 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -795,7 +795,6 @@ static int ohci_restart (struct ohci_hcd *ohci) | |||
795 | int temp; | 795 | int temp; |
796 | int i; | 796 | int i; |
797 | struct urb_priv *priv; | 797 | struct urb_priv *priv; |
798 | struct usb_device *root = ohci_to_hcd(ohci)->self.root_hub; | ||
799 | 798 | ||
800 | /* mark any devices gone, so they do nothing till khubd disconnects. | 799 | /* mark any devices gone, so they do nothing till khubd disconnects. |
801 | * recycle any "live" eds/tds (and urbs) right away. | 800 | * recycle any "live" eds/tds (and urbs) right away. |
@@ -804,11 +803,7 @@ static int ohci_restart (struct ohci_hcd *ohci) | |||
804 | */ | 803 | */ |
805 | spin_lock_irq(&ohci->lock); | 804 | spin_lock_irq(&ohci->lock); |
806 | disable (ohci); | 805 | disable (ohci); |
807 | for (i = 0; i < root->maxchild; i++) { | 806 | usb_root_hub_lost_power(ohci_to_hcd(ohci)->self.root_hub); |
808 | if (root->children [i]) | ||
809 | usb_set_device_state (root->children[i], | ||
810 | USB_STATE_NOTATTACHED); | ||
811 | } | ||
812 | if (!list_empty (&ohci->pending)) | 807 | if (!list_empty (&ohci->pending)) |
813 | ohci_dbg(ohci, "abort schedule...\n"); | 808 | ohci_dbg(ohci, "abort schedule...\n"); |
814 | list_for_each_entry (priv, &ohci->pending, pending) { | 809 | list_for_each_entry (priv, &ohci->pending, pending) { |