@@ -1032,10 +1032,11 @@ EXPORT_SYMBOL_GPL(ohci_restart);
#ifdef CONFIG_PM
-int ohci_suspend(struct usb_hcd *hcd, bool do_wakeup)
+int ohci_suspend(struct usb_hcd *hcd)
{
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
unsigned long flags;
+ int rc = 0;
/* Disable irq emission and mark HW unaccessible. Use
* the spinlock to properly synchronize with possible pending
@@ -1048,7 +1049,13 @@ int ohci_suspend(struct usb_hcd *hcd, bool do_wakeup)
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
spin_unlock_irqrestore (&ohci->lock, flags);
- return 0;
+ synchronize_irq(hcd->irq);
+
+ if (HCD_WAKEUP_PENDING(hcd)) {
+ ohci_resume(hcd, false);
+ rc = -EBUSY;
+ }
+ return rc;
}
EXPORT_SYMBOL_GPL(ohci_suspend);
@@ -735,6 +735,6 @@ extern void ohci_init_driver(struct hc_driver *drv,
extern int ohci_restart(struct ohci_hcd *ohci);
extern int ohci_setup(struct usb_hcd *hcd);
#ifdef CONFIG_PM
-extern int ohci_suspend(struct usb_hcd *hcd, bool do_wakeup);
+extern int ohci_suspend(struct usb_hcd *hcd);
extern int ohci_resume(struct usb_hcd *hcd, bool hibernated);
#endif