diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-02-22 07:48:51 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-22 07:48:51 -0500 |
commit | f11cbd74c5ff3614f6390b4de67a6ffdc614c378 (patch) | |
tree | 6a30920ade9eeaac5bf6d6263b5d09712e882eb0 /drivers/usb/host/uhci-hcd.c | |
parent | 429c42c9d246f5bda868495c09974312a0177328 (diff) | |
parent | aea187c46f7d03ce985e55eb1398d0776a15b928 (diff) |
Merge branch 'master' into for-2.6.34
Diffstat (limited to 'drivers/usb/host/uhci-hcd.c')
-rw-r--r-- | drivers/usb/host/uhci-hcd.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 5cd0e48f67fb..99cd00fd3514 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
@@ -749,7 +749,20 @@ static int uhci_rh_suspend(struct usb_hcd *hcd) | |||
749 | spin_lock_irq(&uhci->lock); | 749 | spin_lock_irq(&uhci->lock); |
750 | if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) | 750 | if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) |
751 | rc = -ESHUTDOWN; | 751 | rc = -ESHUTDOWN; |
752 | else if (!uhci->dead) | 752 | else if (uhci->dead) |
753 | ; /* Dead controllers tell no tales */ | ||
754 | |||
755 | /* Once the controller is stopped, port resumes that are already | ||
756 | * in progress won't complete. Hence if remote wakeup is enabled | ||
757 | * for the root hub and any ports are in the middle of a resume or | ||
758 | * remote wakeup, we must fail the suspend. | ||
759 | */ | ||
760 | else if (hcd->self.root_hub->do_remote_wakeup && | ||
761 | uhci->resuming_ports) { | ||
762 | dev_dbg(uhci_dev(uhci), "suspend failed because a port " | ||
763 | "is resuming\n"); | ||
764 | rc = -EBUSY; | ||
765 | } else | ||
753 | suspend_rh(uhci, UHCI_RH_SUSPENDED); | 766 | suspend_rh(uhci, UHCI_RH_SUSPENDED); |
754 | spin_unlock_irq(&uhci->lock); | 767 | spin_unlock_irq(&uhci->lock); |
755 | return rc; | 768 | return rc; |