From: Greg Kroah-Hartman Date: Thu, 17 Dec 2015 23:01:09 +0000 (-0800) Subject: 4.1-stable patches X-Git-Tag: v3.10.95~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=363f84230fe0b951b78c56dcef23ac957fe6e062;p=thirdparty%2Fkernel%2Fstable-queue.git 4.1-stable patches added patches: usb-add-quirk-for-devices-with-broken-lpm.patch usb-cdc_acm-ignore-infineon-flash-loader-utility.patch usb-core-hub-fix-bos-null-pointer-kernel-panic.patch usb-cp210x-remove-cp2110-id-from-compatibility-list.patch usb-gadget-pxa27x-fix-suspend-callback.patch usb-musb-usb_ti_cppi41_dma-requires-dmaengine-support.patch usb-serial-another-infineon-flash-loader-usb-id.patch usb-storage-fix-scsi-sd-failure-invalid-field-in-cdb-for-usb-adapter-jmicron.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-4.1/series b/queue-4.1/series index 0b41a9b008b..615d09bfa65 100644 --- a/queue-4.1/series +++ b/queue-4.1/series @@ -1,2 +1,12 @@ tpm-tpm_tis-fix-tpm_tis-acpi-detection-issue-with-tpm-2.0.patch toshiba_acpi-initialize-hotkey_event_type-variable.patch +usb-cdc_acm-ignore-infineon-flash-loader-utility.patch +usb-serial-another-infineon-flash-loader-usb-id.patch +usb-storage-fix-scsi-sd-failure-invalid-field-in-cdb-for-usb-adapter-jmicron.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-gadget-pxa27x-fix-suspend-callback.patch +usb-musb-usb_ti_cppi41_dma-requires-dmaengine-support.patch +usb-core-hub-fix-bos-null-pointer-kernel-panic.patch +usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch diff --git a/queue-4.1/usb-add-quirk-for-devices-with-broken-lpm.patch b/queue-4.1/usb-add-quirk-for-devices-with-broken-lpm.patch new file mode 100644 index 00000000000..3e7176e4998 --- /dev/null +++ b/queue-4.1/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 +@@ -124,6 +124,10 @@ struct usb_hub *usb_hub_to_struct_hub(st + + 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. + */ +@@ -4493,6 +4497,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) { +@@ -4691,7 +4697,6 @@ static void hub_port_connect(struct usb_ + 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 +@@ -199,6 +199,12 @@ static const struct usb_device_id usb_qu + { USB_DEVICE(0x1a0a, 0x0200), .driver_info = + USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, + ++ /* 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 +@@ -47,4 +47,7 @@ + /* device generates spurious wakeup, ignore remote wakeup capability */ + #define USB_QUIRK_IGNORE_REMOTE_WAKEUP BIT(9) + ++/* device can't handle Link Power Management */ ++#define USB_QUIRK_NO_LPM BIT(10) ++ + #endif /* __LINUX_USB_QUIRKS_H */ diff --git a/queue-4.1/usb-cdc_acm-ignore-infineon-flash-loader-utility.patch b/queue-4.1/usb-cdc_acm-ignore-infineon-flash-loader-utility.patch new file mode 100644 index 00000000000..fc75f43c304 --- /dev/null +++ b/queue-4.1/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 +@@ -1848,6 +1848,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-4.1/usb-core-hub-fix-bos-null-pointer-kernel-panic.patch b/queue-4.1/usb-core-hub-fix-bos-null-pointer-kernel-panic.patch new file mode 100644 index 00000000000..0a2bbd9d8b4 --- /dev/null +++ b/queue-4.1/usb-core-hub-fix-bos-null-pointer-kernel-panic.patch @@ -0,0 +1,102 @@ +From 464ad8c43a9ead98c2b0eaed86bea727f2ad106e Mon Sep 17 00:00:00 2001 +From: Hans Yang +Date: Tue, 1 Dec 2015 16:54:59 +0800 +Subject: usb: core : hub: Fix BOS 'NULL pointer' kernel panic + +From: Hans Yang + +commit 464ad8c43a9ead98c2b0eaed86bea727f2ad106e upstream. + +When a USB 3.0 mass storage device is disconnected in transporting +state, storage device driver may handle it as a transport error and +reset the device by invoking usb_reset_and_verify_device() +and following could happen: + +in usb_reset_and_verify_device(): + udev->bos = NULL; + +For U1/U2 enabled devices, driver will disable LPM, and in some +conditions: + from usb_unlocked_disable_lpm() + --> usb_disable_lpm() + --> usb_enable_lpm() + udev->bos->ss_cap->bU1devExitLat; + +And it causes 'NULL pointer' and 'kernel panic': + +[ 157.976257] Unable to handle kernel NULL pointer dereference +at virtual address 00000010 +... +[ 158.026400] PC is at usb_enable_link_state+0x34/0x2e0 +[ 158.031442] LR is at usb_enable_lpm+0x98/0xac +... +[ 158.137368] [] usb_enable_link_state+0x34/0x2e0 +[ 158.143451] [] usb_enable_lpm+0x94/0xac +[ 158.148840] [] usb_disable_lpm+0xa8/0xb4 +... +[ 158.214954] Kernel panic - not syncing: Fatal exception + +This commit moves 'udev->bos = NULL' behind usb_unlocked_disable_lpm() +to prevent from NULL pointer access. + +Issue can be reproduced by following setup: +1) A SS pen drive behind a SS hub connected to the host. +2) Transporting data between the pen drive and the host. +3) Abruptly disconnect hub and pen drive from host. +4) With a chance it crashes. + +Signed-off-by: Hans Yang +Acked-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/hub.c | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) + +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -5312,9 +5312,6 @@ static int usb_reset_and_verify_device(s + if (udev->usb2_hw_lpm_enabled == 1) + usb_set_usb2_hardware_lpm(udev, 0); + +- bos = udev->bos; +- udev->bos = NULL; +- + /* Disable LPM and LTM while we reset the device and reinstall the alt + * settings. Device-initiated LPM settings, and system exit latency + * settings are cleared when the device is reset, so we have to set +@@ -5323,15 +5320,18 @@ static int usb_reset_and_verify_device(s + ret = usb_unlocked_disable_lpm(udev); + if (ret) { + dev_err(&udev->dev, "%s Failed to disable LPM\n.", __func__); +- goto re_enumerate; ++ goto re_enumerate_no_bos; + } + ret = usb_disable_ltm(udev); + if (ret) { + dev_err(&udev->dev, "%s Failed to disable LTM\n.", + __func__); +- goto re_enumerate; ++ goto re_enumerate_no_bos; + } + ++ bos = udev->bos; ++ udev->bos = NULL; ++ + for (i = 0; i < SET_CONFIG_TRIES; ++i) { + + /* ep0 maxpacket size may change; let the HCD know about it. +@@ -5428,10 +5428,11 @@ done: + return 0; + + re_enumerate: +- /* LPM state doesn't matter when we're about to destroy the device. */ +- hub_port_logical_disconnect(parent_hub, port1); + usb_release_bos_descriptor(udev); + udev->bos = bos; ++re_enumerate_no_bos: ++ /* LPM state doesn't matter when we're about to destroy the device. */ ++ hub_port_logical_disconnect(parent_hub, port1); + return -ENODEV; + } + diff --git a/queue-4.1/usb-cp210x-remove-cp2110-id-from-compatibility-list.patch b/queue-4.1/usb-cp210x-remove-cp2110-id-from-compatibility-list.patch new file mode 100644 index 00000000000..8701037a996 --- /dev/null +++ b/queue-4.1/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-4.1/usb-gadget-pxa27x-fix-suspend-callback.patch b/queue-4.1/usb-gadget-pxa27x-fix-suspend-callback.patch new file mode 100644 index 00000000000..0df8d10e68e --- /dev/null +++ b/queue-4.1/usb-gadget-pxa27x-fix-suspend-callback.patch @@ -0,0 +1,40 @@ +From 391e6dcb37857d5659b53def2f41e2f56850d33c Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Wed, 18 Nov 2015 17:06:00 -0600 +Subject: usb: gadget: pxa27x: fix suspend callback + +From: Felipe Balbi + +commit 391e6dcb37857d5659b53def2f41e2f56850d33c upstream. + +pxa27x disconnects pullups on suspend but doesn't +notify the gadget driver about it, so gadget driver +can't disable the endpoints it was using. + +This causes problems on resume because gadget core +will think endpoints are still enabled and just +ignore the following usb_ep_enable(). + +Fix this problem by calling +gadget_driver->disconnect(). + +Tested-by: Robert Jarzmik +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/udc/pxa27x_udc.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/gadget/udc/pxa27x_udc.c ++++ b/drivers/usb/gadget/udc/pxa27x_udc.c +@@ -2535,6 +2535,9 @@ static int pxa_udc_suspend(struct platfo + udc->pullup_resume = udc->pullup_on; + dplus_pullup(udc, 0); + ++ if (udc->driver) ++ udc->driver->disconnect(&udc->gadget); ++ + return 0; + } + diff --git a/queue-4.1/usb-musb-usb_ti_cppi41_dma-requires-dmaengine-support.patch b/queue-4.1/usb-musb-usb_ti_cppi41_dma-requires-dmaengine-support.patch new file mode 100644 index 00000000000..71aa12dceca --- /dev/null +++ b/queue-4.1/usb-musb-usb_ti_cppi41_dma-requires-dmaengine-support.patch @@ -0,0 +1,39 @@ +From 183e53e8ddf4165c3763181682189362d6b403f7 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 18 Nov 2015 17:18:40 +0100 +Subject: usb: musb: USB_TI_CPPI41_DMA requires dmaengine support + +From: Arnd Bergmann + +commit 183e53e8ddf4165c3763181682189362d6b403f7 upstream. + +The CPPI-4.1 driver selects TI_CPPI41, which is a dmaengine +driver and that may not be available when CONFIG_DMADEVICES +is not set: + +warning: (USB_TI_CPPI41_DMA) selects TI_CPPI41 which has unmet direct dependencies (DMADEVICES && ARCH_OMAP) + +This adds an extra dependency to avoid generating warnings in randconfig +builds. Ideally we'd remove the 'select' statement, but that has the +potential to break defconfig files. + +Signed-off-by: Arnd Bergmann +Fixes: 411dd19c682d ("usb: musb: Kconfig: Select the DMA driver if DMA mode of MUSB is enabled") +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/musb/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/musb/Kconfig ++++ b/drivers/usb/musb/Kconfig +@@ -147,7 +147,7 @@ config USB_TI_CPPI_DMA + + config USB_TI_CPPI41_DMA + bool 'TI CPPI 4.1 (AM335x)' +- depends on ARCH_OMAP ++ depends on ARCH_OMAP && DMADEVICES + select TI_CPPI41 + + config USB_TUSB_OMAP_DMA diff --git a/queue-4.1/usb-serial-another-infineon-flash-loader-usb-id.patch b/queue-4.1/usb-serial-another-infineon-flash-loader-usb-id.patch new file mode 100644 index 00000000000..7107da03dc7 --- /dev/null +++ b/queue-4.1/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 +@@ -53,6 +53,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-4.1/usb-storage-fix-scsi-sd-failure-invalid-field-in-cdb-for-usb-adapter-jmicron.patch b/queue-4.1/usb-storage-fix-scsi-sd-failure-invalid-field-in-cdb-for-usb-adapter-jmicron.patch new file mode 100644 index 00000000000..8e36b0640d5 --- /dev/null +++ b/queue-4.1/usb-storage-fix-scsi-sd-failure-invalid-field-in-cdb-for-usb-adapter-jmicron.patch @@ -0,0 +1,59 @@ +From 9fa62b1a31c96715aef34f25000e882ed4ac4876 Mon Sep 17 00:00:00 2001 +From: Dmitry Katsubo +Date: Fri, 20 Nov 2015 01:30:44 +0100 +Subject: usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron + +From: Dmitry Katsubo + +commit 9fa62b1a31c96715aef34f25000e882ed4ac4876 upstream. + +The patch extends the family of SATA-to-USB JMicron adapters that need +FUA to be disabled and applies the same policy for uas driver. +See details in http://unix.stackexchange.com/questions/237204/ + +Signed-off-by: Dmitry Katsubo +Tested-by: Dmitry Katsubo +Acked-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/uas.c | 4 ++++ + drivers/usb/storage/unusual_devs.h | 2 +- + drivers/usb/storage/unusual_uas.h | 2 +- + 3 files changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/usb/storage/uas.c ++++ b/drivers/usb/storage/uas.c +@@ -796,6 +796,10 @@ static int uas_slave_configure(struct sc + if (devinfo->flags & US_FL_NO_REPORT_OPCODES) + sdev->no_report_opcodes = 1; + ++ /* A few buggy USB-ATA bridges don't understand FUA */ ++ if (devinfo->flags & US_FL_BROKEN_FUA) ++ sdev->broken_fua = 1; ++ + scsi_change_queue_depth(sdev, devinfo->qdepth - 2); + return 0; + } +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -1987,7 +1987,7 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x + US_FL_IGNORE_RESIDUE ), + + /* Reported by Michael Büsch */ +-UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0114, ++UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0116, + "JMicron", + "USB to ATA/ATAPI Bridge", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, +--- a/drivers/usb/storage/unusual_uas.h ++++ b/drivers/usb/storage/unusual_uas.h +@@ -132,7 +132,7 @@ UNUSUAL_DEV(0x152d, 0x0567, 0x0000, 0x99 + "JMicron", + "JMS567", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, +- US_FL_NO_REPORT_OPCODES), ++ US_FL_BROKEN_FUA | US_FL_NO_REPORT_OPCODES), + + /* Reported-by: Hans de Goede */ + UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999, diff --git a/queue-4.1/usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch b/queue-4.1/usb-use-the-usb_ss_mult-macro-to-decode-burst-multiplier-for-log-message.patch new file mode 100644 index 00000000000..8e358cbde08 --- /dev/null +++ b/queue-4.1/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 +@@ -115,7 +115,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-4.1/usb-whci-hcd-add-check-for-dma-mapping-error.patch b/queue-4.1/usb-whci-hcd-add-check-for-dma-mapping-error.patch new file mode 100644 index 00000000000..1021ae035ec --- /dev/null +++ b/queue-4.1/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);