]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Dec 2015 23:55:30 +0000 (15:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Dec 2015 23:55:30 +0000 (15:55 -0800)
added patches:
usb-add-quirk-for-devices-with-broken-lpm.patch
usb-cdc_acm-ignore-infineon-flash-loader-utility.patch
usb-cp210x-remove-cp2110-id-from-compatibility-list.patch
usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch
usb-whci-hcd-add-check-for-dma-mapping-error.patch

queue-3.10/series
queue-3.10/usb-add-quirk-for-devices-with-broken-lpm.patch [new file with mode: 0644]
queue-3.10/usb-cdc_acm-ignore-infineon-flash-loader-utility.patch [new file with mode: 0644]
queue-3.10/usb-cp210x-remove-cp2110-id-from-compatibility-list.patch [new file with mode: 0644]
queue-3.10/usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch [new file with mode: 0644]
queue-3.10/usb-whci-hcd-add-check-for-dma-mapping-error.patch [new file with mode: 0644]

index a51e4fc01964d34dc4f90b1b613e6ee58bf346ed..eeca45e98a0c3368d11c8b18e1818de31c777de6 100644 (file)
@@ -15,3 +15,8 @@ ext4-jbd2-ensure-entering-into-panic-after-recording-an-error-in-superblock.patc
 firewire-ohci-fix-jmicron-jmb38x-it-context-discovery.patch
 nfs4-start-callback_ident-at-idr-1.patch
 nfs-if-we-have-no-valid-attrs-then-don-t-declare-the-attribute-cache-valid.patch
+usb-cdc_acm-ignore-infineon-flash-loader-utility.patch
+usb-cp210x-remove-cp2110-id-from-compatibility-list.patch
+usb-add-quirk-for-devices-with-broken-lpm.patch
+usb-whci-hcd-add-check-for-dma-mapping-error.patch
+usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch
diff --git a/queue-3.10/usb-add-quirk-for-devices-with-broken-lpm.patch b/queue-3.10/usb-add-quirk-for-devices-with-broken-lpm.patch
new file mode 100644 (file)
index 0000000..e6522bf
--- /dev/null
@@ -0,0 +1,83 @@
+From ad87e03213b552a5c33d5e1e7a19a73768397010 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Thu, 10 Dec 2015 15:27:21 -0500
+Subject: USB: add quirk for devices with broken LPM
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit ad87e03213b552a5c33d5e1e7a19a73768397010 upstream.
+
+Some USB device / host controller combinations seem to have problems
+with Link Power Management.  For example, Steinar found that his xHCI
+controller wouldn't handle bandwidth calculations correctly for two
+video cards simultaneously when LPM was enabled, even though the bus
+had plenty of bandwidth available.
+
+This patch introduces a new quirk flag for devices that should remain
+disabled for LPM, and creates quirk entries for Steinar's devices.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Reported-by: Steinar H. Gunderson <sgunderson@bigfoot.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/hub.c     |    7 ++++++-
+ drivers/usb/core/quirks.c  |    6 ++++++
+ include/linux/usb/quirks.h |    3 +++
+ 3 files changed, 15 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -137,6 +137,10 @@ struct usb_hub *usb_hub_to_struct_hub(st
+ static int usb_device_supports_lpm(struct usb_device *udev)
+ {
++      /* Some devices have trouble with LPM */
++      if (udev->quirks & USB_QUIRK_NO_LPM)
++              return 0;
++
+       /* USB 2.1 (and greater) devices indicate LPM support through
+        * their USB 2.0 Extended Capabilities BOS descriptor.
+        */
+@@ -4289,6 +4293,8 @@ hub_port_init (struct usb_hub *hub, stru
+               goto fail;
+       }
++      usb_detect_quirks(udev);
++
+       if (udev->wusb == 0 && le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0201) {
+               retval = usb_get_bos_descriptor(udev);
+               if (!retval) {
+@@ -4530,7 +4536,6 @@ static void hub_port_connect_change(stru
+               if (status < 0)
+                       goto loop;
+-              usb_detect_quirks(udev);
+               if (udev->quirks & USB_QUIRK_DELAY_INIT)
+                       msleep(1000);
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -182,6 +182,12 @@ static const struct usb_device_id usb_in
+       { USB_DEVICE(0x0b05, 0x17e0), .driver_info =
+                       USB_QUIRK_IGNORE_REMOTE_WAKEUP },
++      /* Blackmagic Design Intensity Shuttle */
++      { USB_DEVICE(0x1edb, 0xbd3b), .driver_info = USB_QUIRK_NO_LPM },
++
++      /* Blackmagic Design UltraStudio SDI */
++      { USB_DEVICE(0x1edb, 0xbd4f), .driver_info = USB_QUIRK_NO_LPM },
++
+       { }  /* terminating entry must be last */
+ };
+--- a/include/linux/usb/quirks.h
++++ b/include/linux/usb/quirks.h
+@@ -33,4 +33,7 @@
+ /* device generates spurious wakeup, ignore remote wakeup capability */
+ #define USB_QUIRK_IGNORE_REMOTE_WAKEUP        0x00000200
++/* device can't handle Link Power Management */
++#define USB_QUIRK_NO_LPM                      BIT(10)
++
+ #endif /* __LINUX_USB_QUIRKS_H */
diff --git a/queue-3.10/usb-cdc_acm-ignore-infineon-flash-loader-utility.patch b/queue-3.10/usb-cdc_acm-ignore-infineon-flash-loader-utility.patch
new file mode 100644 (file)
index 0000000..1e7bf20
--- /dev/null
@@ -0,0 +1,76 @@
+From f33a7f72e5fc033daccbb8d4753d7c5c41a4d67b Mon Sep 17 00:00:00 2001
+From: Jonas Jonsson <jonas@ludd.ltu.se>
+Date: Sun, 22 Nov 2015 11:47:17 +0100
+Subject: USB: cdc_acm: Ignore Infineon Flash Loader utility
+
+From: Jonas Jonsson <jonas@ludd.ltu.se>
+
+commit f33a7f72e5fc033daccbb8d4753d7c5c41a4d67b upstream.
+
+Some modems, such as the Telit UE910, are using an Infineon Flash Loader
+utility. It has two interfaces, 2/2/0 (Abstract Modem) and 10/0/0 (CDC
+Data). The latter can be used as a serial interface to upgrade the
+firmware of the modem. However, that isn't possible when the cdc-acm
+driver takes control of the device.
+
+The following is an explanation of the behaviour by Daniele Palmas during
+discussion on linux-usb.
+
+"This is what happens when the device is turned on (without modifying
+the drivers):
+
+[155492.352031] usb 1-3: new high-speed USB device number 27 using ehci-pci
+[155492.485429] usb 1-3: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 255, changing to 11
+[155492.485436] usb 1-3: New USB device found, idVendor=058b, idProduct=0041
+[155492.485439] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
+[155492.485952] cdc_acm 1-3:1.0: ttyACM0: USB ACM device
+
+This is the flashing device that is caught by the cdc-acm driver. Once
+the ttyACM appears, the application starts sending a magic string
+(simple write on the file descriptor) to keep the device in flashing
+mode. If this magic string is not properly received in a certain time
+interval, the modem goes on in normal operative mode:
+
+[155493.748094] usb 1-3: USB disconnect, device number 27
+[155494.916025] usb 1-3: new high-speed USB device number 28 using ehci-pci
+[155495.059978] usb 1-3: New USB device found, idVendor=1bc7, idProduct=0021
+[155495.059983] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+[155495.059986] usb 1-3: Product: 6 CDC-ACM + 1 CDC-ECM
+[155495.059989] usb 1-3: Manufacturer: Telit
+[155495.059992] usb 1-3: SerialNumber: 359658044004697
+[155495.138958] cdc_acm 1-3:1.0: ttyACM0: USB ACM device
+[155495.140832] cdc_acm 1-3:1.2: ttyACM1: USB ACM device
+[155495.142827] cdc_acm 1-3:1.4: ttyACM2: USB ACM device
+[155495.144462] cdc_acm 1-3:1.6: ttyACM3: USB ACM device
+[155495.145967] cdc_acm 1-3:1.8: ttyACM4: USB ACM device
+[155495.147588] cdc_acm 1-3:1.10: ttyACM5: USB ACM device
+[155495.154322] cdc_ether 1-3:1.12 wwan0: register 'cdc_ether' at usb-0000:00:1a.7-3, Mobile Broadband Network Device, 00:00:11:12:13:14
+
+Using the cdc-acm driver, the string, though being sent in the same way
+than using the usb-serial-simple driver (I can confirm that the data is
+passing properly since I used an hw usb sniffer), does not make the
+device to stay in flashing mode."
+
+Signed-off-by: Jonas Jonsson <jonas@ludd.ltu.se>
+Tested-by: Daniele Palmas <dnlplm@gmail.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/class/cdc-acm.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -1726,6 +1726,11 @@ static const struct usb_device_id acm_id
+       },
+ #endif
++      /* Exclude Infineon Flash Loader utility */
++      { USB_DEVICE(0x058b, 0x0041),
++      .driver_info = IGNORE_DEVICE,
++      },
++
+       /* control interfaces without any protocol set */
+       { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
+               USB_CDC_PROTO_NONE) },
diff --git a/queue-3.10/usb-cp210x-remove-cp2110-id-from-compatibility-list.patch b/queue-3.10/usb-cp210x-remove-cp2110-id-from-compatibility-list.patch
new file mode 100644 (file)
index 0000000..8701037
--- /dev/null
@@ -0,0 +1,30 @@
+From 7c90e610b60cd1ed6abafd806acfaedccbbe52d1 Mon Sep 17 00:00:00 2001
+From: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
+Date: Tue, 10 Nov 2015 16:40:13 -0600
+Subject: USB: cp210x: Remove CP2110 ID from compatibility list
+
+From: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
+
+commit 7c90e610b60cd1ed6abafd806acfaedccbbe52d1 upstream.
+
+CP2110 ID (0x10c4, 0xea80) doesn't belong here because it's a HID
+and completely different from CP210x devices.
+
+Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/cp210x.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -132,7 +132,6 @@ static const struct usb_device_id id_tab
+       { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
+       { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
+       { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
+-      { USB_DEVICE(0x10C4, 0xEA80) }, /* Silicon Labs factory default */
+       { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */
+       { USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */
+       { USB_DEVICE(0x10C4, 0xF002) }, /* Elan Digital Systems USBwave12 */
diff --git a/queue-3.10/usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch b/queue-3.10/usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch
new file mode 100644 (file)
index 0000000..0843e39
--- /dev/null
@@ -0,0 +1,33 @@
+From 5377adb092664d336ac212499961cac5e8728794 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Wed, 18 Nov 2015 02:01:21 +0000
+Subject: usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+commit 5377adb092664d336ac212499961cac5e8728794 upstream.
+
+usb_parse_ss_endpoint_companion() now decodes the burst multiplier
+correctly in order to check that it's <= 3, but still uses the wrong
+expression if warning that it's > 3.
+
+Fixes: ff30cbc8da42 ("usb: Use the USB_SS_MULT() macro to get the ...")
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/config.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/core/config.c
++++ b/drivers/usb/core/config.c
+@@ -117,7 +117,8 @@ static void usb_parse_ss_endpoint_compan
+                  USB_SS_MULT(desc->bmAttributes) > 3) {
+               dev_warn(ddev, "Isoc endpoint has Mult of %d in "
+                               "config %d interface %d altsetting %d ep %d: "
+-                              "setting to 3\n", desc->bmAttributes + 1,
++                              "setting to 3\n",
++                              USB_SS_MULT(desc->bmAttributes),
+                               cfgno, inum, asnum, ep->desc.bEndpointAddress);
+               ep->ss_ep_comp.bmAttributes = 2;
+       }
diff --git a/queue-3.10/usb-whci-hcd-add-check-for-dma-mapping-error.patch b/queue-3.10/usb-whci-hcd-add-check-for-dma-mapping-error.patch
new file mode 100644 (file)
index 0000000..1021ae0
--- /dev/null
@@ -0,0 +1,33 @@
+From f9fa1887dcf26bd346665a6ae3d3f53dec54cba1 Mon Sep 17 00:00:00 2001
+From: Alexey Khoroshilov <khoroshilov@ispras.ru>
+Date: Sat, 21 Nov 2015 00:36:44 +0300
+Subject: USB: whci-hcd: add check for dma mapping error
+
+From: Alexey Khoroshilov <khoroshilov@ispras.ru>
+
+commit f9fa1887dcf26bd346665a6ae3d3f53dec54cba1 upstream.
+
+qset_fill_page_list() do not check for dma mapping errors.
+
+Found by Linux Driver Verification project (linuxtesting.org).
+
+Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/whci/qset.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/host/whci/qset.c
++++ b/drivers/usb/host/whci/qset.c
+@@ -377,6 +377,10 @@ static int qset_fill_page_list(struct wh
+       if (std->pl_virt == NULL)
+               return -ENOMEM;
+       std->dma_addr = dma_map_single(whc->wusbhc.dev, std->pl_virt, pl_len, DMA_TO_DEVICE);
++      if (dma_mapping_error(whc->wusbhc.dev, std->dma_addr)) {
++              kfree(std->pl_virt);
++              return -EFAULT;
++      }
+       for (p = 0; p < std->num_pointers; p++) {
+               std->pl_virt[p].buf_ptr = cpu_to_le64(dma_addr);