]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00331016-5 usb: chipidea: otg: clear b_bus_req when vbus is off
authorLi Jun <B47624@freescale.com>
Mon, 22 Sep 2014 08:19:59 +0000 (16:19 +0800)
committerLi Jun <jun.li@freescale.com>
Wed, 28 Jan 2015 03:08:37 +0000 (11:08 +0800)
In case of b_peripheral --> b_wait_acon --> b_idle due to vbus off
in b_wait_acon state, b_bus_req cannot be cleared in b_idle state,
which result in b device will do data pulse because b_bus_req is set.
This patch fix this issue by clear the input variable b_bus_req when
vbus is off.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
(cherry picked from commit bc600546bf9193f1a39186ad4c07a5fd497c7bfd)

drivers/usb/chipidea/otg_fsm.c

index 748942e3b09b324f8801af7948231ac4e87ca150..7ae4d0269d2dc5f222a606ee1cff43cd63065583 100644 (file)
@@ -817,6 +817,8 @@ irqreturn_t ci_otg_fsm_irq(struct ci_hdrc *ci)
                                fsm->b_sess_vld = 0;
                                if (fsm->id)
                                        ci_otg_add_timer(ci, B_SSEND_SRP);
+                               if (fsm->b_bus_req)
+                                       fsm->b_bus_req = 0;
                        }
                } else if (otg_int_src & OTGSC_AVVIS) {
                        hw_write_otgsc(ci, OTGSC_AVVIS, OTGSC_AVVIS);