]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Dec 2017 15:17:15 +0000 (16:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Dec 2017 15:17:15 +0000 (16:17 +0100)
added patches:
usb-musb-da8xx-fix-babble-condition-handling.patch

queue-3.18/series
queue-3.18/usb-musb-da8xx-fix-babble-condition-handling.patch [new file with mode: 0644]

index 178456a8c8e177a515ef13fc1db1c2f8e751798a..ed60ddbc4936f82708b0259b644ea4322e31f32a 100644 (file)
@@ -66,3 +66,4 @@ scsi-bfa-integer-overflow-in-debugfs.patch
 udf-avoid-overflow-when-session-starts-at-large-offset.patch
 macvlan-only-deliver-one-copy-of-the-frame-to-the-macvlan-interface.patch
 ath9k-fix-tx99-potential-info-leak.patch
+usb-musb-da8xx-fix-babble-condition-handling.patch
diff --git a/queue-3.18/usb-musb-da8xx-fix-babble-condition-handling.patch b/queue-3.18/usb-musb-da8xx-fix-babble-condition-handling.patch
new file mode 100644 (file)
index 0000000..6cc3f8f
--- /dev/null
@@ -0,0 +1,46 @@
+From bd3486ded7a0c313a6575343e6c2b21d14476645 Mon Sep 17 00:00:00 2001
+From: Bin Liu <b-liu@ti.com>
+Date: Tue, 5 Dec 2017 08:45:30 -0600
+Subject: usb: musb: da8xx: fix babble condition handling
+
+From: Bin Liu <b-liu@ti.com>
+
+commit bd3486ded7a0c313a6575343e6c2b21d14476645 upstream.
+
+When babble condition happens, the musb controller might automatically
+turns off VBUS. On DA8xx platform, the controller generates drvvbus
+interrupt for turning off VBUS along with the babble interrupt.
+
+In this case, we should handle the babble interrupt first and recover
+from the babble condition.
+
+This change ignores the drvvbus interrupt if babble interrupt is also
+generated at the same time, so the babble recovery routine works
+properly.
+
+Signed-off-by: Bin Liu <b-liu@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/musb/da8xx.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/musb/da8xx.c
++++ b/drivers/usb/musb/da8xx.c
+@@ -350,7 +350,15 @@ static irqreturn_t da8xx_musb_interrupt(
+                       musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
+                       portstate(musb->port1_status |= USB_PORT_STAT_POWER);
+                       del_timer(&otg_workaround);
+-              } else {
++              } else if (!(musb->int_usb & MUSB_INTR_BABBLE)){
++                      /*
++                       * When babble condition happens, drvvbus interrupt
++                       * is also generated. Ignore this drvvbus interrupt
++                       * and let babble interrupt handler recovers the
++                       * controller; otherwise, the host-mode flag is lost
++                       * due to the MUSB_DEV_MODE() call below and babble
++                       * recovery logic will not called.
++                       */
+                       musb->is_active = 0;
+                       MUSB_DEV_MODE(musb);
+                       otg->default_a = 0;