]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Oct 2014 19:03:26 +0000 (12:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Oct 2014 19:03:26 +0000 (12:03 -0700)
added patches:
usb-dwc3-core-fix-order-of-pm-runtime-calls.patch
usb-dwc3-core-fix-ordering-for-phy-suspend.patch
usb-host-xhci-fix-compliance-mode-workaround.patch

queue-3.10/series
queue-3.10/usb-dwc3-core-fix-order-of-pm-runtime-calls.patch [new file with mode: 0644]
queue-3.10/usb-dwc3-core-fix-ordering-for-phy-suspend.patch [new file with mode: 0644]
queue-3.10/usb-host-xhci-fix-compliance-mode-workaround.patch [new file with mode: 0644]

index e7104ac0bae77c4b1f9a8b8eda1ab0b432231dd3..379d39edddbef4859a979b10517bc8b5fa336024 100644 (file)
@@ -106,3 +106,6 @@ percpu-perform-tlb-flush-after-pcpu_map_pages-failure.patch
 rtlwifi-rtl8192cu-add-new-id.patch
 lockd-fix-rpcbind-crash-on-lockd-startup-failure.patch
 genhd-fix-leftover-might_sleep-in-blk_free_devt.patch
+usb-host-xhci-fix-compliance-mode-workaround.patch
+usb-dwc3-core-fix-order-of-pm-runtime-calls.patch
+usb-dwc3-core-fix-ordering-for-phy-suspend.patch
diff --git a/queue-3.10/usb-dwc3-core-fix-order-of-pm-runtime-calls.patch b/queue-3.10/usb-dwc3-core-fix-order-of-pm-runtime-calls.patch
new file mode 100644 (file)
index 0000000..4396756
--- /dev/null
@@ -0,0 +1,51 @@
+From fed33afce0eda44a46ae24d93aec1b5198c0bac4 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Tue, 2 Sep 2014 14:57:20 -0500
+Subject: usb: dwc3: core: fix order of PM runtime calls
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit fed33afce0eda44a46ae24d93aec1b5198c0bac4 upstream.
+
+Currently, we disable pm_runtime before all register
+accesses are done, this is dangerous and might lead
+to abort exceptions due to the driver trying to access
+a register which is clocked by a clock which was long
+gated.
+
+Fix that by moving pm_runtime_put_sync() and pm_runtime_disable()
+as the last thing we do before returning from our ->remove()
+method.
+
+Fixes: 72246da (usb: Introduce DesignWare USB3 DRD Driver)
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+
+---
+ drivers/usb/dwc3/core.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -606,9 +606,6 @@ static int dwc3_remove(struct platform_d
+       usb_phy_set_suspend(dwc->usb2_phy, 1);
+       usb_phy_set_suspend(dwc->usb3_phy, 1);
+-      pm_runtime_put(&pdev->dev);
+-      pm_runtime_disable(&pdev->dev);
+-
+       dwc3_debugfs_exit(dwc);
+       switch (dwc->mode) {
+@@ -631,6 +628,9 @@ static int dwc3_remove(struct platform_d
+       dwc3_free_event_buffers(dwc);
+       dwc3_core_exit(dwc);
++      pm_runtime_put_sync(&pdev->dev);
++      pm_runtime_disable(&pdev->dev);
++
+       return 0;
+ }
diff --git a/queue-3.10/usb-dwc3-core-fix-ordering-for-phy-suspend.patch b/queue-3.10/usb-dwc3-core-fix-ordering-for-phy-suspend.patch
new file mode 100644 (file)
index 0000000..a3843e4
--- /dev/null
@@ -0,0 +1,46 @@
+From dc99f16f076559235c92d3eb66d03d1310faea08 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Wed, 3 Sep 2014 16:13:37 -0500
+Subject: usb: dwc3: core: fix ordering for PHY suspend
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit dc99f16f076559235c92d3eb66d03d1310faea08 upstream.
+
+We can't suspend the PHYs before dwc3_core_exit_mode()
+has been called, that's because the host and/or device
+sides might still need to communicate with the far end
+link partner.
+
+Fixes: 8ba007a (usb: dwc3: core: enable the USB2 and USB3 phy in probe)
+Suggested-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/core.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -603,9 +603,6 @@ static int dwc3_remove(struct platform_d
+ {
+       struct dwc3     *dwc = platform_get_drvdata(pdev);
+-      usb_phy_set_suspend(dwc->usb2_phy, 1);
+-      usb_phy_set_suspend(dwc->usb3_phy, 1);
+-
+       dwc3_debugfs_exit(dwc);
+       switch (dwc->mode) {
+@@ -626,6 +623,10 @@ static int dwc3_remove(struct platform_d
+       dwc3_event_buffers_cleanup(dwc);
+       dwc3_free_event_buffers(dwc);
++
++      usb_phy_set_suspend(dwc->usb2_phy, 1);
++      usb_phy_set_suspend(dwc->usb3_phy, 1);
++
+       dwc3_core_exit(dwc);
+       pm_runtime_put_sync(&pdev->dev);
diff --git a/queue-3.10/usb-host-xhci-fix-compliance-mode-workaround.patch b/queue-3.10/usb-host-xhci-fix-compliance-mode-workaround.patch
new file mode 100644 (file)
index 0000000..8dab18b
--- /dev/null
@@ -0,0 +1,80 @@
+From 96908589a8b2584b1185f834d365f5cc360e8226 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Wed, 27 Aug 2014 16:38:04 -0500
+Subject: usb: host: xhci: fix compliance mode workaround
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 96908589a8b2584b1185f834d365f5cc360e8226 upstream.
+
+Commit 71c731a (usb: host: xhci: Fix Compliance Mode
+on SN65LVP3502CP Hardware) implemented a workaround
+for a known issue with Texas Instruments' USB 3.0
+redriver IC but it left a condition where any xHCI
+host would be taken out of reset if port was placed
+in compliance mode and there was no device connected
+to the port.
+
+That condition would trigger a fake connection to a
+non-existent device so that usbcore would trigger a
+warm reset of the port, thus taking the link out of
+reset.
+
+This has the side-effect of preventing any xHCI host
+connected to a Linux machine from starting and running
+the USB 3.0 Electrical Compliance Suite because the
+port will mysteriously taken out of compliance mode
+and, thus, xHCI won't step through the necessary
+compliance patterns for link validation.
+
+This patch fixes the issue by just adding a missing
+check for XHCI_COMP_MODE_QUIRK inside
+xhci_hub_report_usb3_link_state() when PORT_CAS isn't
+set.
+
+This patch should be backported to all kernels containing
+commit 71c731a.
+
+Fixes: 71c731a (usb: host: xhci: Fix Compliance Mode on SN65LVP3502CP Hardware)
+Cc: Alexis R. Cortes <alexis.cortes@ti.com>
+Cc: <stable@vger.kernel.org> # v3.2+
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/usb/host/xhci-hub.c |    8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/host/xhci-hub.c
++++ b/drivers/usb/host/xhci-hub.c
+@@ -462,7 +462,8 @@ void xhci_test_and_clear_bit(struct xhci
+ }
+ /* Updates Link Status for super Speed port */
+-static void xhci_hub_report_link_state(u32 *status, u32 status_reg)
++static void xhci_hub_report_link_state(struct xhci_hcd *xhci,
++              u32 *status, u32 status_reg)
+ {
+       u32 pls = status_reg & PORT_PLS_MASK;
+@@ -501,7 +502,8 @@ static void xhci_hub_report_link_state(u
+                * in which sometimes the port enters compliance mode
+                * caused by a delay on the host-device negotiation.
+                */
+-              if (pls == USB_SS_PORT_LS_COMP_MOD)
++              if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) &&
++                              (pls == USB_SS_PORT_LS_COMP_MOD))
+                       pls |= USB_PORT_STAT_CONNECTION;
+       }
+@@ -686,7 +688,7 @@ int xhci_hub_control(struct usb_hcd *hcd
+               }
+               /* Update Port Link State for super speed ports*/
+               if (hcd->speed == HCD_USB3) {
+-                      xhci_hub_report_link_state(&status, temp);
++                      xhci_hub_report_link_state(xhci, &status, temp);
+                       /*
+                        * Verify if all USB3 Ports Have entered U0 already.
+                        * Delete Compliance Mode Timer if so.