From: Greg Kroah-Hartman Date: Thu, 3 Jun 2010 20:48:43 +0000 (-0700) Subject: .33 patches X-Git-Tag: v2.6.31.14~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c0d9851b698efdb64ad920f4d09d2b8a4118de96;p=thirdparty%2Fkernel%2Fstable-queue.git .33 patches --- diff --git a/queue-2.6.33/ar9170usb-add-a-couple-more-usb-ids.patch b/queue-2.6.33/ar9170usb-add-a-couple-more-usb-ids.patch new file mode 100644 index 00000000000..5c67e2dfc7a --- /dev/null +++ b/queue-2.6.33/ar9170usb-add-a-couple-more-usb-ids.patch @@ -0,0 +1,56 @@ +From 94d0bbe849190255b93fede8eb46809a38f9b8bf Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Tue, 13 Apr 2010 18:10:26 +0200 +Subject: ar9170usb: add a couple more USB IDs + +From: Christian Lamparter + +commit 94d0bbe849190255b93fede8eb46809a38f9b8bf upstream. + +This patch adds the following 5 entries to the usbid device table: + + * Netgear WNA1000 + * Proxim ORiNOCO Dual Band 802.11n USB Adapter + * 3Com Dual Band 802.11n USB Adapter + * H3C Dual Band 802.11n USB Adapter + * WNC Generic 11n USB dongle + +Signed-off-by: Christian Lamparter +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ar9170/usb.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/net/wireless/ath/ar9170/usb.c ++++ b/drivers/net/wireless/ath/ar9170/usb.c +@@ -66,18 +66,28 @@ static struct usb_device_id ar9170_usb_i + { USB_DEVICE(0x0cf3, 0x1001) }, + /* TP-Link TL-WN821N v2 */ + { USB_DEVICE(0x0cf3, 0x1002) }, ++ /* 3Com Dual Band 802.11n USB Adapter */ ++ { USB_DEVICE(0x0cf3, 0x1010) }, ++ /* H3C Dual Band 802.11n USB Adapter */ ++ { USB_DEVICE(0x0cf3, 0x1011) }, + /* Cace Airpcap NX */ + { USB_DEVICE(0xcace, 0x0300) }, + /* D-Link DWA 160 A1 */ + { USB_DEVICE(0x07d1, 0x3c10) }, + /* D-Link DWA 160 A2 */ + { USB_DEVICE(0x07d1, 0x3a09) }, ++ /* Netgear WNA1000 */ ++ { USB_DEVICE(0x0846, 0x9040) }, + /* Netgear WNDA3100 */ + { USB_DEVICE(0x0846, 0x9010) }, + /* Netgear WN111 v2 */ + { USB_DEVICE(0x0846, 0x9001) }, + /* Zydas ZD1221 */ + { USB_DEVICE(0x0ace, 0x1221) }, ++ /* Proxim ORiNOCO 802.11n USB */ ++ { USB_DEVICE(0x1435, 0x0804) }, ++ /* WNC Generic 11n USB Dongle */ ++ { USB_DEVICE(0x1435, 0x0326) }, + /* ZyXEL NWD271N */ + { USB_DEVICE(0x0586, 0x3417) }, + /* Z-Com UB81 BG */ diff --git a/queue-2.6.33/ar9170usb-fix-panic-triggered-by-undersized-rxstream-buffer.patch b/queue-2.6.33/ar9170usb-fix-panic-triggered-by-undersized-rxstream-buffer.patch new file mode 100644 index 00000000000..77fe07b4e10 --- /dev/null +++ b/queue-2.6.33/ar9170usb-fix-panic-triggered-by-undersized-rxstream-buffer.patch @@ -0,0 +1,48 @@ +From 879999cec9489f8942ebce3ec1b5f23ef948dda7 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Tue, 23 Mar 2010 21:51:14 +0100 +Subject: ar9170usb: fix panic triggered by undersized rxstream buffer + +From: Christian Lamparter + +commit 879999cec9489f8942ebce3ec1b5f23ef948dda7 upstream. + +While ar9170's USB transport packet size is currently set to 8KiB, +the PHY is capable of receiving AMPDUs with up to 64KiB. +Such a large frame will be split over several rx URBs and +exceed the previously allocated space for rx stream reconstruction. + +This patch increases the buffer size to 64KiB which is +in fact the phy & rx stream designed size limit. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=15591 +Reported-by: Christian Mehlis +Signed-off-by: Christian Lamparter +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ar9170/hw.h | 1 + + drivers/net/wireless/ath/ar9170/main.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ar9170/hw.h ++++ b/drivers/net/wireless/ath/ar9170/hw.h +@@ -424,5 +424,6 @@ enum ar9170_txq { + + #define AR9170_TXQ_DEPTH 32 + #define AR9170_TX_MAX_PENDING 128 ++#define AR9170_RX_STREAM_MAX_SIZE 65535 + + #endif /* __AR9170_HW_H */ +--- a/drivers/net/wireless/ath/ar9170/main.c ++++ b/drivers/net/wireless/ath/ar9170/main.c +@@ -2538,7 +2538,7 @@ void *ar9170_alloc(size_t priv_size) + * tends to split the streams into seperate rx descriptors. + */ + +- skb = __dev_alloc_skb(AR9170_MAX_RX_BUFFER_SIZE, GFP_KERNEL); ++ skb = __dev_alloc_skb(AR9170_RX_STREAM_MAX_SIZE, GFP_KERNEL); + if (!skb) + goto err_nomem; + diff --git a/queue-2.6.33/hid-add-the-gyr4101us-usb-id-to-hid-gyration.patch b/queue-2.6.33/hid-add-the-gyr4101us-usb-id-to-hid-gyration.patch new file mode 100644 index 00000000000..1814f945207 --- /dev/null +++ b/queue-2.6.33/hid-add-the-gyr4101us-usb-id-to-hid-gyration.patch @@ -0,0 +1,55 @@ +From c2fd1a4ebf9127c280d227acb635eb1df213439c Mon Sep 17 00:00:00 2001 +From: Cory Maccarrone +Date: Sat, 22 May 2010 13:00:28 -0700 +Subject: HID: Add the GYR4101US USB ID to hid-gyration + +From: Cory Maccarrone + +commit c2fd1a4ebf9127c280d227acb635eb1df213439c upstream. + +This change adds in the USB product ID for the Gyration +GYR4101US USB media center remote control. This remote +is similar enough to the other two devices that this driver +can be used without any other changes to get full support +for the remote. + +Signed-off-by: Cory Maccarrone +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-core.c | 1 + + drivers/hid/hid-gyration.c | 1 + + drivers/hid/hid-ids.h | 1 + + 3 files changed, 3 insertions(+) + +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -1305,6 +1305,7 @@ static const struct hid_device_id hid_bl + { HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) }, + { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, + { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) }, +--- a/drivers/hid/hid-gyration.c ++++ b/drivers/hid/hid-gyration.c +@@ -73,6 +73,7 @@ static int gyration_event(struct hid_dev + static const struct hid_device_id gyration_devices[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, + { } + }; + MODULE_DEVICE_TABLE(hid, gyration_devices); +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -256,6 +256,7 @@ + #define USB_VENDOR_ID_GYRATION 0x0c16 + #define USB_DEVICE_ID_GYRATION_REMOTE 0x0002 + #define USB_DEVICE_ID_GYRATION_REMOTE_2 0x0003 ++#define USB_DEVICE_ID_GYRATION_REMOTE_3 0x0008 + + #define USB_VENDOR_ID_HAPP 0x078b + #define USB_DEVICE_ID_UGCI_DRIVING 0x0010 diff --git a/queue-2.6.33/series b/queue-2.6.33/series index 5137aaeacd6..51b92c3877a 100644 --- a/queue-2.6.33/series +++ b/queue-2.6.33/series @@ -19,3 +19,24 @@ alsa-hda-use-lpib-for-acer-aspire-5110.patch alsa-hda-use-lpib-for-sony-vpcs11v9e.patch alsa-hda-use-lpib-for-a-shuttle-device.patch acpi-video-fix-acpi_backlight-video.patch +v4l-dvb-gspca-stv06xx-remove-the-046d-08da-from-the-stv06xx-driver.patch +hid-add-the-gyr4101us-usb-id-to-hid-gyration.patch +ar9170usb-add-a-couple-more-usb-ids.patch +ar9170usb-fix-panic-triggered-by-undersized-rxstream-buffer.patch +usb-visor-fix-memory-leak.patch +usb-cp210x-new-device-ids-11-new-device-ids.patch +usb-kobil-fix-memory-leak.patch +usb-option-add-pid-for-zte-product.patch +usb-option.c-add-pirelli-vid-pid-and-indicate-pirelli-s-modem-interface-is-0xff.patch +usb-serial-option-add-cinterion-device-id.patch +usb-option.c-olivetti-olicard100-support.patch +usb-ir-usb-fix-double-free.patch +usb-kl5usb105-fix-memory-leak.patch +usb-mxc-gadget-fix-bitfield-for-calculating-maximum-packet-size.patch +usb-unusual-dev-add-bad-sense-flag-for-appotech-ax203-based-picture-frames.patch +usb-fhci-cq_get-should-check-kfifo_out-s-return-value.patch +usb-ehci-clear-phcd-before-resuming.patch +usb-xhci-fix-issue-with-set-interface-after-stall.patch +usb-xhci-limit-bus-sg_tablesize-to-62-trbs.patch +usb-xhci-fix-check-for-room-on-the-ring.patch +usb-xhci-fix-wrong-usage-of-macro-trb_type.patch diff --git a/queue-2.6.33/usb-cp210x-new-device-ids-11-new-device-ids.patch b/queue-2.6.33/usb-cp210x-new-device-ids-11-new-device-ids.patch new file mode 100644 index 00000000000..261403f76a7 --- /dev/null +++ b/queue-2.6.33/usb-cp210x-new-device-ids-11-new-device-ids.patch @@ -0,0 +1,73 @@ +From eefd9029fde4d90d59804eeb54880ab8db5c1866 Mon Sep 17 00:00:00 2001 +From: Craig Shelley +Date: Sat, 15 May 2010 13:36:38 +0100 +Subject: USB: CP210x New Device IDs 11 New device IDs + +From: Craig Shelley + +commit eefd9029fde4d90d59804eeb54880ab8db5c1866 upstream. + +Signed-off-by: Craig Shelley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/cp210x.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/usb/serial/cp210x.c ++++ b/drivers/usb/serial/cp210x.c +@@ -61,6 +61,8 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */ + { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ + { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ ++ { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ ++ { USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */ + { USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */ + { USB_DEVICE(0x0FCF, 0x1004) }, /* Dynastream ANT2USB */ + { USB_DEVICE(0x0FCF, 0x1006) }, /* Dynastream ANT development board */ +@@ -72,9 +74,12 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10C4, 0x1601) }, /* Arkham Technology DS101 Adapter */ + { USB_DEVICE(0x10C4, 0x800A) }, /* SPORTident BSM7-D-USB main station */ + { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */ ++ { USB_DEVICE(0x10C4, 0x8044) }, /* Cygnal Debug Adapter */ ++ { USB_DEVICE(0x10C4, 0x804E) }, /* Software Bisque Paramount ME build-in converter */ + { USB_DEVICE(0x10C4, 0x8053) }, /* Enfora EDG1228 */ + { USB_DEVICE(0x10C4, 0x8054) }, /* Enfora GSM2228 */ + { 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, 0x80CA) }, /* Degree Controls Inc */ + { USB_DEVICE(0x10C4, 0x80DD) }, /* Tracient RFID */ +@@ -82,12 +87,15 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */ + { USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */ + { USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */ ++ { USB_DEVICE(0x10C4, 0x8149) }, /* West Mountain Radio Computerized Battery Analyzer */ + { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ + { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ + { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ ++ { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */ + { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */ + { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */ + { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */ ++ { USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */ + { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ + { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */ + { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */ +@@ -105,6 +113,7 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */ + { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ + { USB_DEVICE(0x10C4, 0xEA61) }, /* 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 */ + { USB_DEVICE(0x10C4, 0xF003) }, /* Elan Digital Systems USBpulse100 */ +@@ -115,6 +124,8 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */ + { USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */ + { USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */ ++ { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ ++ { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ + { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ + { USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */ + { } /* Terminating Entry */ diff --git a/queue-2.6.33/usb-ehci-clear-phcd-before-resuming.patch b/queue-2.6.33/usb-ehci-clear-phcd-before-resuming.patch new file mode 100644 index 00000000000..5478b019201 --- /dev/null +++ b/queue-2.6.33/usb-ehci-clear-phcd-before-resuming.patch @@ -0,0 +1,55 @@ +From eab80de01cb398419ef3305f35abcb367c647c8b Mon Sep 17 00:00:00 2001 +From: Alek Du +Date: Mon, 10 May 2010 11:17:49 +0800 +Subject: USB: EHCI: clear PHCD before resuming + +From: Alek Du + +commit eab80de01cb398419ef3305f35abcb367c647c8b upstream. + +This is a bug fix for PHCD (phy clock disable) low power feature: +After PHCD is set, any write to PORTSC register is illegal, so when +resume ports, clear PHCD bit first. + +Signed-off-by: Alek Du +Cc: David Brownell +Cc: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ehci-hub.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- a/drivers/usb/host/ehci-hub.c ++++ b/drivers/usb/host/ehci-hub.c +@@ -294,6 +294,16 @@ static int ehci_bus_resume (struct usb_h + /* manually resume the ports we suspended during bus_suspend() */ + i = HCS_N_PORTS (ehci->hcs_params); + while (i--) { ++ /* clear phy low power mode before resume */ ++ if (ehci->has_hostpc) { ++ u32 __iomem *hostpc_reg = ++ (u32 __iomem *)((u8 *)ehci->regs ++ + HOSTPC0 + 4 * (i & 0xff)); ++ temp = ehci_readl(ehci, hostpc_reg); ++ ehci_writel(ehci, temp & ~HOSTPC_PHCD, ++ hostpc_reg); ++ mdelay(5); ++ } + temp = ehci_readl(ehci, &ehci->regs->port_status [i]); + temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS); + if (test_bit(i, &ehci->bus_suspended) && +@@ -678,6 +688,13 @@ static int ehci_hub_control ( + if (temp & PORT_SUSPEND) { + if ((temp & PORT_PE) == 0) + goto error; ++ /* clear phy low power mode before resume */ ++ if (hostpc_reg) { ++ temp1 = ehci_readl(ehci, hostpc_reg); ++ ehci_writel(ehci, temp1 & ~HOSTPC_PHCD, ++ hostpc_reg); ++ mdelay(5); ++ } + /* resume signaling for 20 msec */ + temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS); + ehci_writel(ehci, temp | PORT_RESUME, diff --git a/queue-2.6.33/usb-fhci-cq_get-should-check-kfifo_out-s-return-value.patch b/queue-2.6.33/usb-fhci-cq_get-should-check-kfifo_out-s-return-value.patch new file mode 100644 index 00000000000..b665816d8c5 --- /dev/null +++ b/queue-2.6.33/usb-fhci-cq_get-should-check-kfifo_out-s-return-value.patch @@ -0,0 +1,55 @@ +From 7f1cccd3ec8789e52897bc34420ca81a5e2edeab Mon Sep 17 00:00:00 2001 +From: Anton Vorontsov +Date: Fri, 14 May 2010 18:33:18 +0400 +Subject: USB: FHCI: cq_get() should check kfifo_out()'s return value + +From: Anton Vorontsov + +commit 7f1cccd3ec8789e52897bc34420ca81a5e2edeab upstream. + +Since commit 7acd72eb85f1c7a15e8b5eb554994949241737f1 ("kfifo: rename +kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out..."), +kfifo_out() is marked __must_check, and that causes gcc to produce +lots of warnings like this: + + CC drivers/usb/host/fhci-mem.o +In file included from drivers/usb/host/fhci-hcd.c:34: +drivers/usb/host/fhci.h: In function 'cq_get': +drivers/usb/host/fhci.h:520: warning: ignoring return value of 'kfifo_out', declared with attribute warn_unused_result +... + +This patch fixes the issue by properly checking the return value. + +Signed-off-by: Anton Vorontsov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/fhci.h | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/drivers/usb/host/fhci.h ++++ b/drivers/usb/host/fhci.h +@@ -20,6 +20,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -515,9 +516,13 @@ static inline int cq_put(struct kfifo *k + + static inline void *cq_get(struct kfifo *kfifo) + { +- void *p = NULL; ++ unsigned int sz; ++ void *p; ++ ++ sz = kfifo_out(kfifo, (void *)&p, sizeof(p)); ++ if (sz != sizeof(p)) ++ return NULL; + +- kfifo_out(kfifo, (void *)&p, sizeof(p)); + return p; + } + diff --git a/queue-2.6.33/usb-ir-usb-fix-double-free.patch b/queue-2.6.33/usb-ir-usb-fix-double-free.patch new file mode 100644 index 00000000000..8ad3c9d869d --- /dev/null +++ b/queue-2.6.33/usb-ir-usb-fix-double-free.patch @@ -0,0 +1,37 @@ +From 2ff78c0c2b67120c8e503268da3f177cae2228a2 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Thu, 13 May 2010 21:02:00 +0200 +Subject: USB: ir-usb: fix double free + +From: Johan Hovold + +commit 2ff78c0c2b67120c8e503268da3f177cae2228a2 upstream. + +If the user specifies a custom bulk buffer size we get a double free at +port release. + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ir-usb.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/ir-usb.c ++++ b/drivers/usb/serial/ir-usb.c +@@ -312,6 +312,7 @@ static int ir_open(struct tty_struct *tt + kfree(port->read_urb->transfer_buffer); + port->read_urb->transfer_buffer = buffer; + port->read_urb->transfer_buffer_length = buffer_size; ++ port->bulk_in_buffer = buffer; + + buffer = kmalloc(buffer_size, GFP_KERNEL); + if (!buffer) { +@@ -321,6 +322,7 @@ static int ir_open(struct tty_struct *tt + kfree(port->write_urb->transfer_buffer); + port->write_urb->transfer_buffer = buffer; + port->write_urb->transfer_buffer_length = buffer_size; ++ port->bulk_out_buffer = buffer; + port->bulk_out_size = buffer_size; + } + diff --git a/queue-2.6.33/usb-kl5usb105-fix-memory-leak.patch b/queue-2.6.33/usb-kl5usb105-fix-memory-leak.patch new file mode 100644 index 00000000000..3d72bb3dce7 --- /dev/null +++ b/queue-2.6.33/usb-kl5usb105-fix-memory-leak.patch @@ -0,0 +1,28 @@ +From 313b0d80c1717ffe8f64b455a4d323996748b91a Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Wed, 19 May 2010 00:01:38 +0200 +Subject: USB: kl5usb105: fix memory leak + +From: Johan Hovold + +commit 313b0d80c1717ffe8f64b455a4d323996748b91a upstream. + +Private data was not freed on error path in startup. + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/kl5kusb105.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/kl5kusb105.c ++++ b/drivers/usb/serial/kl5kusb105.c +@@ -310,6 +310,7 @@ err_cleanup: + usb_free_urb(priv->write_urb_pool[j]); + } + } ++ kfree(priv); + usb_set_serial_port_data(serial->port[i], NULL); + } + return -ENOMEM; diff --git a/queue-2.6.33/usb-kobil-fix-memory-leak.patch b/queue-2.6.33/usb-kobil-fix-memory-leak.patch new file mode 100644 index 00000000000..81bfe43ccea --- /dev/null +++ b/queue-2.6.33/usb-kobil-fix-memory-leak.patch @@ -0,0 +1,32 @@ +From c0f631d1948658b27349545b2cbcb4b32f010c7a Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Sat, 15 May 2010 17:53:43 +0200 +Subject: USB: kobil: fix memory leak + +From: Johan Hovold + +commit c0f631d1948658b27349545b2cbcb4b32f010c7a upstream. + +An urb transfer buffer is allocated at every open but was never freed. + +This driver is a bit of a mess... + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/kobil_sct.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/kobil_sct.c ++++ b/drivers/usb/serial/kobil_sct.c +@@ -345,7 +345,8 @@ static void kobil_close(struct usb_seria + + /* FIXME: Add rts/dtr methods */ + if (port->write_urb) { +- usb_kill_urb(port->write_urb); ++ usb_poison_urb(port->write_urb); ++ kfree(port->write_urb->transfer_buffer); + usb_free_urb(port->write_urb); + port->write_urb = NULL; + } diff --git a/queue-2.6.33/usb-mxc-gadget-fix-bitfield-for-calculating-maximum-packet-size.patch b/queue-2.6.33/usb-mxc-gadget-fix-bitfield-for-calculating-maximum-packet-size.patch new file mode 100644 index 00000000000..71763fafeff --- /dev/null +++ b/queue-2.6.33/usb-mxc-gadget-fix-bitfield-for-calculating-maximum-packet-size.patch @@ -0,0 +1,33 @@ +From 88e3b59b5adce5b12e205af0e34d518ba0dcdc0c Mon Sep 17 00:00:00 2001 +From: Dinh Nguyen +Date: Tue, 4 May 2010 10:03:01 -0500 +Subject: USB: mxc: gadget: Fix bitfield for calculating maximum packet size + +From: Dinh Nguyen + +commit 88e3b59b5adce5b12e205af0e34d518ba0dcdc0c upstream. + +The max packet length bit mask used for isochronous endpoints +should be 0x7FF instead of 0x8FF. 0x8FF will actually clear +higher-order bits in the max packet length field. + +This patch applies to 2.6.34-rc6. + +Signed-off-by: Dinh Nguyen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/gadget/fsl_udc_core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/gadget/fsl_udc_core.c ++++ b/drivers/usb/gadget/fsl_udc_core.c +@@ -489,7 +489,7 @@ static int fsl_ep_enable(struct usb_ep * + case USB_ENDPOINT_XFER_ISOC: + /* Calculate transactions needed for high bandwidth iso */ + mult = (unsigned char)(1 + ((max >> 11) & 0x03)); +- max = max & 0x8ff; /* bit 0~10 */ ++ max = max & 0x7ff; /* bit 0~10 */ + /* 3 transactions at most */ + if (mult > 3) + goto en_done; diff --git a/queue-2.6.33/usb-option-add-pid-for-zte-product.patch b/queue-2.6.33/usb-option-add-pid-for-zte-product.patch new file mode 100644 index 00000000000..d4b3942623d --- /dev/null +++ b/queue-2.6.33/usb-option-add-pid-for-zte-product.patch @@ -0,0 +1,201 @@ +From a71ee85e1d74e862d68cc9b2f2ab6a806d2550c9 Mon Sep 17 00:00:00 2001 +From: zhao1980ming +Date: Mon, 3 May 2010 00:06:37 +0800 +Subject: USB: option: add PID for ZTE product + +From: zhao1980ming + +commit a71ee85e1d74e862d68cc9b2f2ab6a806d2550c9 upstream. + +this patch adds ZTE modem devices + +Signed-off-by: Joey +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 174 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 174 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -621,6 +621,180 @@ static struct usb_device_id option_ids[] + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0160, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1060, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1061, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1062, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1063, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1064, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1065, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1066, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1067, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1068, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1069, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1070, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1071, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1072, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1073, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1074, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1075, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1076, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1077, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1078, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1079, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1080, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1081, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1082, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1083, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1084, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1085, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1086, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1087, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1088, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1089, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1090, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1091, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1092, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1093, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1094, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1095, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1096, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1097, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1098, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1099, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1100, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1101, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1102, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1103, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1104, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1105, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1106, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1107, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1108, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1109, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1110, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1111, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1112, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1113, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1114, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1115, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1116, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1117, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1118, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1119, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1120, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1121, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1122, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1123, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1124, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1125, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1126, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1127, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1128, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1129, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1130, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1131, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1132, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1133, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1134, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1135, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1136, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1137, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1138, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1139, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1140, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1141, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1142, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1143, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1144, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1145, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1146, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1147, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1148, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1149, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1150, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1151, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1152, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1153, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1154, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1155, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1156, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1157, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1158, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1159, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1160, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1161, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1162, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1163, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1164, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1165, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1166, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1167, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1168, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1169, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1170, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1244, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1245, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1246, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1247, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1248, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1249, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1250, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1251, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1252, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1253, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1254, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1255, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1256, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1257, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1258, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1259, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1260, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1261, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1262, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1263, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1264, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1265, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1266, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1267, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1268, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1269, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1271, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1272, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1273, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1274, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1275, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1276, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1277, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1278, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1279, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1280, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1281, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1282, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1283, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1284, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1285, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1286, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1287, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1288, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1289, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1290, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1291, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1292, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1293, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1294, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1295, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1296, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1297, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, diff --git a/queue-2.6.33/usb-option.c-add-pirelli-vid-pid-and-indicate-pirelli-s-modem-interface-is-0xff.patch b/queue-2.6.33/usb-option.c-add-pirelli-vid-pid-and-indicate-pirelli-s-modem-interface-is-0xff.patch new file mode 100644 index 00000000000..958ed0af82c --- /dev/null +++ b/queue-2.6.33/usb-option.c-add-pirelli-vid-pid-and-indicate-pirelli-s-modem-interface-is-0xff.patch @@ -0,0 +1,88 @@ +From 33c387529b7931248c6637bf9720ac7504a0b28b Mon Sep 17 00:00:00 2001 +From: spark +Date: Fri, 5 Mar 2010 14:18:05 +0800 +Subject: USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff + +From: spark + +commit 33c387529b7931248c6637bf9720ac7504a0b28b upstream. + +Signed-off-by: spark +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -334,6 +334,24 @@ static int option_resume(struct usb_ser + #define ALCATEL_VENDOR_ID 0x1bbb + #define ALCATEL_PRODUCT_X060S 0x0000 + ++#define PIRELLI_VENDOR_ID 0x1266 ++#define PIRELLI_PRODUCT_C100_1 0x1002 ++#define PIRELLI_PRODUCT_C100_2 0x1003 ++#define PIRELLI_PRODUCT_1004 0x1004 ++#define PIRELLI_PRODUCT_1005 0x1005 ++#define PIRELLI_PRODUCT_1006 0x1006 ++#define PIRELLI_PRODUCT_1007 0x1007 ++#define PIRELLI_PRODUCT_1008 0x1008 ++#define PIRELLI_PRODUCT_1009 0x1009 ++#define PIRELLI_PRODUCT_100A 0x100a ++#define PIRELLI_PRODUCT_100B 0x100b ++#define PIRELLI_PRODUCT_100C 0x100c ++#define PIRELLI_PRODUCT_100D 0x100d ++#define PIRELLI_PRODUCT_100E 0x100e ++#define PIRELLI_PRODUCT_100F 0x100f ++#define PIRELLI_PRODUCT_1011 0x1011 ++#define PIRELLI_PRODUCT_1012 0x1012 ++ + /* Airplus products */ + #define AIRPLUS_VENDOR_ID 0x1011 + #define AIRPLUS_PRODUCT_MCD650 0x3198 +@@ -823,6 +841,24 @@ static struct usb_device_id option_ids[] + { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) }, + { USB_DEVICE(FOUR_G_SYSTEMS_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14) }, + { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) }, ++ /* Pirelli */ ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1004)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1005)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1006)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1007)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1008)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1009)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100A)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100B) }, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100C) }, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100D) }, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100E) }, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100F) }, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, ++ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, ++ + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); +@@ -945,12 +981,19 @@ static int option_probe(struct usb_seria + const struct usb_device_id *id) + { + struct option_intf_private *data; ++ + /* D-Link DWM 652 still exposes CD-Rom emulation interface in modem mode */ + if (serial->dev->descriptor.idVendor == DLINK_VENDOR_ID && + serial->dev->descriptor.idProduct == DLINK_PRODUCT_DWM_652 && + serial->interface->cur_altsetting->desc.bInterfaceClass == 0x8) + return -ENODEV; + ++ /* Bandrich modem and AT command interface is 0xff */ ++ if ((serial->dev->descriptor.idVendor == BANDRICH_VENDOR_ID || ++ serial->dev->descriptor.idVendor == PIRELLI_VENDOR_ID) && ++ serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff) ++ return -ENODEV; ++ + data = serial->private = kzalloc(sizeof(struct option_intf_private), GFP_KERNEL); + if (!data) + return -ENOMEM; diff --git a/queue-2.6.33/usb-option.c-olivetti-olicard100-support.patch b/queue-2.6.33/usb-option.c-olivetti-olicard100-support.patch new file mode 100644 index 00000000000..bd59b97533e --- /dev/null +++ b/queue-2.6.33/usb-option.c-olivetti-olicard100-support.patch @@ -0,0 +1,49 @@ +From 86234d4975ce084d14711283a3bfc69305f97602 Mon Sep 17 00:00:00 2001 +From: Nils Radtke +Date: Mon, 17 May 2010 14:14:11 +0200 +Subject: USB: option.c: OLIVETTI OLICARD100 support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Nils Radtke + +commit 86234d4975ce084d14711283a3bfc69305f97602 upstream. + +This patch adds support for an olivetti olicard100 HЅDPA usb-stick. + +This device is a zeroCD one with ID 0b3c:c700 that needs switching via +eject or usb-modeswitch with +MessageContent="5553424312345678000000000000061b000000030000000000000000000000". +After switching it has ID 0b3c:c000 and provides 5 serial ports ttyUSB[0-4]. +Port 0 (modem) and 4 are interrupt ports. + +Signed-off-by: Nils Radtke +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -366,6 +366,10 @@ static int option_resume(struct usb_ser + + #define CINTERION_VENDOR_ID 0x0681 + ++/* Olivetti products */ ++#define OLIVETTI_VENDOR_ID 0x0b3c ++#define OLIVETTI_PRODUCT_OLICARD100 0xc000 ++ + static struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -862,6 +866,8 @@ static struct usb_device_id option_ids[] + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, + + { USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) }, ++ ++ { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/queue-2.6.33/usb-serial-option-add-cinterion-device-id.patch b/queue-2.6.33/usb-serial-option-add-cinterion-device-id.patch new file mode 100644 index 00000000000..dde41eeed31 --- /dev/null +++ b/queue-2.6.33/usb-serial-option-add-cinterion-device-id.patch @@ -0,0 +1,37 @@ +From 6f44bcb60bfa58590142545096b64f44144f0bc1 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 27 Apr 2010 09:38:51 -0700 +Subject: USB: serial: option: add cinterion device id + +From: Greg Kroah-Hartman + +commit 6f44bcb60bfa58590142545096b64f44144f0bc1 upstream. + +This adds a device id for a Cinterion device. + +Reported-by: John Race +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -364,6 +364,8 @@ static int option_resume(struct usb_ser + #define HAIER_VENDOR_ID 0x201e + #define HAIER_PRODUCT_CE100 0x2009 + ++#define CINTERION_VENDOR_ID 0x0681 ++ + static struct usb_device_id option_ids[] = { + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, +@@ -859,6 +861,7 @@ static struct usb_device_id option_ids[] + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, + ++ { USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/queue-2.6.33/usb-unusual-dev-add-bad-sense-flag-for-appotech-ax203-based-picture-frames.patch b/queue-2.6.33/usb-unusual-dev-add-bad-sense-flag-for-appotech-ax203-based-picture-frames.patch new file mode 100644 index 00000000000..58068d73168 --- /dev/null +++ b/queue-2.6.33/usb-unusual-dev-add-bad-sense-flag-for-appotech-ax203-based-picture-frames.patch @@ -0,0 +1,44 @@ +From a78f4f1a16d87f3d33158d036af94e48e32f8aad Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Thu, 29 Apr 2010 12:59:04 +0200 +Subject: USB: unusual-dev: Add bad sense flag for Appotech ax203 based picture frames + +From: Hans de Goede + +commit a78f4f1a16d87f3d33158d036af94e48e32f8aad upstream. + +These Appotech controllers are found in Picture Frames, they provide a +(buggy) emulation of a cdrom drive which contains the windows software +Uploading of pictures happens over the corresponding /dev/sg device. + +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/unusual_devs.h | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -1858,6 +1858,21 @@ UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_IGNORE_RESIDUE ), + ++/* Reported by Hans de Goede ++ * These Appotech controllers are found in Picture Frames, they provide a ++ * (buggy) emulation of a cdrom drive which contains the windows software ++ * Uploading of pictures happens over the corresponding /dev/sg device. */ ++UNUSUAL_DEV( 0x1908, 0x1315, 0x0000, 0x0000, ++ "BUILDWIN", ++ "Photo Frame", ++ US_SC_DEVICE, US_PR_DEVICE, NULL, ++ US_FL_BAD_SENSE ), ++UNUSUAL_DEV( 0x1908, 0x1320, 0x0000, 0x0000, ++ "BUILDWIN", ++ "Photo Frame", ++ US_SC_DEVICE, US_PR_DEVICE, NULL, ++ US_FL_BAD_SENSE ), ++ + UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001, + "ST", + "2A", diff --git a/queue-2.6.33/usb-visor-fix-memory-leak.patch b/queue-2.6.33/usb-visor-fix-memory-leak.patch new file mode 100644 index 00000000000..6f04555c601 --- /dev/null +++ b/queue-2.6.33/usb-visor-fix-memory-leak.patch @@ -0,0 +1,29 @@ +From 199b113978015309dd02c69844c19a1be3f4dbcf Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Sat, 15 May 2010 17:53:48 +0200 +Subject: USB: visor: fix memory leak + +From: Johan Hovold + +commit 199b113978015309dd02c69844c19a1be3f4dbcf upstream. + +Fix memory leak for some devices (Sony Clie 3.5) due to port private +data not being freed on release. + +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/visor.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/visor.c ++++ b/drivers/usb/serial/visor.c +@@ -249,6 +249,7 @@ static struct usb_serial_driver clie_3_5 + .throttle = visor_throttle, + .unthrottle = visor_unthrottle, + .attach = clie_3_5_startup, ++ .release = visor_release, + .write = visor_write, + .write_room = visor_write_room, + .write_bulk_callback = visor_write_bulk_callback, diff --git a/queue-2.6.33/usb-xhci-fix-check-for-room-on-the-ring.patch b/queue-2.6.33/usb-xhci-fix-check-for-room-on-the-ring.patch new file mode 100644 index 00000000000..4bcef0b05db --- /dev/null +++ b/queue-2.6.33/usb-xhci-fix-check-for-room-on-the-ring.patch @@ -0,0 +1,65 @@ +From 44ebd037c54f80db3121ac9f5fe6e677b76e11d5 Mon Sep 17 00:00:00 2001 +From: Sarah Sharp +Date: Tue, 18 May 2010 16:05:26 -0700 +Subject: USB: xhci: Fix check for room on the ring. + +From: Sarah Sharp + +commit 44ebd037c54f80db3121ac9f5fe6e677b76e11d5 upstream. + +The length of the scatter gather list a driver can enqueue is limited by +the bus' sg_tablesize to 62 entries. Each entry will be described by at +least one transfer request block (TRB). If the entry's buffer crosses a +64KB boundary, then that entry will have to be described by two or more +TRBs. So even if the USB device driver respects sg_tablesize, the whole +scatter list may take more than 62 TRBs to describe, and won't fit on +the ring. + +Don't assume that an empty ring means there is enough room on the +transfer ring. The old code would unconditionally queue this too-large +transfer, and over write the beginning of the transfer. This would mean +the cycle bit was unchanged in those overwritten transfers, causing the +hardware to think it didn't own the TRBs, and the host would seem to +hang. + +Now drivers may see submit_urb() fail with -ENOMEM if the transfers are +too big to fit on the ring. + +Signed-off-by: Sarah Sharp +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-ring.c | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +--- a/drivers/usb/host/xhci-ring.c ++++ b/drivers/usb/host/xhci-ring.c +@@ -241,10 +241,27 @@ static int room_on_ring(struct xhci_hcd + int i; + union xhci_trb *enq = ring->enqueue; + struct xhci_segment *enq_seg = ring->enq_seg; ++ struct xhci_segment *cur_seg; ++ unsigned int left_on_ring; + + /* Check if ring is empty */ +- if (enq == ring->dequeue) ++ if (enq == ring->dequeue) { ++ /* Can't use link trbs */ ++ left_on_ring = TRBS_PER_SEGMENT - 1; ++ for (cur_seg = enq_seg->next; cur_seg != enq_seg; ++ cur_seg = cur_seg->next) ++ left_on_ring += TRBS_PER_SEGMENT - 1; ++ ++ /* Always need one TRB free in the ring. */ ++ left_on_ring -= 1; ++ if (num_trbs > left_on_ring) { ++ xhci_warn(xhci, "Not enough room on ring; " ++ "need %u TRBs, %u TRBs left\n", ++ num_trbs, left_on_ring); ++ return 0; ++ } + return 1; ++ } + /* Make sure there's an extra empty TRB available */ + for (i = 0; i <= num_trbs; ++i) { + if (enq == ring->dequeue) diff --git a/queue-2.6.33/usb-xhci-fix-issue-with-set-interface-after-stall.patch b/queue-2.6.33/usb-xhci-fix-issue-with-set-interface-after-stall.patch new file mode 100644 index 00000000000..9544bdfa372 --- /dev/null +++ b/queue-2.6.33/usb-xhci-fix-issue-with-set-interface-after-stall.patch @@ -0,0 +1,68 @@ +From 1624ae1c19e227096ba85bfc389d9b99cb6f7dde Mon Sep 17 00:00:00 2001 +From: Sarah Sharp +Date: Thu, 6 May 2010 13:40:08 -0700 +Subject: USB: xhci: Fix issue with set interface after stall. + +From: Sarah Sharp + +commit 1624ae1c19e227096ba85bfc389d9b99cb6f7dde upstream. + +When the USB core installs a new interface, it unconditionally clears the +halts on all the endpoints on the new interface. Usually the xHCI host +needs to know when an endpoint is reset, so it can change its internal +endpoint state. In this case, it doesn't care, because the endpoints were +never halted in the first place. + +To avoid issuing a redundant Reset Endpoint command, the xHCI driver looks +at xhci_virt_ep->stopped_td to determine if the endpoint was actually +halted. However, the functions that handle the stall never set that +variable to NULL after it dealt with the stall. So if an endpoint stalled +and a Reset Endpoint command completed, and then the class driver tried to +install a new alternate setting, the xHCI driver would access the old +xhci_virt_ep->stopped_td pointer. A similar problem occurs if the +endpoint has been stopped to cancel a transfer. + +Signed-off-by: Sarah Sharp +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-hcd.c | 2 ++ + drivers/usb/host/xhci-ring.c | 7 +++++++ + 2 files changed, 9 insertions(+) + +--- a/drivers/usb/host/xhci-hcd.c ++++ b/drivers/usb/host/xhci-hcd.c +@@ -1452,6 +1452,8 @@ void xhci_endpoint_reset(struct usb_hcd + kfree(virt_ep->stopped_td); + xhci_ring_cmd_db(xhci); + } ++ virt_ep->stopped_td = NULL; ++ virt_ep->stopped_trb = NULL; + spin_unlock_irqrestore(&xhci->lock, flags); + + if (ret) +--- a/drivers/usb/host/xhci-ring.c ++++ b/drivers/usb/host/xhci-ring.c +@@ -577,6 +577,8 @@ static void handle_stopped_endpoint(stru + /* Otherwise just ring the doorbell to restart the ring */ + ring_ep_doorbell(xhci, slot_id, ep_index); + } ++ ep->stopped_td = NULL; ++ ep->stopped_trb = NULL; + + /* + * Drop the lock and complete the URBs in the cancelled TD list. +@@ -1049,8 +1051,13 @@ static void xhci_cleanup_halted_endpoint + ep->ep_state |= EP_HALTED; + ep->stopped_td = td; + ep->stopped_trb = event_trb; ++ + xhci_queue_reset_ep(xhci, slot_id, ep_index); + xhci_cleanup_stalled_ring(xhci, td->urb->dev, ep_index); ++ ++ ep->stopped_td = NULL; ++ ep->stopped_trb = NULL; ++ + xhci_ring_cmd_db(xhci); + } + diff --git a/queue-2.6.33/usb-xhci-fix-wrong-usage-of-macro-trb_type.patch b/queue-2.6.33/usb-xhci-fix-wrong-usage-of-macro-trb_type.patch new file mode 100644 index 00000000000..065f33f9d2d --- /dev/null +++ b/queue-2.6.33/usb-xhci-fix-wrong-usage-of-macro-trb_type.patch @@ -0,0 +1,54 @@ +From 54b5acf3acb7a1f83ec281d111d3e2812cd7ad9d Mon Sep 17 00:00:00 2001 +From: Andiry Xu +Date: Mon, 10 May 2010 19:57:17 -0700 +Subject: USB: xHCI: Fix wrong usage of macro TRB_TYPE + +From: Andiry Xu + +commit 54b5acf3acb7a1f83ec281d111d3e2812cd7ad9d upstream. + +Macro TRB_TYPE is misused in some places. Fix the wrong usage. + + +Signed-off-by: Andiry Xu +Signed-off-by: Sarah Sharp +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-ring.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/drivers/usb/host/xhci-ring.c ++++ b/drivers/usb/host/xhci-ring.c +@@ -350,7 +350,8 @@ static struct xhci_segment *find_trb_seg + while (cur_seg->trbs > trb || + &cur_seg->trbs[TRBS_PER_SEGMENT - 1] < trb) { + generic_trb = &cur_seg->trbs[TRBS_PER_SEGMENT - 1].generic; +- if (TRB_TYPE(generic_trb->field[3]) == TRB_LINK && ++ if ((generic_trb->field[3] & TRB_TYPE_BITMASK) == ++ TRB_TYPE(TRB_LINK) && + (generic_trb->field[3] & LINK_TOGGLE)) + *cycle_state = ~(*cycle_state) & 0x1; + cur_seg = cur_seg->next; +@@ -406,7 +407,7 @@ void xhci_find_new_dequeue_state(struct + BUG(); + + trb = &state->new_deq_ptr->generic; +- if (TRB_TYPE(trb->field[3]) == TRB_LINK && ++ if ((trb->field[3] & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK) && + (trb->field[3] & LINK_TOGGLE)) + state->new_cycle_state = ~(state->new_cycle_state) & 0x1; + next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr); +@@ -1394,8 +1395,10 @@ static int handle_tx_event(struct xhci_h + for (cur_trb = ep_ring->dequeue, cur_seg = ep_ring->deq_seg; + cur_trb != event_trb; + next_trb(xhci, ep_ring, &cur_seg, &cur_trb)) { +- if (TRB_TYPE(cur_trb->generic.field[3]) != TRB_TR_NOOP && +- TRB_TYPE(cur_trb->generic.field[3]) != TRB_LINK) ++ if ((cur_trb->generic.field[3] & ++ TRB_TYPE_BITMASK) != TRB_TYPE(TRB_TR_NOOP) && ++ (cur_trb->generic.field[3] & ++ TRB_TYPE_BITMASK) != TRB_TYPE(TRB_LINK)) + td->urb->actual_length += + TRB_LEN(cur_trb->generic.field[2]); + } diff --git a/queue-2.6.33/usb-xhci-limit-bus-sg_tablesize-to-62-trbs.patch b/queue-2.6.33/usb-xhci-limit-bus-sg_tablesize-to-62-trbs.patch new file mode 100644 index 00000000000..a859be04b99 --- /dev/null +++ b/queue-2.6.33/usb-xhci-limit-bus-sg_tablesize-to-62-trbs.patch @@ -0,0 +1,34 @@ +From bc88d2eba5e19d10dd546e428314909d889b3b6a Mon Sep 17 00:00:00 2001 +From: Sarah Sharp +Date: Tue, 18 May 2010 16:05:21 -0700 +Subject: USB: xhci: Limit bus sg_tablesize to 62 TRBs. + +From: Sarah Sharp + +commit bc88d2eba5e19d10dd546e428314909d889b3b6a upstream. + +When a scatter-gather list is enqueued to the xHCI driver, it translates +each entry into a transfer request block (TRB). Only 63 TRBs can be +used per ring segment, and there must be one additional TRB reserved to +make sure the hardware does not think the ring is empty (so the enqueue +pointer doesn't equal the dequeue pointer). Limit the bus sg_tablesize +to 62 TRBs. + +Signed-off-by: Sarah Sharp +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-pci.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/xhci-pci.c ++++ b/drivers/usb/host/xhci-pci.c +@@ -54,7 +54,7 @@ static int xhci_pci_setup(struct usb_hcd + struct pci_dev *pdev = to_pci_dev(hcd->self.controller); + int retval; + +- hcd->self.sg_tablesize = TRBS_PER_SEGMENT - 1; ++ hcd->self.sg_tablesize = TRBS_PER_SEGMENT - 2; + + xhci->cap_regs = hcd->regs; + xhci->op_regs = hcd->regs + diff --git a/queue-2.6.33/v4l-dvb-gspca-stv06xx-remove-the-046d-08da-from-the-stv06xx-driver.patch b/queue-2.6.33/v4l-dvb-gspca-stv06xx-remove-the-046d-08da-from-the-stv06xx-driver.patch new file mode 100644 index 00000000000..b349e1199e2 --- /dev/null +++ b/queue-2.6.33/v4l-dvb-gspca-stv06xx-remove-the-046d-08da-from-the-stv06xx-driver.patch @@ -0,0 +1,35 @@ +From 55e0b489a39bb635a44f769d620e44c70d9c065b Mon Sep 17 00:00:00 2001 +From: Erik Andrén +Date: Mon, 8 Mar 2010 17:16:00 -0300 +Subject: V4L/DVB: gspca - stv06xx: Remove the 046d:08da from the stv06xx driver + +From: Erik Andrén + +commit 55e0b489a39bb635a44f769d620e44c70d9c065b upstream. + +The 046d:08da usb id shouldn't be associated with the stv06xx driver as they're +not compatible with each other. +This fixes a bug where Quickcam Messenger cams fail to use its proper driver +(gspca-zc3xx), rendering the camera inoperable. + +Signed-off-by: Erik Andrén +Tested-by: Gabriel Craciunescu +Signed-off-by: Jean-François Moine +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/video/gspca/stv06xx/stv06xx.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/media/video/gspca/stv06xx/stv06xx.c ++++ b/drivers/media/video/gspca/stv06xx/stv06xx.c +@@ -496,8 +496,6 @@ static const __devinitdata struct usb_de + {USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 }, + /* QuickCam Messenger (new) */ + {USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 }, +- /* QuickCam Messenger (new) */ +- {USB_DEVICE(0x046D, 0x08DA), .driver_info = BRIDGE_ST6422 }, + {} + }; + MODULE_DEVICE_TABLE(usb, device_table);