提交 f905bc68 编写于 作者: G George Cherian 提交者: Felipe Balbi

usb: musb: core: Disable the Interrupts till BABBLE is fully handled

Disable the MUSB interrupts till MUSB is recovered fully from BABBLE
condition. There are chances that we could get multiple interrupts
till the time the babble recover work gets scheduled. Sometimes
this could even end up in an endless loop making MUSB itself unusable.
Reported-by: NFelipe Balbi <balbi@ti.com>
Signed-off-by: NGeorge Cherian <george.cherian@ti.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 1eec34e9
...@@ -423,6 +423,7 @@ void musb_hnp_stop(struct musb *musb) ...@@ -423,6 +423,7 @@ void musb_hnp_stop(struct musb *musb)
musb->port1_status &= ~(USB_PORT_STAT_C_CONNECTION << 16); musb->port1_status &= ~(USB_PORT_STAT_C_CONNECTION << 16);
} }
static void musb_generic_disable(struct musb *musb);
/* /*
* Interrupt Service Routine to record USB "global" interrupts. * Interrupt Service Routine to record USB "global" interrupts.
* Since these do not happen often and signify things of * Since these do not happen often and signify things of
...@@ -846,9 +847,11 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, ...@@ -846,9 +847,11 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
} }
/* handle babble condition */ /* handle babble condition */
if (int_usb & MUSB_INTR_BABBLE && is_host_active(musb)) if (int_usb & MUSB_INTR_BABBLE && is_host_active(musb)) {
musb_generic_disable(musb);
schedule_delayed_work(&musb->recover_work, schedule_delayed_work(&musb->recover_work,
msecs_to_jiffies(100)); msecs_to_jiffies(100));
}
#if 0 #if 0
/* REVISIT ... this would be for multiplexing periodic endpoints, or /* REVISIT ... this would be for multiplexing periodic endpoints, or
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册