summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorLi Jun <B47624@freescale.com>2014-09-24 14:46:00 +0800
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 10:59:13 -0600
commitf82574b6983bd21b6947cc44619121130d1301cc (patch)
treea7d505aef9d48676c44fb12727168525db679517 /drivers/usb
parent7f8de99ea059e2a79ad5653ef1a855cf7115462a (diff)
MLK-9606-5 usb: chipidea: otg: test: end test session if otg_vbus_off is set
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)
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/chipidea/otg_fsm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 62a00305af44..ebd8f32e52e9 100644
--- a/drivers/usb/chipidea/otg_fsm.c
+++ b/drivers/usb/chipidea/otg_fsm.c
@@ -766,6 +766,15 @@ static void ci_otg_fsm_event(struct ci_hdrc *ci)
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;