From: Felipe Balbi Date: Wed, 25 Feb 2015 20:07:52 +0000 (-0600) Subject: usb: musb: core: move babble recovery inside babble check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d0fc0a20b5b7babe0fe1552204bd52505a4f93dd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: musb: core: move babble recovery inside babble check There was already a proper place where we were checking for babble interrupts, move babble recovery there. Tested-by: Bin Liu Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index cf7b10e5963e..9ea02d4cc2c2 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -899,6 +899,12 @@ b_host: if (power & MUSB_POWER_HSMODE) { ERR("Stopping host session -- babble\n"); musb_writeb(musb->mregs, MUSB_DEVCTL, 0); + + if (is_host_active(musb)) { + musb_generic_disable(musb); + schedule_delayed_work(&musb->recover_work, + msecs_to_jiffies(100)); + } } } else { dev_dbg(musb->controller, "BUS RESET as %s\n", @@ -938,13 +944,6 @@ b_host: } } - /* handle babble condition */ - if (int_usb & MUSB_INTR_BABBLE && is_host_active(musb)) { - musb_generic_disable(musb); - schedule_delayed_work(&musb->recover_work, - msecs_to_jiffies(100)); - } - #if 0 /* REVISIT ... this would be for multiplexing periodic endpoints, or * supporting transfer phasing to prevent exceeding ISO bandwidth