diff mbox

[RFC] Asynchronous suspend/resume - test results

Message ID Pine.LNX.4.44L0.0912211200200.2979-100000@iolanthe.rowland.org (mailing list archive)
State RFC, archived
Headers show

Commit Message

Alan Stern Dec. 21, 2009, 8:10 p.m. UTC
None
diff mbox

Patch

Index: usb-2.6/drivers/usb/host/ohci-hub.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ohci-hub.c
+++ usb-2.6/drivers/usb/host/ohci-hub.c
@@ -333,14 +333,12 @@  static void ohci_finish_controller_resum
 		}
 	}
 
-	/* If needed, reinitialize and suspend the root hub */
+	/* If needed, reinitialize the root hub */
 	if (need_reinit) {
 		spin_lock_irq(&ohci->lock);
 		hcd->state = HC_STATE_RESUMING;
-		ohci_rh_resume(ohci);
-		hcd->state = HC_STATE_QUIESCING;
-		ohci_rh_suspend(ohci, 0);
-		hcd->state = HC_STATE_SUSPENDED;
+		if (ohci_rh_resume(ohci) == 0)
+			hcd->state = HC_STATE_RUNNING;
 		spin_unlock_irq(&ohci->lock);
 	}
 
Index: usb-2.6/drivers/usb/host/uhci-hcd.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/uhci-hcd.c
+++ usb-2.6/drivers/usb/host/uhci-hcd.c
@@ -835,7 +835,6 @@  static int uhci_pci_resume(struct usb_hc
 
 		/* The controller had to be reset */
 		usb_root_hub_lost_power(hcd->self.root_hub);
-		suspend_rh(uhci, UHCI_RH_SUSPENDED);
 	}
 
 	spin_unlock_irq(&uhci->lock);