diff options
author | Li Jun <jun.li@freescale.com> | 2015-03-27 14:46:20 +0800 |
---|---|---|
committer | guoyin.chen <guoyin.chen@freescale.com> | 2015-05-08 17:24:28 +0800 |
commit | bb672355aab6b7f85403cd03519b7cf42c8c4691 (patch) | |
tree | acd1c634a3ce74a8bb44dcd49a1bdd450e22bd71 /drivers | |
parent | 7e383d023f7ebb29ea7710c25c18f36e90ad9b9d (diff) |
MLK-10490 usb: chipidea: otg_fsm: update b_sess_vld after changes to be b_idle
In a corner case: system suspend with usb device connected on OTG port, then
remove usb device and connect OTG port to PC, and then resume the system,
OTG cannot be enumrated by PC. Reason is there is no BSV irq generated after
resume, so b_sess_vld cannot be updated and otg fsm state keeps in b_idle state
with vbus on, this patch force a update of b_sess_vld flag according to OTGSC
BSV status.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/chipidea/otg_fsm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index bda706112470..b4ac0abbfe5b 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -718,6 +718,7 @@ int ci_otg_fsm_work(struct ci_hdrc *ci) if (ci->id_event) ci->id_event = false; } else if (ci->fsm.otg->state == OTG_STATE_B_IDLE) { + ci->fsm.b_sess_vld = hw_read_otgsc(ci, OTGSC_BSV); if (ci->fsm.b_sess_vld) { ci->fsm.power_up = 0; /* |