From e63cb9dadd5979e45805333427aaf97fad2dfa89 Mon Sep 17 00:00:00 2001 From: Li Jun Date: Tue, 28 Apr 2015 14:41:36 +0800 Subject: [PATCH] MLK-10718 usb: chipidea: udc: disable BSV irq when otg from undefined to a_idle After device power up, insert usb OTG ID cable, otg fsm from undefined state to a_idle, the BSV cannot be disabled, this will result BSV irq generated but which is actually only for B device. Signed-off-by: Li Jun (cherry picked from commit bf6a1cdaef68125cc10240f174019e2646ebaa24) --- drivers/usb/chipidea/udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index b32d51cbc98e..1d6e53868db4 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -2043,7 +2043,8 @@ static void udc_id_switch_for_host(struct ci_hdrc *ci) * (in otg fsm mode, means B_IDLE->A_IDLE) due to ID change. */ if (!ci_otg_is_fsm_mode(ci) || - ci->fsm.otg->state == OTG_STATE_B_IDLE) + ci->fsm.otg->state == OTG_STATE_B_IDLE || + ci->fsm.otg->state == OTG_STATE_UNDEFINED) hw_write_otgsc(ci, OTGSC_BSVIE | OTGSC_BSVIS, OTGSC_BSVIS); } -- 2.17.1