From: Greg Kroah-Hartman Date: Fri, 18 Dec 2015 00:42:54 +0000 (-0800) Subject: 3.14-stable patches X-Git-Tag: v3.10.95~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59bea1fc40b51408e49415a1576828369db4d153;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches 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-serial-another-infineon-flash-loader-usb-id.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 --- diff --git a/queue-3.14/series b/queue-3.14/series index a40fa32e7db..3fa0ce0c0ea 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -23,3 +23,9 @@ 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 ocfs2-fix-umask-ignored-issue.patch +usb-cdc_acm-ignore-infineon-flash-loader-utility.patch +usb-serial-another-infineon-flash-loader-usb-id.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.14/usb-add-quirk-for-devices-with-broken-lpm.patch b/queue-3.14/usb-add-quirk-for-devices-with-broken-lpm.patch new file mode 100644 index 00000000000..31e16aaa556 --- /dev/null +++ b/queue-3.14/usb-add-quirk-for-devices-with-broken-lpm.patch @@ -0,0 +1,83 @@ +From ad87e03213b552a5c33d5e1e7a19a73768397010 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Thu, 10 Dec 2015 15:27:21 -0500 +Subject: USB: add quirk for devices with broken LPM + +From: Alan Stern + +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 +Reported-by: Steinar H. Gunderson +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -130,6 +130,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. + */ +@@ -4350,6 +4354,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) { +@@ -4595,7 +4601,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 +@@ -205,6 +205,12 @@ static const struct usb_device_id usb_am + /* Logitech Optical Mouse M90/M100 */ + { USB_DEVICE(0x046d, 0xc05a), .driver_info = USB_QUIRK_RESET_RESUME }, + ++ /* 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 +@@ -36,4 +36,7 @@ + /* device can't handle device_qualifier descriptor requests */ + #define USB_QUIRK_DEVICE_QUALIFIER 0x00000100 + ++/* device can't handle Link Power Management */ ++#define USB_QUIRK_NO_LPM BIT(10) ++ + #endif /* __LINUX_USB_QUIRKS_H */ diff --git a/queue-3.14/usb-cdc_acm-ignore-infineon-flash-loader-utility.patch b/queue-3.14/usb-cdc_acm-ignore-infineon-flash-loader-utility.patch new file mode 100644 index 00000000000..125fee6365a --- /dev/null +++ b/queue-3.14/usb-cdc_acm-ignore-infineon-flash-loader-utility.patch @@ -0,0 +1,76 @@ +From f33a7f72e5fc033daccbb8d4753d7c5c41a4d67b Mon Sep 17 00:00:00 2001 +From: Jonas Jonsson +Date: Sun, 22 Nov 2015 11:47:17 +0100 +Subject: USB: cdc_acm: Ignore Infineon Flash Loader utility + +From: Jonas Jonsson + +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 +Tested-by: Daniele Palmas +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -1810,6 +1810,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.14/usb-cp210x-remove-cp2110-id-from-compatibility-list.patch b/queue-3.14/usb-cp210x-remove-cp2110-id-from-compatibility-list.patch new file mode 100644 index 00000000000..8701037a996 --- /dev/null +++ b/queue-3.14/usb-cp210x-remove-cp2110-id-from-compatibility-list.patch @@ -0,0 +1,30 @@ +From 7c90e610b60cd1ed6abafd806acfaedccbbe52d1 Mon Sep 17 00:00:00 2001 +From: Konstantin Shkolnyy +Date: Tue, 10 Nov 2015 16:40:13 -0600 +Subject: USB: cp210x: Remove CP2110 ID from compatibility list + +From: Konstantin Shkolnyy + +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 +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + 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.14/usb-serial-another-infineon-flash-loader-usb-id.patch b/queue-3.14/usb-serial-another-infineon-flash-loader-usb-id.patch new file mode 100644 index 00000000000..a732c1d3865 --- /dev/null +++ b/queue-3.14/usb-serial-another-infineon-flash-loader-usb-id.patch @@ -0,0 +1,33 @@ +From a0e80fbd56b4573de997c9a088a33abbc1121400 Mon Sep 17 00:00:00 2001 +From: Jonas Jonsson +Date: Sun, 22 Nov 2015 11:47:18 +0100 +Subject: USB: serial: Another Infineon flash loader USB ID + +From: Jonas Jonsson + +commit a0e80fbd56b4573de997c9a088a33abbc1121400 upstream. + +The flash loader has been seen on a Telit UE910 modem. The flash loader +is a bit special, it presents both an ACM and CDC Data interface but +only the latter is useful. Unless a magic string is sent to the device +it will disappear and the regular modem device appears instead. + +Signed-off-by: Jonas Jonsson +Tested-by: Daniele Palmas +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/usb-serial-simple.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/usb-serial-simple.c ++++ b/drivers/usb/serial/usb-serial-simple.c +@@ -47,6 +47,7 @@ DEVICE(funsoft, FUNSOFT_IDS); + + /* Infineon Flashloader driver */ + #define FLASHLOADER_IDS() \ ++ { USB_DEVICE_INTERFACE_CLASS(0x058b, 0x0041, USB_CLASS_CDC_DATA) }, \ + { USB_DEVICE(0x8087, 0x0716) } + DEVICE(flashloader, FLASHLOADER_IDS); + diff --git a/queue-3.14/usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch b/queue-3.14/usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch new file mode 100644 index 00000000000..b48d8a0e414 --- /dev/null +++ b/queue-3.14/usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch @@ -0,0 +1,33 @@ +From 5377adb092664d336ac212499961cac5e8728794 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +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 + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -116,7 +116,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.14/usb-whci-hcd-add-check-for-dma-mapping-error.patch b/queue-3.14/usb-whci-hcd-add-check-for-dma-mapping-error.patch new file mode 100644 index 00000000000..1021ae035ec --- /dev/null +++ b/queue-3.14/usb-whci-hcd-add-check-for-dma-mapping-error.patch @@ -0,0 +1,33 @@ +From f9fa1887dcf26bd346665a6ae3d3f53dec54cba1 Mon Sep 17 00:00:00 2001 +From: Alexey Khoroshilov +Date: Sat, 21 Nov 2015 00:36:44 +0300 +Subject: USB: whci-hcd: add check for dma mapping error + +From: Alexey Khoroshilov + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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);