From 1c50c317e2e7f15427149cbc216a63366468710e Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Mon, 14 Nov 2005 11:45:38 -0500 Subject: [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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-hcd.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/usb/host/ohci-hcd.c') diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index e3af3ac4416..a4b12404ae0 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) int temp; int i; struct urb_priv *priv; - struct usb_device *root = ohci_to_hcd(ohci)->self.root_hub; /* mark any devices gone, so they do nothing till khubd disconnects. * recycle any "live" eds/tds (and urbs) right away. @@ -804,11 +803,7 @@ static int ohci_restart (struct ohci_hcd *ohci) */ spin_lock_irq(&ohci->lock); disable (ohci); - for (i = 0; i < root->maxchild; i++) { - if (root->children [i]) - usb_set_device_state (root->children[i], - USB_STATE_NOTATTACHED); - } + usb_root_hub_lost_power(ohci_to_hcd(ohci)->self.root_hub); if (!list_empty (&ohci->pending)) ohci_dbg(ohci, "abort schedule...\n"); list_for_each_entry (priv, &ohci->pending, pending) { -- cgit v1.2.3