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)
*/
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;