From: Greg Kroah-Hartman Date: Mon, 18 Jun 2012 19:19:25 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.36~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d6d9a3f464472b5b777484beebf1c54906fd399;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: usb-add-no_d3_during_sleep-flag-and-revert-151b61284776be2.patch usb-cdc-acm-fix-devices-not-unthrottled-on-open.patch usb-fix-gathering-of-interface-associations.patch usb-ftdi-sio-add-support-for-rt-systems-usb-rts01-serial.patch usb-mct_u232-fix-incorrect-tiocmset-return.patch usb-qcserial-add-sierra-wireless-device-ids.patch usb-serial-cp210x-add-optris-ms-pro-usb-id.patch usb-serial-enforce-usb-driver-and-usb-serial-driver-match.patch usb-serial-sierra-add-support-for-sierra-wireless-aircard-320u-modem.patch --- diff --git a/queue-3.0/series b/queue-3.0/series index eb152e9bc43..b6d65f06f24 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -8,5 +8,13 @@ usb-option-fix-memory-leak.patch usb-option-fix-port-data-abuse.patch hfsplus-fix-overflow-in-sector-calculations-in-hfsplus_submit_bio.patch xhci-increase-the-timeout-for-controller-save-restore-state-operation.patch -usb-storage-add-090c-1000-to-unusal-devs.patch usb-mos7840-fix-compilation-of-usb-serial-driver.patch +usb-qcserial-add-sierra-wireless-device-ids.patch +usb-mct_u232-fix-incorrect-tiocmset-return.patch +usb-serial-cp210x-add-optris-ms-pro-usb-id.patch +usb-ftdi-sio-add-support-for-rt-systems-usb-rts01-serial.patch +usb-add-no_d3_during_sleep-flag-and-revert-151b61284776be2.patch +usb-cdc-acm-fix-devices-not-unthrottled-on-open.patch +usb-serial-sierra-add-support-for-sierra-wireless-aircard-320u-modem.patch +usb-serial-enforce-usb-driver-and-usb-serial-driver-match.patch +usb-fix-gathering-of-interface-associations.patch diff --git a/queue-3.0/usb-add-no_d3_during_sleep-flag-and-revert-151b61284776be2.patch b/queue-3.0/usb-add-no_d3_during_sleep-flag-and-revert-151b61284776be2.patch new file mode 100644 index 00000000000..d5e828e353b --- /dev/null +++ b/queue-3.0/usb-add-no_d3_during_sleep-flag-and-revert-151b61284776be2.patch @@ -0,0 +1,165 @@ +From c2fb8a3fa25513de8fedb38509b1f15a5bbee47b Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Wed, 13 Jun 2012 11:20:19 -0400 +Subject: USB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alan Stern + +commit c2fb8a3fa25513de8fedb38509b1f15a5bbee47b upstream. + +This patch (as1558) fixes a problem affecting several ASUS computers: +The machine crashes or corrupts memory when going into suspend if the +ehci-hcd driver is bound to any controllers. Users have been forced +to unbind or unload ehci-hcd before putting their systems to sleep. + +After extensive testing, it was determined that the machines don't +like going into suspend when any EHCI controllers are in the PCI D3 +power state. Presumably this is a firmware bug, but there's nothing +we can do about it except to avoid putting the controllers in D3 +during system sleep. + +The patch adds a new flag to indicate whether the problem is present, +and avoids changing the controller's power state if the flag is set. +Runtime suspend is unaffected; this matters only for system suspend. +However as a side effect, the controller will not respond to remote +wakeup requests while the system is asleep. Hence USB wakeup is not +functional -- but of course, this is already true in the current state +of affairs. + +A similar patch has already been applied as commit +151b61284776be2d6f02d48c23c3625678960b97 (USB: EHCI: fix crash during +suspend on ASUS computers). The patch supersedes that one and reverts +it. There are two differences: + + The old patch added the flag at the USB level; this patch + adds it at the PCI level. + + The old patch applied to all chipsets with the same vendor, + subsystem vendor, and product IDs; this patch makes an + exception for a known-good system (based on DMI information). + +Signed-off-by: Alan Stern +Tested-by: Dâniel Fraga +Tested-by: Andrey Rahmatullin +Tested-by: Steven Rostedt +Reviewed-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/pci.c | 5 +++++ + drivers/pci/quirks.c | 26 ++++++++++++++++++++++++++ + drivers/usb/core/hcd-pci.c | 9 --------- + drivers/usb/host/ehci-pci.c | 8 -------- + include/linux/pci.h | 2 ++ + include/linux/usb/hcd.h | 2 -- + 6 files changed, 33 insertions(+), 19 deletions(-) + +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -1682,6 +1682,11 @@ int pci_prepare_to_sleep(struct pci_dev + if (target_state == PCI_POWER_ERROR) + return -EIO; + ++ /* Some devices mustn't be in D3 during system sleep */ ++ if (target_state == PCI_D3hot && ++ (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)) ++ return 0; ++ + pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); + + error = pci_set_power_state(dev, target_state); +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -2856,6 +2856,32 @@ static void __devinit disable_igfx_irq(s + DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq); + DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); + ++/* ++ * The Intel 6 Series/C200 Series chipset's EHCI controllers on many ++ * ASUS motherboards will cause memory corruption or a system crash ++ * if they are in D3 while the system is put into S3 sleep. ++ */ ++static void __devinit asus_ehci_no_d3(struct pci_dev *dev) ++{ ++ const char *sys_info; ++ static const char good_Asus_board[] = "P8Z68-V"; ++ ++ if (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP) ++ return; ++ if (dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK) ++ return; ++ sys_info = dmi_get_system_info(DMI_BOARD_NAME); ++ if (sys_info && memcmp(sys_info, good_Asus_board, ++ sizeof(good_Asus_board) - 1) == 0) ++ return; ++ ++ dev_info(&dev->dev, "broken D3 during system sleep on ASUS\n"); ++ dev->dev_flags |= PCI_DEV_FLAGS_NO_D3_DURING_SLEEP; ++ device_set_wakeup_capable(&dev->dev, false); ++} ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c26, asus_ehci_no_d3); ++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c2d, asus_ehci_no_d3); ++ + static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, + struct pci_fixup *end) + { +--- a/drivers/usb/core/hcd-pci.c ++++ b/drivers/usb/core/hcd-pci.c +@@ -495,15 +495,6 @@ static int hcd_pci_suspend_noirq(struct + + pci_save_state(pci_dev); + +- /* +- * Some systems crash if an EHCI controller is in D3 during +- * a sleep transition. We have to leave such controllers in D0. +- */ +- if (hcd->broken_pci_sleep) { +- dev_dbg(dev, "Staying in PCI D0\n"); +- return retval; +- } +- + /* If the root hub is dead rather than suspended, disallow remote + * wakeup. usb_hc_died() should ensure that both hosts are marked as + * dying, so we only need to check the primary roothub. +--- a/drivers/usb/host/ehci-pci.c ++++ b/drivers/usb/host/ehci-pci.c +@@ -144,14 +144,6 @@ static int ehci_pci_setup(struct usb_hcd + hcd->has_tt = 1; + tdi_reset(ehci); + } +- if (pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK) { +- /* EHCI #1 or #2 on 6 Series/C200 Series chipset */ +- if (pdev->device == 0x1c26 || pdev->device == 0x1c2d) { +- ehci_info(ehci, "broken D3 during system sleep on ASUS\n"); +- hcd->broken_pci_sleep = 1; +- device_set_wakeup_capable(&pdev->dev, false); +- } +- } + break; + case PCI_VENDOR_ID_TDI: + if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { +--- a/include/linux/pci.h ++++ b/include/linux/pci.h +@@ -174,6 +174,8 @@ enum pci_dev_flags { + PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, + /* Device configuration is irrevocably lost if disabled into D3 */ + PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, ++ /* Device causes system crash if in D3 during S3 sleep */ ++ PCI_DEV_FLAGS_NO_D3_DURING_SLEEP = (__force pci_dev_flags_t) 8, + }; + + enum pci_irq_reroute_variant { +--- a/include/linux/usb/hcd.h ++++ b/include/linux/usb/hcd.h +@@ -128,8 +128,6 @@ struct usb_hcd { + unsigned wireless:1; /* Wireless USB HCD */ + unsigned authorized_default:1; + unsigned has_tt:1; /* Integrated TT in root hub */ +- unsigned broken_pci_sleep:1; /* Don't put the +- controller in PCI-D3 for system sleep */ + + int irq; /* irq allocated */ + void __iomem *regs; /* device memory/io */ diff --git a/queue-3.0/usb-cdc-acm-fix-devices-not-unthrottled-on-open.patch b/queue-3.0/usb-cdc-acm-fix-devices-not-unthrottled-on-open.patch new file mode 100644 index 00000000000..7728e6eb743 --- /dev/null +++ b/queue-3.0/usb-cdc-acm-fix-devices-not-unthrottled-on-open.patch @@ -0,0 +1,40 @@ +From 6c4707f3f8c44ec18282e1c014c80e1c257042f9 Mon Sep 17 00:00:00 2001 +From: Otto Meta +Date: Wed, 6 Jun 2012 18:46:21 +0200 +Subject: usb: cdc-acm: fix devices not unthrottled on open + +From: Otto Meta + +commit 6c4707f3f8c44ec18282e1c014c80e1c257042f9 upstream. + +Currently CDC-ACM devices stay throttled when their TTY is closed while +throttled, stalling further communication attempts after the next open. + +Unthrottling during open/activate got lost starting with kernel +3.0.0 and this patch reintroduces it. + +Signed-off-by: Otto Meta +Acked-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/class/cdc-acm.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/usb/class/cdc-acm.c ++++ b/drivers/usb/class/cdc-acm.c +@@ -498,6 +498,14 @@ static int acm_tty_open(struct tty_struc + + usb_autopm_put_interface(acm->control); + ++ /* ++ * Unthrottle device in case the TTY was closed while throttled. ++ */ ++ spin_lock_irq(&acm->read_lock); ++ acm->throttled = 0; ++ acm->throttle_req = 0; ++ spin_unlock_irq(&acm->read_lock); ++ + if (acm_submit_read_urbs(acm, GFP_KERNEL)) + goto bail_out; + diff --git a/queue-3.0/usb-fix-gathering-of-interface-associations.patch b/queue-3.0/usb-fix-gathering-of-interface-associations.patch new file mode 100644 index 00000000000..df881321b56 --- /dev/null +++ b/queue-3.0/usb-fix-gathering-of-interface-associations.patch @@ -0,0 +1,85 @@ +From b3a3dd074f7053ef824ad077e5331b52220ceba1 Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Tue, 12 Jun 2012 20:23:52 +0200 +Subject: USB: fix gathering of interface associations + +From: Daniel Mack + +commit b3a3dd074f7053ef824ad077e5331b52220ceba1 upstream. + +TEAC's UD-H01 (and probably other devices) have a gap in the interface +number allocation of their descriptors: + + Configuration Descriptor: + bLength 9 + bDescriptorType 2 + wTotalLength 220 + bNumInterfaces 3 + [...] + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 0 + bAlternateSetting 0 + [...] + Interface Association: + bLength 8 + bDescriptorType 11 + bFirstInterface 2 + bInterfaceCount 2 + bFunctionClass 1 Audio + bFunctionSubClass 0 + bFunctionProtocol 32 + iFunction 4 + Interface Descriptor: + bLength 9 + bDescriptorType 4 + bInterfaceNumber 2 + bAlternateSetting 0 + [...] + +Once a configuration is selected, usb_set_configuration() walks the +known interfaces of a given configuration and calls find_iad() on +each of them to set the interface association pointer the interface +is included in. + +The problem here is that the loop variable is taken for the interface +number in the comparison logic that gathers the association. Which is +fine as long as the descriptors are sane. + +In the case above, however, the logic gets out of sync and the +interface association fields of all interfaces beyond the interface +number gap are wrong. + +Fix this by passing the interface's bInterfaceNumber to find_iad() +instead. + +Signed-off-by: Daniel Mack +Reported-by: bEN +Reported-by: Ivan Perrone +Tested-by: ivan perrone +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/message.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/core/message.c ++++ b/drivers/usb/core/message.c +@@ -1803,7 +1803,6 @@ free_interfaces: + intfc = cp->intf_cache[i]; + intf->altsetting = intfc->altsetting; + intf->num_altsetting = intfc->num_altsetting; +- intf->intf_assoc = find_iad(dev, cp, i); + kref_get(&intfc->ref); + + alt = usb_altnum_to_altsetting(intf, 0); +@@ -1816,6 +1815,8 @@ free_interfaces: + if (!alt) + alt = &intf->altsetting[0]; + ++ intf->intf_assoc = ++ find_iad(dev, cp, alt->desc.bInterfaceNumber); + intf->cur_altsetting = alt; + usb_enable_interface(dev, intf, true); + intf->dev.parent = &dev->dev; diff --git a/queue-3.0/usb-ftdi-sio-add-support-for-rt-systems-usb-rts01-serial.patch b/queue-3.0/usb-ftdi-sio-add-support-for-rt-systems-usb-rts01-serial.patch new file mode 100644 index 00000000000..2153d8af4cb --- /dev/null +++ b/queue-3.0/usb-ftdi-sio-add-support-for-rt-systems-usb-rts01-serial.patch @@ -0,0 +1,43 @@ +From e00a54d772210d450e5c1a801534c3c8a448549f Mon Sep 17 00:00:00 2001 +From: Evan McNabb +Date: Fri, 25 May 2012 22:46:14 -0400 +Subject: USB: ftdi-sio: Add support for RT Systems USB-RTS01 serial + adapter + +From: Evan McNabb + +commit e00a54d772210d450e5c1a801534c3c8a448549f upstream. + +Add support for RT Systems USB-RTS01 USB to Serial adapter: +http://www.rtsystemsinc.com/Photos/USBRTS01.html + +Tested by controlling Icom IC-718 amateur radio transceiver via hamlib. + +Signed-off-by: Evan McNabb +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + drivers/usb/serial/ftdi_sio_ids.h | 1 + + 2 files changed, 2 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -735,6 +735,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, + { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, + { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) }, ++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_RTS01_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, + { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -784,6 +784,7 @@ + #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ + #define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ + #define RTSYSTEMS_CT29B_PID 0x9e54 /* CT29B Radio Cable */ ++#define RTSYSTEMS_RTS01_PID 0x9e57 /* USB-RTS01 Radio Cable */ + + + /* diff --git a/queue-3.0/usb-mct_u232-fix-incorrect-tiocmset-return.patch b/queue-3.0/usb-mct_u232-fix-incorrect-tiocmset-return.patch new file mode 100644 index 00000000000..af45d616410 --- /dev/null +++ b/queue-3.0/usb-mct_u232-fix-incorrect-tiocmset-return.patch @@ -0,0 +1,45 @@ +From 1aa3c63cf0a79153ee13c8f82e4eb6c40b66a161 Mon Sep 17 00:00:00 2001 +From: Alan Cox +Date: Tue, 22 May 2012 20:45:13 +0100 +Subject: USB: mct_u232: Fix incorrect TIOCMSET return + +From: Alan Cox + +commit 1aa3c63cf0a79153ee13c8f82e4eb6c40b66a161 upstream. + +The low level helper returns 1 on success. The ioctl should however return +0. As this is the only user of the helper return, make the helper return 0 or +an error code. + +Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43009 +Signed-off-by: Alan Cox +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/mct_u232.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/drivers/usb/serial/mct_u232.c ++++ b/drivers/usb/serial/mct_u232.c +@@ -359,13 +359,16 @@ static int mct_u232_set_modem_ctrl(struc + MCT_U232_SET_REQUEST_TYPE, + 0, 0, buf, MCT_U232_SET_MODEM_CTRL_SIZE, + WDR_TIMEOUT); +- if (rc < 0) +- dev_err(&serial->dev->dev, +- "Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc); ++ kfree(buf); ++ + dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr); + +- kfree(buf); +- return rc; ++ if (rc < 0) { ++ dev_err(&serial->dev->dev, ++ "Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc); ++ return rc; ++ } ++ return 0; + } /* mct_u232_set_modem_ctrl */ + + static int mct_u232_get_modem_stat(struct usb_serial *serial, diff --git a/queue-3.0/usb-qcserial-add-sierra-wireless-device-ids.patch b/queue-3.0/usb-qcserial-add-sierra-wireless-device-ids.patch new file mode 100644 index 00000000000..a48c681d692 --- /dev/null +++ b/queue-3.0/usb-qcserial-add-sierra-wireless-device-ids.patch @@ -0,0 +1,38 @@ +From c41444ccfa33a1c20efa319e554cb531576e64a2 Mon Sep 17 00:00:00 2001 +From: Bjørn Mork +Date: Thu, 24 May 2012 11:19:04 +0200 +Subject: USB: qcserial: Add Sierra Wireless device IDs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Bjørn Mork + +commit c41444ccfa33a1c20efa319e554cb531576e64a2 upstream. + +Some additional IDs found in the BSD/GPL licensed out-of-tree +GobiSerial driver from Sierra Wireless. + +Signed-off-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/qcserial.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/usb/serial/qcserial.c ++++ b/drivers/usb/serial/qcserial.c +@@ -104,7 +104,13 @@ static const struct usb_device_id id_tab + {USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */ + {USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */ + {USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */ ++ {USB_DEVICE(0x1199, 0x9010)}, /* Sierra Wireless Gobi 3000 QDL */ ++ {USB_DEVICE(0x1199, 0x9012)}, /* Sierra Wireless Gobi 3000 QDL */ + {USB_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */ ++ {USB_DEVICE(0x1199, 0x9014)}, /* Sierra Wireless Gobi 3000 QDL */ ++ {USB_DEVICE(0x1199, 0x9015)}, /* Sierra Wireless Gobi 3000 Modem device */ ++ {USB_DEVICE(0x1199, 0x9018)}, /* Sierra Wireless Gobi 3000 QDL */ ++ {USB_DEVICE(0x1199, 0x9019)}, /* Sierra Wireless Gobi 3000 Modem device */ + {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */ + {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */ + { } /* Terminating entry */ diff --git a/queue-3.0/usb-serial-cp210x-add-optris-ms-pro-usb-id.patch b/queue-3.0/usb-serial-cp210x-add-optris-ms-pro-usb-id.patch new file mode 100644 index 00000000000..f259d86b38b --- /dev/null +++ b/queue-3.0/usb-serial-cp210x-add-optris-ms-pro-usb-id.patch @@ -0,0 +1,26 @@ +From 5bbfa6f427c1d7244a5ee154ab8fa37265a5e049 Mon Sep 17 00:00:00 2001 +From: Mikko Tuumanen +Date: Fri, 1 Jun 2012 11:28:55 +0300 +Subject: USB: serial: cp210x: add Optris MS Pro usb id + +From: Mikko Tuumanen + +commit 5bbfa6f427c1d7244a5ee154ab8fa37265a5e049 upstream. + +Signed-off-by: Mikko Tuumanen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/cp210x.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -82,6 +82,7 @@ static const struct usb_device_id id_tab + { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */ + { USB_DEVICE(0x10C4, 0x806F) }, /* IMS USB to RS422 Converter Cable */ + { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ ++ { USB_DEVICE(0x10C4, 0x80C4) }, /* Cygnal Integrated Products, Inc., Optris infrared thermometer */ + { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ + { USB_DEVICE(0x10C4, 0x80DD) }, /* Tracient RFID */ + { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ diff --git a/queue-3.0/usb-serial-enforce-usb-driver-and-usb-serial-driver-match.patch b/queue-3.0/usb-serial-enforce-usb-driver-and-usb-serial-driver-match.patch new file mode 100644 index 00000000000..815726e987a --- /dev/null +++ b/queue-3.0/usb-serial-enforce-usb-driver-and-usb-serial-driver-match.patch @@ -0,0 +1,158 @@ +From 954c3f8a5f1b7716be9eee978b3bc85bae92d7c8 Mon Sep 17 00:00:00 2001 +From: Bjørn Mork +Date: Wed, 30 May 2012 10:00:14 +0200 +Subject: USB: serial: Enforce USB driver and USB serial driver match +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Bjørn Mork + +commit 954c3f8a5f1b7716be9eee978b3bc85bae92d7c8 upstream. + +We need to make sure that the USB serial driver we find +matches the USB driver whose probe we are currently +executing. Otherwise we will end up with USB serial +devices bound to the correct serial driver but wrong +USB driver. + +An example of such cross-probing, where the usbserial_generic +USB driver has found the sierra serial driver: + +May 29 18:26:15 nemi kernel: [ 4442.559246] usbserial_generic 4-4:1.0: Sierra USB modem converter detected +May 29 18:26:20 nemi kernel: [ 4447.556747] usbserial_generic 4-4:1.2: Sierra USB modem converter detected +May 29 18:26:25 nemi kernel: [ 4452.557288] usbserial_generic 4-4:1.3: Sierra USB modem converter detected + +sysfs view of the same problem: + +bjorn@nemi:~$ ls -l /sys/bus/usb/drivers/sierra/ +total 0 +--w------- 1 root root 4096 May 29 18:23 bind +lrwxrwxrwx 1 root root 0 May 29 18:23 module -> ../../../../module/usbserial +--w------- 1 root root 4096 May 29 18:23 uevent +--w------- 1 root root 4096 May 29 18:23 unbind +bjorn@nemi:~$ ls -l /sys/bus/usb-serial/drivers/sierra/ +total 0 +--w------- 1 root root 4096 May 29 18:23 bind +lrwxrwxrwx 1 root root 0 May 29 18:23 module -> ../../../../module/sierra +-rw-r--r-- 1 root root 4096 May 29 18:23 new_id +lrwxrwxrwx 1 root root 0 May 29 18:32 ttyUSB0 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0/ttyUSB0 +lrwxrwxrwx 1 root root 0 May 29 18:32 ttyUSB1 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.2/ttyUSB1 +lrwxrwxrwx 1 root root 0 May 29 18:32 ttyUSB2 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.3/ttyUSB2 +--w------- 1 root root 4096 May 29 18:23 uevent +--w------- 1 root root 4096 May 29 18:23 unbind + +bjorn@nemi:~$ ls -l /sys/bus/usb/drivers/usbserial_generic/ +total 0 +lrwxrwxrwx 1 root root 0 May 29 18:33 4-4:1.0 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0 +lrwxrwxrwx 1 root root 0 May 29 18:33 4-4:1.2 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.2 +lrwxrwxrwx 1 root root 0 May 29 18:33 4-4:1.3 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.3 +--w------- 1 root root 4096 May 29 18:33 bind +lrwxrwxrwx 1 root root 0 May 29 18:33 module -> ../../../../module/usbserial +--w------- 1 root root 4096 May 29 18:22 uevent +--w------- 1 root root 4096 May 29 18:33 unbind +bjorn@nemi:~$ ls -l /sys/bus/usb-serial/drivers/generic/ +total 0 +--w------- 1 root root 4096 May 29 18:33 bind +lrwxrwxrwx 1 root root 0 May 29 18:33 module -> ../../../../module/usbserial +-rw-r--r-- 1 root root 4096 May 29 18:33 new_id +--w------- 1 root root 4096 May 29 18:22 uevent +--w------- 1 root root 4096 May 29 18:33 unbind + +So we end up with a mismatch between the USB driver and the +USB serial driver. The reason for the above is simple: The +USB driver probe will succeed if *any* registered serial +driver matches, and will use that serial driver for all +serial driver functions. + +This makes ref counting go wrong. We count the USB driver +as used, but not the USB serial driver. This may result +in Oops'es as demonstrated by Johan Hovold : + +[11811.646396] drivers/usb/serial/usb-serial.c: get_free_serial 1 +[11811.646443] drivers/usb/serial/usb-serial.c: get_free_serial - minor base = 0 +[11811.646460] drivers/usb/serial/usb-serial.c: usb_serial_probe - registering ttyUSB0 +[11811.646766] usb 6-1: pl2303 converter now attached to ttyUSB0 +[11812.264197] USB Serial deregistering driver FTDI USB Serial Device +[11812.264865] usbcore: deregistering interface driver ftdi_sio +[11812.282180] USB Serial deregistering driver pl2303 +[11812.283141] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0 +[11812.283272] usbcore: deregistering interface driver pl2303 +[11812.301056] USB Serial deregistering driver generic +[11812.301186] usbcore: deregistering interface driver usbserial_generic +[11812.301259] drivers/usb/serial/usb-serial.c: usb_serial_disconnect +[11812.301823] BUG: unable to handle kernel paging request at f8e7438c +[11812.301845] IP: [] usb_serial_disconnect+0xb5/0x100 [usbserial] +[11812.301871] *pde = 357ef067 *pte = 00000000 +[11812.301957] Oops: 0000 [#1] PREEMPT SMP +[11812.301983] Modules linked in: usbserial(-) [last unloaded: pl2303] +[11812.302008] +[11812.302019] Pid: 1323, comm: modprobe Tainted: G W 3.4.0-rc7+ #101 Dell Inc. Vostro 1520/0T816J +[11812.302115] EIP: 0060:[] EFLAGS: 00010246 CPU: 1 +[11812.302130] EIP is at usb_serial_disconnect+0xb5/0x100 [usbserial] +[11812.302141] EAX: f508a180 EBX: f508a180 ECX: 00000000 EDX: f8e74300 +[11812.302151] ESI: f5050800 EDI: 00000001 EBP: f5141e78 ESP: f5141e58 +[11812.302160] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 +[11812.302170] CR0: 8005003b CR2: f8e7438c CR3: 34848000 CR4: 000007d0 +[11812.302180] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 +[11812.302189] DR6: ffff0ff0 DR7: 00000400 +[11812.302199] Process modprobe (pid: 1323, ti=f5140000 task=f61e2bc0 task.ti=f5140000) +[11812.302209] Stack: +[11812.302216] f8e3be0f f8e3b29c f8e3ae00 00000000 f513641c f5136400 f513641c f507a540 +[11812.302325] f5141e98 c133d2c1 00000000 00000000 f509c400 f513641c f507a590 f5136450 +[11812.302372] f5141ea8 c12f0344 f513641c f507a590 f5141ebc c12f0c67 00000000 f507a590 +[11812.302419] Call Trace: +[11812.302439] [] usb_unbind_interface+0x51/0x190 +[11812.302456] [] __device_release_driver+0x64/0xb0 +[11812.302469] [] driver_detach+0x97/0xa0 +[11812.302483] [] bus_remove_driver+0x6c/0xe0 +[11812.302500] [] ? __mutex_unlock_slowpath+0xcd/0x140 +[11812.302514] [] driver_unregister+0x49/0x80 +[11812.302528] [] ? printk+0x1d/0x1f +[11812.302540] [] usb_deregister+0x5d/0xb0 +[11812.302557] [] ? usb_serial_deregister+0x45/0x50 [usbserial] +[11812.302575] [] usb_serial_deregister_drivers+0x2d/0x40 [usbserial] +[11812.302593] [] usb_serial_generic_deregister+0x12/0x20 [usbserial] +[11812.302611] [] usb_serial_exit+0x8/0x32 [usbserial] +[11812.302716] [] sys_delete_module+0x158/0x260 +[11812.302730] [] ? mntput+0x1e/0x30 +[11812.302746] [] ? sysenter_exit+0xf/0x18 +[11812.302746] [] ? trace_hardirqs_on_caller+0xec/0x170 +[11812.302746] [] sysenter_do_call+0x12/0x36 +[11812.302746] Code: 24 02 00 00 e8 dd f3 20 c8 f6 86 74 02 00 00 02 74 b4 8d 86 4c 02 00 00 47 e8 78 55 4b c8 0f b6 43 0e 39 f8 7f a9 8b 53 04 89 d8 92 8c 00 00 00 89 d8 e8 0e ff ff ff 8b 45 f0 c7 44 24 04 2f +[11812.302746] EIP: [] usb_serial_disconnect+0xb5/0x100 [usbserial] SS:ESP 0068:f5141e58 +[11812.302746] CR2: 00000000f8e7438c + +Fix by only evaluating serial drivers pointing back to the +USB driver we are currently probing. This still allows two +or more drivers to match the same device, running their +serial driver probes to sort out which one to use. + +Signed-off-by: Bjørn Mork +Reviewed-by: Felipe Balbi +Tested-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/usb-serial.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/usb-serial.c ++++ b/drivers/usb/serial/usb-serial.c +@@ -669,12 +669,14 @@ exit: + static struct usb_serial_driver *search_serial_device( + struct usb_interface *iface) + { +- const struct usb_device_id *id; ++ const struct usb_device_id *id = NULL; + struct usb_serial_driver *drv; ++ struct usb_driver *driver = to_usb_driver(iface->dev.driver); + + /* Check if the usb id matches a known device */ + list_for_each_entry(drv, &usb_serial_driver_list, driver_list) { +- id = get_iface_id(drv, iface); ++ if (drv->usb_driver == driver) ++ id = get_iface_id(drv, iface); + if (id) + return drv; + } diff --git a/queue-3.0/usb-serial-sierra-add-support-for-sierra-wireless-aircard-320u-modem.patch b/queue-3.0/usb-serial-sierra-add-support-for-sierra-wireless-aircard-320u-modem.patch new file mode 100644 index 00000000000..dc152121bba --- /dev/null +++ b/queue-3.0/usb-serial-sierra-add-support-for-sierra-wireless-aircard-320u-modem.patch @@ -0,0 +1,31 @@ +From 19a3dd1575e954e8c004413bee3e12d3962f2525 Mon Sep 17 00:00:00 2001 +From: Tom Cassidy +Date: Wed, 6 Jun 2012 17:08:48 +1000 +Subject: USB: serial: sierra: Add support for Sierra Wireless AirCard 320U modem + +From: Tom Cassidy + +commit 19a3dd1575e954e8c004413bee3e12d3962f2525 upstream. + +Add support for Sierra Wireless AirCard 320U modem + +Signed-off-by: Tomas Cassidy +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/sierra.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/serial/sierra.c ++++ b/drivers/usb/serial/sierra.c +@@ -304,6 +304,10 @@ static const struct usb_device_id id_tab + { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + }, ++ /* AT&T Direct IP LTE modems */ ++ { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF), ++ .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist ++ }, + { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */ + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + }, diff --git a/queue-3.0/usb-storage-add-090c-1000-to-unusal-devs.patch b/queue-3.0/usb-storage-add-090c-1000-to-unusal-devs.patch deleted file mode 100644 index ef5b93d057d..00000000000 --- a/queue-3.0/usb-storage-add-090c-1000-to-unusal-devs.patch +++ /dev/null @@ -1,49 +0,0 @@ -From afff07e61a5243e14ee3f0a272a0380cd744a8a3 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 13 Jun 2012 11:44:58 +0200 -Subject: usb-storage: Add 090c:1000 to unusal-devs - -From: Hans de Goede - -commit afff07e61a5243e14ee3f0a272a0380cd744a8a3 upstream. - -This device gives a bogus answer to get_capacity(16): -[ 8628.278614] scsi 8:0:0:0: Direct-Access USB 2.0 USB Flash Drive 1100 PQ: 0 ANSI: 4 -[ 8628.279452] sd 8:0:0:0: Attached scsi generic sg4 type 0 -[ 8628.280338] sd 8:0:0:0: [sdd] 35747322042253313 512-byte logical blocks: (18.3 EB/15.8 EiB) - -So set the quirk flag to avoid using get_capacity(16) with it: -[11731.386014] usb-storage 2-1.6:1.0: Quirks match for vid 090c pid 1000: 80000 -[11731.386075] scsi9 : usb-storage 2-1.6:1.0 -[11731.386172] usbcore: registered new interface driver usb-storage -[11731.386175] USB Mass Storage support registered. -[11732.387394] scsi 9:0:0:0: Direct-Access USB 2.0 USB Flash Drive 1100 PQ: 0 ANSI: 4 -[11732.388462] sd 9:0:0:0: Attached scsi generic sg3 type 0 -[11732.389432] sd 9:0:0:0: [sdc] 7975296 512-byte logical blocks: (4.08 GB/3.80 GiB) - -Which makes the capacity look a lot more sane :) - -Signed-off-by: Hans de Goede -Tested-by: Simon Raffeiner -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/usb/storage/unusual_devs.h | 7 +++++++ - 1 file changed, 7 insertions(+) - ---- a/drivers/usb/storage/unusual_devs.h -+++ b/drivers/usb/storage/unusual_devs.h -@@ -1107,6 +1107,13 @@ UNUSUAL_DEV( 0x090a, 0x1200, 0x0000, 0x9 - USB_SC_RBC, USB_PR_BULK, NULL, - 0 ), - -+/* Feiya QDI U2 DISK, reported by Hans de Goede */ -+UNUSUAL_DEV( 0x090c, 0x1000, 0x0000, 0xffff, -+ "Feiya", -+ "QDI U2 DISK", -+ USB_SC_DEVICE, USB_PR_DEVICE, NULL, -+ US_FL_NO_READ_CAPACITY_16 ), -+ - /* aeb */ - UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, - "Feiya",