[PATCH 1/1] usb: hcd: mark controller's suspend routine as async

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Host controller's suspend should be executed later than root hub's,
or the hang may occur when root hub try to visit some registers
but host controller's suspend close the related clocks.
Mark controller's suspend as async can make sure it is executed
later than root hub's as host controller is the parent of root hub.

Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxxxxx>
---
 drivers/usb/core/hcd.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bc84106..29a708a 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2512,6 +2512,14 @@ int usb_add_hcd(struct usb_hcd *hcd,
 	 * controllers should always be enabled for remote wakeup.
 	 */
 	device_wakeup_enable(hcd->self.controller);
+	/*
+	 * Host controller's suspend should be executed later than root hub's,
+	 * or the hang may occur when root hub try to visit some registers
+	 * but host controller's suspend close the related clocks.
+	 * Mark controller's suspend as async can make sure it is executed
+	 * later than root hub's as controller is the parent of root hub.
+	 */
+	device_enable_async_suspend(hcd->self.controller);
 	return retval;
 
 error_create_attr_group:
-- 
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux