MLK-10490 usb: chipidea: otg_fsm: update b_sess_vld after changes to be b_idle
authorLi Jun <jun.li@freescale.com>
Fri, 27 Mar 2015 06:46:20 +0000 (14:46 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:47:05 +0000 (14:47 -0500)
commit46f1ac72875433dcf5c409c3fa8ff019803510c6
tree6d13aae6d265a0ba2125b4bc0523cd0ea727fc05
parent9c63b52a6143ed3a88a6f87788038d77639cbd44
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>
(cherry picked from commit 0c1a70a95e4f8ef069e4a9809a447a39f36d0628)
drivers/usb/chipidea/otg_fsm.c