diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-06-21 16:25:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:34:39 -0400 |
commit | cfa59dab27d1b282886e7772a8f9548236883892 (patch) | |
tree | aaf71c0fb69d5133bfc71451d6541f1b49494dbb /drivers/usb/host/uhci-hcd.c | |
parent | e7e6da9eb189dfa221e3bf9c21d58f02adc8983c (diff) |
USB: Don't resume root hub if the controller is suspended
Root hubs can't be resumed if their parent controller device is still
suspended. This patch (as925) adds a check for that condition in
hcd_bus_resume() and prevents it from being treated as a fatal
controller failure.
ehci-hcd is updated to add the corresponding test. Unnecessary
debugging messages are removed from uhci-hcd and dummy-hcd. The
error return code from dummy-hcd is changed to -ESHUTDOWN, the same as
the others. ohci-hcd doesn't need any changes.
Suspend handling in the non-PCI host drivers is somewhat hit-and-miss.
This patch shouldn't have any effect on them.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-hcd.c')
-rw-r--r-- | drivers/usb/host/uhci-hcd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index d22da26ff167..76c555a67dac 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
@@ -730,10 +730,9 @@ static int uhci_rh_resume(struct usb_hcd *hcd) | |||
730 | int rc = 0; | 730 | int rc = 0; |
731 | 731 | ||
732 | spin_lock_irq(&uhci->lock); | 732 | spin_lock_irq(&uhci->lock); |
733 | if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { | 733 | if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) |
734 | dev_warn(&hcd->self.root_hub->dev, "HC isn't running!\n"); | ||
735 | rc = -ESHUTDOWN; | 734 | rc = -ESHUTDOWN; |
736 | } else if (!uhci->dead) | 735 | else if (!uhci->dead) |
737 | wakeup_rh(uhci); | 736 | wakeup_rh(uhci); |
738 | spin_unlock_irq(&uhci->lock); | 737 | spin_unlock_irq(&uhci->lock); |
739 | return rc; | 738 | return rc; |