aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/debug.c
diff options
context:
space:
mode:
authorLi Jun <jun.li@freescale.com>2015-10-13 06:23:31 -0400
committerPeter Chen <peter.chen@freescale.com>2015-11-18 01:07:54 -0500
commit251b3c8b57481bcecd3f753108e36e7389ce12ac (patch)
tree031e8c73808e5b50e87b5e180c426703a3c8038c /drivers/usb/chipidea/debug.c
parentfacf47ee6b4d07d43c3bfd6f0762f1b28f64703a (diff)
usb: chipidea: debug: disable usb irq while role switch
Since the ci->role will be set after the host role start is complete, there will be nobody cared irq during start host if usb irq enabled. This error can be reproduced on i.mx6 sololite EVK board by: 1. disable otg id irq(IDIE) and disable all real otg properties of usbotg1 in dts. 2. boot up the board with ID cable and usb device connected. 3. echo gadget > /sys/kernel/debug/ci_hdrc.0/role 4. echo host > /sys/kernel/debug/ci_hdrc.0/role 5. irq 212: nobody cared. Cc: <stable@vger.kernel.org> # v3.10+ Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'drivers/usb/chipidea/debug.c')
-rw-r--r--drivers/usb/chipidea/debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index 080b7be3daf0..58c8485a0715 100644
--- a/drivers/usb/chipidea/debug.c
+++ b/drivers/usb/chipidea/debug.c
@@ -322,8 +322,10 @@ static ssize_t ci_role_write(struct file *file, const char __user *ubuf,
322 return -EINVAL; 322 return -EINVAL;
323 323
324 pm_runtime_get_sync(ci->dev); 324 pm_runtime_get_sync(ci->dev);
325 disable_irq(ci->irq);
325 ci_role_stop(ci); 326 ci_role_stop(ci);
326 ret = ci_role_start(ci, role); 327 ret = ci_role_start(ci, role);
328 enable_irq(ci->irq);
327 pm_runtime_put_sync(ci->dev); 329 pm_runtime_put_sync(ci->dev);
328 330
329 return ret ? ret : count; 331 return ret ? ret : count;