diff options
Diffstat (limited to 'drivers/usb/host/uhci-hcd.c')
-rw-r--r-- | drivers/usb/host/uhci-hcd.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 5cd0e48f67fb..09197067fe6b 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
@@ -735,6 +735,7 @@ static void uhci_stop(struct usb_hcd *hcd) | |||
735 | uhci_hc_died(uhci); | 735 | uhci_hc_died(uhci); |
736 | uhci_scan_schedule(uhci); | 736 | uhci_scan_schedule(uhci); |
737 | spin_unlock_irq(&uhci->lock); | 737 | spin_unlock_irq(&uhci->lock); |
738 | synchronize_irq(hcd->irq); | ||
738 | 739 | ||
739 | del_timer_sync(&uhci->fsbr_timer); | 740 | del_timer_sync(&uhci->fsbr_timer); |
740 | release_uhci(uhci); | 741 | release_uhci(uhci); |
@@ -749,7 +750,20 @@ static int uhci_rh_suspend(struct usb_hcd *hcd) | |||
749 | spin_lock_irq(&uhci->lock); | 750 | spin_lock_irq(&uhci->lock); |
750 | if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) | 751 | if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) |
751 | rc = -ESHUTDOWN; | 752 | rc = -ESHUTDOWN; |
752 | else if (!uhci->dead) | 753 | else if (uhci->dead) |
754 | ; /* Dead controllers tell no tales */ | ||
755 | |||
756 | /* Once the controller is stopped, port resumes that are already | ||
757 | * in progress won't complete. Hence if remote wakeup is enabled | ||
758 | * for the root hub and any ports are in the middle of a resume or | ||
759 | * remote wakeup, we must fail the suspend. | ||
760 | */ | ||
761 | else if (hcd->self.root_hub->do_remote_wakeup && | ||
762 | uhci->resuming_ports) { | ||
763 | dev_dbg(uhci_dev(uhci), "suspend failed because a port " | ||
764 | "is resuming\n"); | ||
765 | rc = -EBUSY; | ||
766 | } else | ||
753 | suspend_rh(uhci, UHCI_RH_SUSPENDED); | 767 | suspend_rh(uhci, UHCI_RH_SUSPENDED); |
754 | spin_unlock_irq(&uhci->lock); | 768 | spin_unlock_irq(&uhci->lock); |
755 | return rc; | 769 | return rc; |