When the connected otg test device disconnects before test maintain timer
expires, A device should end the session if otg_vbus_off is set; and do
a_wait_bcon if otg_vbus_off is not set.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit
204fa72fe4e2be468fe61f1ede555e072610c932)
(cherry picked from commit
202ce199bd29093d20506a950748acd5323e76fa)
case OTG_STATE_A_HOST:
if ((intr_sts & USBi_PCI) && !port_conn) {
fsm->b_conn = 0;
+ if (fsm->tst_maint) {
+ ci_otg_del_timer(ci, A_TST_MAINT);
+ if (fsm->otg_vbus_off) {
+ fsm->a_bus_req = 0;
+ fsm->a_bus_drop = 1;
+ fsm->otg_vbus_off = 0;
+ }
+ fsm->tst_maint = 0;
+ }
ci_otg_queue_work(ci);
}
break;