aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/patches-4.3/190-usb-xhci-plat-fix-adding-usb3-lpm-capable-quirk.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2015-10-25 16:43:14 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2015-10-25 16:43:14 +0000
commitfa4395db04e20e5e50b63cdec8b876e22d7e118f (patch)
treebc28783c76a6d20dba287f02a119dd4af04abe8a /target/linux/bcm53xx/patches-4.3/190-usb-xhci-plat-fix-adding-usb3-lpm-capable-quirk.patch
parent6bc864016313e486d8d451a7d1421f11d48cf6a6 (diff)
downloadupstream-fa4395db04e20e5e50b63cdec8b876e22d7e118f.tar.gz
upstream-fa4395db04e20e5e50b63cdec8b876e22d7e118f.tar.bz2
upstream-fa4395db04e20e5e50b63cdec8b876e22d7e118f.zip
bcm53xx: add support basic for kernel 4.3
The files directory is now split up into the files which are needed for every kernel version and the files only needed by kernel 4.1. The files in files-4.1 are already merged into mainline kernel 4.3. This patch only removed patches which were merged into mainline kernel 4.3. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 47251
Diffstat (limited to 'target/linux/bcm53xx/patches-4.3/190-usb-xhci-plat-fix-adding-usb3-lpm-capable-quirk.patch')
-rw-r--r--target/linux/bcm53xx/patches-4.3/190-usb-xhci-plat-fix-adding-usb3-lpm-capable-quirk.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-4.3/190-usb-xhci-plat-fix-adding-usb3-lpm-capable-quirk.patch b/target/linux/bcm53xx/patches-4.3/190-usb-xhci-plat-fix-adding-usb3-lpm-capable-quirk.patch
new file mode 100644
index 0000000000..a769650e3f
--- /dev/null
+++ b/target/linux/bcm53xx/patches-4.3/190-usb-xhci-plat-fix-adding-usb3-lpm-capable-quirk.patch
@@ -0,0 +1,63 @@
+From 1420e53fc88673683f8990aa5342e7b2640ce165 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sun, 18 Oct 2015 19:13:27 +0200
+Subject: [PATCH v3 1/6] usb: xhci: plat: fix adding usb3-lpm-capable quirk
+
+The xhci->quirks member is overwritten in xhci_gen_setup() with the
+quirks given through the module load parameter. Without this patch the
+usb3-lpm-capable quirk will be over written before it gets used. This
+patch moves the quirks code to the xhci_plat_quirks() callback function
+which gets called directly after the quirks member variable is
+overwritten with the module load parameter.
+
+I do not have any hardware which is using usb3-lpm-capabls so I can not
+test this on real hardware.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ drivers/usb/host/xhci-plat.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/host/xhci-plat.c
++++ b/drivers/usb/host/xhci-plat.c
+@@ -37,12 +37,20 @@ static const struct xhci_driver_override
+
+ static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
+ {
++ struct platform_device *pdev = to_platform_device(dev);
++ struct device_node *node = pdev->dev.of_node;
++ struct usb_xhci_pdata *pdata = dev_get_platdata(&pdev->dev);
++
+ /*
+ * As of now platform drivers don't provide MSI support so we ensure
+ * here that the generic code does not try to make a pci_dev from our
+ * dev struct in order to setup MSI
+ */
+ xhci->quirks |= XHCI_PLAT;
++
++ if ((node && of_property_read_bool(node, "usb3-lpm-capable")) ||
++ (pdata && pdata->usb3_lpm_capable))
++ xhci->quirks |= XHCI_LPM_SUPPORT;
+ }
+
+ /* called during probe() after chip reset completes */
+@@ -74,8 +82,6 @@ static int xhci_plat_start(struct usb_hc
+
+ static int xhci_plat_probe(struct platform_device *pdev)
+ {
+- struct device_node *node = pdev->dev.of_node;
+- struct usb_xhci_pdata *pdata = dev_get_platdata(&pdev->dev);
+ const struct hc_driver *driver;
+ struct xhci_hcd *xhci;
+ struct resource *res;
+@@ -148,10 +154,6 @@ static int xhci_plat_probe(struct platfo
+ goto disable_clk;
+ }
+
+- if ((node && of_property_read_bool(node, "usb3-lpm-capable")) ||
+- (pdata && pdata->usb3_lpm_capable))
+- xhci->quirks |= XHCI_LPM_SUPPORT;
+-
+ if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
+ xhci->shared_hcd->can_do_streams = 1;
+