[PATCH v2 05/15] usb: musb: core: move babble recovery inside babble check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There was already a proper place where we were
checking for babble interrupts, move babble
recovery there.

Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
 drivers/usb/musb/musb_core.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index a252194fd9b1..f63599368645 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
-- 
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux