summaryrefslogtreecommitdiff
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 10:50:56 +0800
commit8cbe0defd38a7c2a79336b228322e1b8c1f437e6 (patch)
tree67ff262abe751fd97dc3a1c6fdbb3c733e639944
parent9c18e5893b59710187de19a7042b404070bf0486 (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)
-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 98443c8ceecf..13fc169ef76d 100644
--- a/drivers/usb/chipidea/otg_fsm.c
+++ b/drivers/usb/chipidea/otg_fsm.c
@@ -726,7 +726,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;