MLK-9824-1 usb: chipidea: otg: clear b_conn when ends session
authorLi Jun <B47624@freescale.com>
Tue, 11 Nov 2014 05:23:41 +0000 (13:23 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:47:15 +0000 (14:47 -0500)
This patch is to clear the flag b_conn when turns off vbus to end a session.
when otg fsm is a_host -> a_suspend -> a_wait_vfall -> a_idle, current otg
fsm implementation does not handle disconnect event since the disconnection
does not happen while a_host state, so the b_conn is still set when in a_idle,
this patch clear b_conn flag after turn off vbus.

Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit 043b79264051454de18488cb746ee617d86f3568)
(cherry picked from commit 7476c27df7a8bbc66f2269804cac58319fecf3d2)

drivers/usb/chipidea/otg_fsm.c

index e095c2d..e52ea80 100644 (file)
@@ -553,6 +553,7 @@ static void ci_otg_drv_vbus(struct otg_fsm *fsm, int on)
 
                fsm->a_bus_drop = 1;
                fsm->a_bus_req = 0;
+               fsm->b_conn = 0;
        }
 }