summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLi Jun <jun.li@freescale.com>2015-06-19 17:18:48 +0800
committerLi Jun <jun.li@freescale.com>2015-06-24 14:14:38 +0800
commita1d10a86355d577232458eec3af09bfbc6e0772e (patch)
treee84801bf85f1cd65c1b84a76e4409e0ee6b66b67 /drivers
parente11c025aacd4debc591074324fa879a9c2b313f0 (diff)
MLK-11132 usb: chipidea: otg: delay suspend for a_wait_vfall
While A device as peripheral ends session by a_bus_drop, it will go back to host role by transition to a_wait_vfall state, then ehci host driver may access portsc status after controller enters suspend , this will result in system hang since its clock is gated off. This patch use existing autosuspend to delay the controller suspend if it comes to a_wait_vfall state. Signed-off-by: Li Jun <jun.li@freescale.com> (cherry picked from commit b140fa6803ef6ececec17e435212a960a3169cc2)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/chipidea/otg_fsm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 1ccaf35eea5a..6e1070b19fed 100644
--- a/drivers/usb/chipidea/otg_fsm.c
+++ b/drivers/usb/chipidea/otg_fsm.c
@@ -889,7 +889,8 @@ int ci_otg_fsm_work(struct ci_hdrc *ci)
*/
ci_otg_queue_work(ci);
}
- } else if (ci->fsm.otg->state == OTG_STATE_A_HOST) {
+ } else if (ci->fsm.otg->state == OTG_STATE_A_HOST ||
+ ci->fsm.otg->state == OTG_STATE_A_WAIT_VFALL) {
pm_runtime_mark_last_busy(ci->dev);
pm_runtime_put_autosuspend(ci->dev);
return 0;