Skip to content

Commit

Permalink
usb: musb: core: Handle Babble condition only in HOST mode
Browse files Browse the repository at this point in the history
BABBLE and RESET share the same interrupt. The interrupt
is considered to be RESET if MUSB is in peripheral mode and
as a BABBLE if MUSB is in HOST mode.

Handle babble condition iff MUSB is in HOST mode.

Fixes: ca88fc2 (usb: musb: add a work_struct to recover from babble errors)
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
George Cherian authored and Felipe Balbi committed Jun 19, 2014
1 parent f0cae93 commit 5d88180
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
}

/* handle babble condition */
if (int_usb & MUSB_INTR_BABBLE)
if (int_usb & MUSB_INTR_BABBLE && is_host_active(musb))
schedule_work(&musb->recover_work);

#if 0
Expand Down

0 comments on commit 5d88180

Please sign in to comment.