Commit 34754dec authored by Felipe Balbi's avatar Felipe Balbi

usb: musb: core: always try to recover from babble

we can also have babble conditions with LS/FS
and we also want to recover in that case.

Because of that we will drop the check of HSMODE
and always try to run babble recovery.
Suggested-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 0244336f
...@@ -863,28 +863,18 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, ...@@ -863,28 +863,18 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
if (int_usb & MUSB_INTR_RESET) { if (int_usb & MUSB_INTR_RESET) {
handled = IRQ_HANDLED; handled = IRQ_HANDLED;
if (devctl & MUSB_DEVCTL_HM) { if (devctl & MUSB_DEVCTL_HM) {
u8 power = musb_readl(musb->mregs, MUSB_POWER);
/* /*
* Looks like non-HS BABBLE can be ignored, but * When BABBLE happens what we can depends on which
* HS BABBLE is an error condition.
*
* For HS the solution is to avoid babble in the first
* place and fix what caused BABBLE.
*
* When HS BABBLE happens what we can depends on which
* platform MUSB is running, because some platforms * platform MUSB is running, because some platforms
* implemented proprietary means for 'recovering' from * implemented proprietary means for 'recovering' from
* Babble conditions. One such platform is AM335x. In * Babble conditions. One such platform is AM335x. In
* most cases, however, the only thing we can do is drop * most cases, however, the only thing we can do is
* the session. * drop the session.
*/ */
if (power & MUSB_POWER_HSMODE) {
dev_err(musb->controller, "Babble\n"); dev_err(musb->controller, "Babble\n");
if (is_host_active(musb)) if (is_host_active(musb))
musb_recover_from_babble(musb); musb_recover_from_babble(musb);
}
} else { } else {
dev_dbg(musb->controller, "BUS RESET as %s\n", dev_dbg(musb->controller, "BUS RESET as %s\n",
usb_otg_state_string(musb->xceiv->otg->state)); usb_otg_state_string(musb->xceiv->otg->state));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment