]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Sep 2017 13:52:02 +0000 (15:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Sep 2017 13:52:02 +0000 (15:52 +0200)
added patches:
usb-add-device-quirk-for-logitech-hd-pro-webcam-c920-c.patch
usb-musb-fix-external-abort-on-suspend.patch
usb-quirks-add-delay-init-quirk-for-corsair-strafe-rgb-keyboard.patch
usb-serial-option-add-support-for-d-link-dwm-157-c1.patch
usb-xhci-fix-regression-when-ati-chipsets-detected.patch

queue-4.12/usb-add-device-quirk-for-logitech-hd-pro-webcam-c920-c.patch [new file with mode: 0644]
queue-4.12/usb-musb-fix-external-abort-on-suspend.patch [new file with mode: 0644]
queue-4.12/usb-quirks-add-delay-init-quirk-for-corsair-strafe-rgb-keyboard.patch [new file with mode: 0644]
queue-4.12/usb-serial-option-add-support-for-d-link-dwm-157-c1.patch [new file with mode: 0644]
queue-4.12/usb-xhci-fix-regression-when-ati-chipsets-detected.patch [new file with mode: 0644]

diff --git a/queue-4.12/usb-add-device-quirk-for-logitech-hd-pro-webcam-c920-c.patch b/queue-4.12/usb-add-device-quirk-for-logitech-hd-pro-webcam-c920-c.patch
new file mode 100644 (file)
index 0000000..647e0ae
--- /dev/null
@@ -0,0 +1,38 @@
+From a1279ef74eeeb5f627f091c71d80dd7ac766c99d Mon Sep 17 00:00:00 2001
+From: Dmitry Fleytman <dmitry@daynix.com>
+Date: Fri, 25 Aug 2017 10:38:35 +0300
+Subject: usb: Add device quirk for Logitech HD Pro Webcam C920-C
+
+From: Dmitry Fleytman <dmitry@daynix.com>
+
+commit a1279ef74eeeb5f627f091c71d80dd7ac766c99d upstream.
+
+Commit e0429362ab15
+("usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e")
+introduced quirk to workaround an issue with some Logitech webcams.
+
+Apparently model C920-C has the same issue so applying
+the same quirk as well.
+
+See aforementioned commit message for detailed explanation of the problem.
+
+Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/quirks.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -57,8 +57,9 @@ static const struct usb_device_id usb_qu
+       /* Microsoft LifeCam-VX700 v2.0 */
+       { USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME },
+-      /* Logitech HD Pro Webcams C920 and C930e */
++      /* Logitech HD Pro Webcams C920, C920-C and C930e */
+       { USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT },
++      { USB_DEVICE(0x046d, 0x0841), .driver_info = USB_QUIRK_DELAY_INIT },
+       { USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT },
+       /* Logitech ConferenceCam CC3000e */
diff --git a/queue-4.12/usb-musb-fix-external-abort-on-suspend.patch b/queue-4.12/usb-musb-fix-external-abort-on-suspend.patch
new file mode 100644 (file)
index 0000000..02f342f
--- /dev/null
@@ -0,0 +1,104 @@
+From 082df8be455ade361748f0385aa6c9c8d07be167 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 24 Aug 2017 11:38:36 -0500
+Subject: USB: musb: fix external abort on suspend
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 082df8be455ade361748f0385aa6c9c8d07be167 upstream.
+
+Make sure that the controller is runtime resumed when system suspending
+to avoid an external abort when accessing the interrupt registers:
+
+  Unhandled fault: external abort on non-linefetch (0x1008) at 0xd025840a
+  ...
+  [<c05481a4>] (musb_default_readb) from [<c0545abc>] (musb_disable_interrupts+0x84/0xa8)
+  [<c0545abc>] (musb_disable_interrupts) from [<c0546b08>] (musb_suspend+0x38/0xb8)
+  [<c0546b08>] (musb_suspend) from [<c04a57f8>] (platform_pm_suspend+0x3c/0x64)
+
+This is easily reproduced on a BBB by enabling the peripheral port only
+(as the host port may enable the shared clock) and keeping it
+disconnected so that the controller is runtime suspended. (Well, you
+would also need to the not-yet-merged am33xx-suspend patches by Dave
+Gerlach to be able to suspend the BBB.)
+
+This is a regression that was introduced by commit 1c4d0b4e1806 ("usb:
+musb: Remove pm_runtime_set_irq_safe") which allowed the parent glue
+device to runtime suspend and thereby exposed a couple of older issues:
+
+Register accesses without explicitly making sure the controller is
+runtime resumed during suspend was first introduced by commit c338412b5ded
+("usb: musb: unconditionally save and restore the context on suspend")
+in 3.14.
+
+Commit a1fc1920aaaa ("usb: musb: core: make sure musb is in RPM_ACTIVE on
+resume") later started setting the RPM status to active during resume,
+and this was also implicitly relying on the parent always being active.
+Since commit 71723f95463d ("PM / runtime: print error when activating a
+child to unactive parent") this now also results in the following
+warning:
+
+  musb-hdrc musb-hdrc.0: runtime PM trying to activate child device
+    musb-hdrc.0 but parent (47401400.usb) is not active
+
+This patch has been verified on 4.13-rc2, 4.12 and 4.9 using a BBB
+(the dsps glue would always be active also in 4.8).
+
+Fixes: c338412b5ded ("usb: musb: unconditionally save and restore the context on suspend")
+Fixes: a1fc1920aaaa ("usb: musb: core: make sure musb is in RPM_ACTIVE on resume")
+Fixes: 1c4d0b4e1806 ("usb: musb: Remove pm_runtime_set_irq_safe")
+Cc: Alan Stern <stern@rowland.harvard.edu>
+Cc: Daniel Mack <zonque@gmail.com>
+Cc: Dave Gerlach <d-gerlach@ti.com>
+Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
+Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Cc: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Bin Liu <b-liu@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/musb/musb_core.c |   18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -2668,6 +2668,13 @@ static int musb_suspend(struct device *d
+ {
+       struct musb     *musb = dev_to_musb(dev);
+       unsigned long   flags;
++      int ret;
++
++      ret = pm_runtime_get_sync(dev);
++      if (ret < 0) {
++              pm_runtime_put_noidle(dev);
++              return ret;
++      }
+       musb_platform_disable(musb);
+       musb_disable_interrupts(musb);
+@@ -2718,14 +2725,6 @@ static int musb_resume(struct device *de
+       if ((devctl & mask) != (musb->context.devctl & mask))
+               musb->port1_status = 0;
+-      /*
+-       * The USB HUB code expects the device to be in RPM_ACTIVE once it came
+-       * out of suspend
+-       */
+-      pm_runtime_disable(dev);
+-      pm_runtime_set_active(dev);
+-      pm_runtime_enable(dev);
+-
+       musb_start(musb);
+       spin_lock_irqsave(&musb->lock, flags);
+@@ -2735,6 +2734,9 @@ static int musb_resume(struct device *de
+                       error);
+       spin_unlock_irqrestore(&musb->lock, flags);
++      pm_runtime_mark_last_busy(dev);
++      pm_runtime_put_autosuspend(dev);
++
+       return 0;
+ }
diff --git a/queue-4.12/usb-quirks-add-delay-init-quirk-for-corsair-strafe-rgb-keyboard.patch b/queue-4.12/usb-quirks-add-delay-init-quirk-for-corsair-strafe-rgb-keyboard.patch
new file mode 100644 (file)
index 0000000..d0fa4b1
--- /dev/null
@@ -0,0 +1,57 @@
+From de3af5bf259d7a0bfaac70441c8568ab5998d80c Mon Sep 17 00:00:00 2001
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Date: Wed, 16 Aug 2017 10:53:20 +0800
+Subject: usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard
+
+From: Kai-Heng Feng <kai.heng.feng@canonical.com>
+
+commit de3af5bf259d7a0bfaac70441c8568ab5998d80c upstream.
+
+Corsair Strafe RGB keyboard has trouble to initialize:
+
+[ 1.679455] usb 3-6: new full-speed USB device number 4 using xhci_hcd
+[ 6.871136] usb 3-6: unable to read config index 0 descriptor/all
+[ 6.871138] usb 3-6: can't read configurations, error -110
+[ 6.991019] usb 3-6: new full-speed USB device number 5 using xhci_hcd
+[ 12.246642] usb 3-6: unable to read config index 0 descriptor/all
+[ 12.246644] usb 3-6: can't read configurations, error -110
+[ 12.366555] usb 3-6: new full-speed USB device number 6 using xhci_hcd
+[ 17.622145] usb 3-6: unable to read config index 0 descriptor/all
+[ 17.622147] usb 3-6: can't read configurations, error -110
+[ 17.742093] usb 3-6: new full-speed USB device number 7 using xhci_hcd
+[ 22.997715] usb 3-6: unable to read config index 0 descriptor/all
+[ 22.997716] usb 3-6: can't read configurations, error -110
+
+Although it may work after several times unpluging/pluging:
+
+[ 68.195240] usb 3-6: new full-speed USB device number 11 using xhci_hcd
+[ 68.337459] usb 3-6: New USB device found, idVendor=1b1c, idProduct=1b20
+[ 68.337463] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+[ 68.337466] usb 3-6: Product: Corsair STRAFE RGB Gaming Keyboard
+[ 68.337468] usb 3-6: Manufacturer: Corsair
+[ 68.337470] usb 3-6: SerialNumber: 0F013021AEB8046755A93ED3F5001941
+
+Tried three quirks: USB_QUIRK_DELAY_INIT, USB_QUIRK_NO_LPM and
+USB_QUIRK_DEVICE_QUALIFIER, user confirmed that USB_QUIRK_DELAY_INIT alone
+can workaround this issue. Hence add the quirk for Corsair Strafe RGB.
+
+BugLink: https://bugs.launchpad.net/bugs/1678477
+Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/quirks.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -217,6 +217,9 @@ static const struct usb_device_id usb_qu
+       { USB_DEVICE(0x1a0a, 0x0200), .driver_info =
+                       USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
++      /* Corsair Strafe RGB */
++      { USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT },
++
+       /* Acer C120 LED Projector */
+       { USB_DEVICE(0x1de1, 0xc102), .driver_info = USB_QUIRK_NO_LPM },
diff --git a/queue-4.12/usb-serial-option-add-support-for-d-link-dwm-157-c1.patch b/queue-4.12/usb-serial-option-add-support-for-d-link-dwm-157-c1.patch
new file mode 100644 (file)
index 0000000..036403c
--- /dev/null
@@ -0,0 +1,52 @@
+From 169e86546f5712179709de23cd64bbb15f199fab Mon Sep 17 00:00:00 2001
+From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
+Date: Tue, 29 Aug 2017 21:50:03 +0200
+Subject: USB: serial: option: add support for D-Link DWM-157 C1
+
+From: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
+
+commit 169e86546f5712179709de23cd64bbb15f199fab upstream.
+
+This commit adds support (an ID, really) for D-Link DWM-157 hardware
+version C1 USB modem to option driver.
+
+According to manufacturer-provided Windows INF file the device has four
+serial ports:
+"D-Link HSPA+DataCard Diagnostics Interface" (interface 2; modem port),
+"D-Link HSPA+DataCard NMEA Device" (interface 3),
+"D-Link HSPA+DataCard Speech Port" (interface 4),
+"D-Link HSPA+DataCard Debug Port" (interface 5).
+
+usb-devices output:
+T:  Bus=05 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=2001 ProdID=7d0e Rev=03.00
+S:  Manufacturer=D-Link,Inc
+S:  Product=D-Link DWM-157
+C:  #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
+I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+
+Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -2023,6 +2023,7 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
+       { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
+       { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) },                   /* D-Link DWM-158 */
++      { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) },                   /* D-Link DWM-157 C1 */
+       { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff),                     /* D-Link DWM-221 B1 */
+         .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
+       { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff),                     /* D-Link DWM-222 */
diff --git a/queue-4.12/usb-xhci-fix-regression-when-ati-chipsets-detected.patch b/queue-4.12/usb-xhci-fix-regression-when-ati-chipsets-detected.patch
new file mode 100644 (file)
index 0000000..46de87c
--- /dev/null
@@ -0,0 +1,81 @@
+From e6b422b88b46353cf596e0db6dc0e39d50d90d6e Mon Sep 17 00:00:00 2001
+From: Sandeep Singh <sandeep.singh@amd.com>
+Date: Thu, 24 Aug 2017 09:57:15 +0530
+Subject: usb:xhci:Fix regression when ATI chipsets detected
+
+From: Sandeep Singh <sandeep.singh@amd.com>
+
+commit e6b422b88b46353cf596e0db6dc0e39d50d90d6e upstream.
+
+The following commit cause a regression on ATI chipsets.
+'commit e788787ef4f9 ("usb:xhci:Add quirk for Certain
+failing HP keyboard on reset after resume")'
+
+This causes pinfo->smbus_dev to be wrongly set to NULL on
+systems with the ATI chipset that this function checks for first.
+
+Added conditional check for AMD chipsets to avoid the overwriting
+pinfo->smbus_dev.
+
+Reported-by: Ben Hutchings <ben@decadent.org.uk>
+Fixes: e788787ef4f9 ("usb:xhci:Add quirk for Certain
+failing HP keyboard on reset after resume")
+cc: Nehal Shah <Nehal-bakulchandra.Shah@amd.com>
+Signed-off-by: Sandeep Singh <Sandeep.Singh@amd.com>
+Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/pci-quirks.c |   35 ++++++++++++++++++-----------------
+ 1 file changed, 18 insertions(+), 17 deletions(-)
+
+--- a/drivers/usb/host/pci-quirks.c
++++ b/drivers/usb/host/pci-quirks.c
+@@ -142,29 +142,30 @@ static int amd_chipset_sb_type_init(stru
+                       pinfo->sb_type.gen = AMD_CHIPSET_SB700;
+               else if (rev >= 0x40 && rev <= 0x4f)
+                       pinfo->sb_type.gen = AMD_CHIPSET_SB800;
+-      }
+-      pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
+-                                        0x145c, NULL);
+-      if (pinfo->smbus_dev) {
+-              pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN;
+       } else {
+               pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
+                               PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
+-              if (!pinfo->smbus_dev) {
+-                      pinfo->sb_type.gen = NOT_AMD_CHIPSET;
+-                      return 0;
++              if (pinfo->smbus_dev) {
++                      rev = pinfo->smbus_dev->revision;
++                      if (rev >= 0x11 && rev <= 0x14)
++                              pinfo->sb_type.gen = AMD_CHIPSET_HUDSON2;
++                      else if (rev >= 0x15 && rev <= 0x18)
++                              pinfo->sb_type.gen = AMD_CHIPSET_BOLTON;
++                      else if (rev >= 0x39 && rev <= 0x3a)
++                              pinfo->sb_type.gen = AMD_CHIPSET_YANGTZE;
++              } else {
++                      pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
++                                                        0x145c, NULL);
++                      if (pinfo->smbus_dev) {
++                              rev = pinfo->smbus_dev->revision;
++                              pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN;
++                      } else {
++                              pinfo->sb_type.gen = NOT_AMD_CHIPSET;
++                              return 0;
++                      }
+               }
+-
+-              rev = pinfo->smbus_dev->revision;
+-              if (rev >= 0x11 && rev <= 0x14)
+-                      pinfo->sb_type.gen = AMD_CHIPSET_HUDSON2;
+-              else if (rev >= 0x15 && rev <= 0x18)
+-                      pinfo->sb_type.gen = AMD_CHIPSET_BOLTON;
+-              else if (rev >= 0x39 && rev <= 0x3a)
+-                      pinfo->sb_type.gen = AMD_CHIPSET_YANGTZE;
+       }
+-
+       pinfo->sb_type.rev = rev;
+       return 1;
+ }