From: Li Jun Date: Mon, 22 Sep 2014 08:19:59 +0000 (+0800) Subject: MLK-11340-39 usb: chipidea: otg: clear b_bus_req when vbus is off X-Git-Tag: C0P2-H0.0--20200415~4697 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=6b4feac3dbe35a961befe6f34a266b7f336dcfb4;p=linux.git MLK-11340-39 usb: chipidea: otg: clear b_bus_req when vbus is off 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 Signed-off-by: Li Jun (cherry picked from commit bc600546bf9193f1a39186ad4c07a5fd497c7bfd) (cherry picked from commit c0ea9bfcd948e2d79ea77d22756550f498281cbb) --- diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index 75525d46e237..6a80441ceddf 100644 --- a/drivers/usb/chipidea/otg_fsm.c +++ b/drivers/usb/chipidea/otg_fsm.c @@ -796,6 +796,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);