]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Feb 2013 00:21:42 +0000 (16:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Feb 2013 00:21:42 +0000 (16:21 -0800)
added patches:
usb-storage-define-a-new-macro-for-usb-storage-match-rules.patch
usb-storage-optimize-to-match-the-huawei-usb-storage-devices-and-support-new-switch-command.patch
usb-xhci-fix-memory-leak-of-urb-private-data.patch
xhci-fix-isoc-td-encoding.patch

queue-3.0/series
queue-3.0/usb-storage-define-a-new-macro-for-usb-storage-match-rules.patch [new file with mode: 0644]
queue-3.0/usb-storage-optimize-to-match-the-huawei-usb-storage-devices-and-support-new-switch-command.patch [new file with mode: 0644]
queue-3.0/usb-xhci-fix-memory-leak-of-urb-private-data.patch [new file with mode: 0644]
queue-3.0/xhci-fix-isoc-td-encoding.patch [new file with mode: 0644]

index a659cce20c4728b79a7148f9f181c054c52a74a2..02d1c2ebc679cca3461495f5c26d61c0832a5957 100644 (file)
@@ -10,3 +10,7 @@ usb-option-add-support-for-telit-le920.patch
 usb-option-add-changhong-ch690.patch
 usb-qcserial-add-telit-gobi-qdl-device.patch
 usb-ehci-fix-bug-in-scheduling-periodic-split-transfers.patch
+usb-storage-define-a-new-macro-for-usb-storage-match-rules.patch
+usb-storage-optimize-to-match-the-huawei-usb-storage-devices-and-support-new-switch-command.patch
+xhci-fix-isoc-td-encoding.patch
+usb-xhci-fix-memory-leak-of-urb-private-data.patch
diff --git a/queue-3.0/usb-storage-define-a-new-macro-for-usb-storage-match-rules.patch b/queue-3.0/usb-storage-define-a-new-macro-for-usb-storage-match-rules.patch
new file mode 100644 (file)
index 0000000..d4030a4
--- /dev/null
@@ -0,0 +1,79 @@
+From 07c7be3d87e5cdaf5f94c271c516456364ef286c Mon Sep 17 00:00:00 2001
+From: fangxiaozhi <huananhu@huawei.com>
+Date: Mon, 4 Feb 2013 15:14:46 +0800
+Subject: USB: storage: Define a new macro for USB storage match rules
+
+From: fangxiaozhi <huananhu@huawei.com>
+
+commit 07c7be3d87e5cdaf5f94c271c516456364ef286c upstream.
+
+1. Define a new macro for USB storage match rules:
+    matching with Vendor ID and interface descriptors.
+
+Signed-off-by: fangxiaozhi <huananhu@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/storage/usb.c          |   12 ++++++++++++
+ drivers/usb/storage/usual-tables.c |   15 +++++++++++++++
+ 2 files changed, 27 insertions(+)
+
+--- a/drivers/usb/storage/usb.c
++++ b/drivers/usb/storage/usb.c
+@@ -120,6 +120,17 @@ MODULE_PARM_DESC(quirks, "supplemental l
+       .useTransport = use_transport,  \
+ }
++#define UNUSUAL_VENDOR_INTF(idVendor, cl, sc, pr, \
++              vendor_name, product_name, use_protocol, use_transport, \
++              init_function, Flags) \
++{ \
++      .vendorName = vendor_name,      \
++      .productName = product_name,    \
++      .useProtocol = use_protocol,    \
++      .useTransport = use_transport,  \
++      .initFunction = init_function,  \
++}
++
+ static struct us_unusual_dev us_unusual_dev_list[] = {
+ #     include "unusual_devs.h" 
+       { }             /* Terminating entry */
+@@ -128,6 +139,7 @@ static struct us_unusual_dev us_unusual_
+ #undef UNUSUAL_DEV
+ #undef COMPLIANT_DEV
+ #undef USUAL_DEV
++#undef UNUSUAL_VENDOR_INTF
+ #ifdef CONFIG_PM      /* Minimal support for suspend and resume */
+--- a/drivers/usb/storage/usual-tables.c
++++ b/drivers/usb/storage/usual-tables.c
+@@ -46,6 +46,20 @@
+ { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
+   .driver_info = ((useType)<<24) }
++/* Define the device is matched with Vendor ID and interface descriptors */
++#define UNUSUAL_VENDOR_INTF(id_vendor, cl, sc, pr, \
++                      vendorName, productName, useProtocol, useTransport, \
++                      initFunction, flags) \
++{ \
++      .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
++                              | USB_DEVICE_ID_MATCH_VENDOR, \
++      .idVendor    = (id_vendor), \
++      .bInterfaceClass = (cl), \
++      .bInterfaceSubClass = (sc), \
++      .bInterfaceProtocol = (pr), \
++      .driver_info = (flags) \
++}
++
+ struct usb_device_id usb_storage_usb_ids[] = {
+ #     include "unusual_devs.h"
+       { }             /* Terminating entry */
+@@ -57,6 +71,7 @@ MODULE_DEVICE_TABLE(usb, usb_storage_usb
+ #undef UNUSUAL_DEV
+ #undef COMPLIANT_DEV
+ #undef USUAL_DEV
++#undef UNUSUAL_VENDOR_INTF
+ /*
diff --git a/queue-3.0/usb-storage-optimize-to-match-the-huawei-usb-storage-devices-and-support-new-switch-command.patch b/queue-3.0/usb-storage-optimize-to-match-the-huawei-usb-storage-devices-and-support-new-switch-command.patch
new file mode 100644 (file)
index 0000000..4318790
--- /dev/null
@@ -0,0 +1,462 @@
+From 200e0d994d9d1919b28c87f1a5fb99a8e13b8a0f Mon Sep 17 00:00:00 2001
+From: fangxiaozhi <huananhu@huawei.com>
+Date: Mon, 4 Feb 2013 15:16:34 +0800
+Subject: USB: storage: optimize to match the Huawei USB storage devices and support new switch command
+
+From: fangxiaozhi <huananhu@huawei.com>
+
+commit 200e0d994d9d1919b28c87f1a5fb99a8e13b8a0f upstream.
+
+1. Optimize the match rules with new macro for Huawei USB storage devices,
+   to avoid to load USB storage driver for the modem interface
+   with Huawei devices.
+2. Add to support new switch command for new Huawei USB dongles.
+
+Signed-off-by: fangxiaozhi <huananhu@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/storage/initializers.c |   76 ++++++++
+ drivers/usb/storage/initializers.h |    4 
+ drivers/usb/storage/unusual_devs.h |  329 -------------------------------------
+ 3 files changed, 78 insertions(+), 331 deletions(-)
+
+--- a/drivers/usb/storage/initializers.c
++++ b/drivers/usb/storage/initializers.c
+@@ -92,8 +92,8 @@ int usb_stor_ucr61s2b_init(struct us_dat
+       return 0;
+ }
+-/* This places the HUAWEI E220 devices in multi-port mode */
+-int usb_stor_huawei_e220_init(struct us_data *us)
++/* This places the HUAWEI usb dongles in multi-port mode */
++static int usb_stor_huawei_feature_init(struct us_data *us)
+ {
+       int result;
+@@ -104,3 +104,75 @@ int usb_stor_huawei_e220_init(struct us_
+       US_DEBUGP("Huawei mode set result is %d\n", result);
+       return 0;
+ }
++
++/*
++ * It will send a scsi switch command called rewind' to huawei dongle.
++ * When the dongle receives this command at the first time,
++ * it will reboot immediately. After rebooted, it will ignore this command.
++ * So it is  unnecessary to read its response.
++ */
++static int usb_stor_huawei_scsi_init(struct us_data *us)
++{
++      int result = 0;
++      int act_len = 0;
++      struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf;
++      char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00,
++                      0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
++
++      bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN);
++      bcbw->Tag = 0;
++      bcbw->DataTransferLength = 0;
++      bcbw->Flags = bcbw->Lun = 0;
++      bcbw->Length = sizeof(rewind_cmd);
++      memset(bcbw->CDB, 0, sizeof(bcbw->CDB));
++      memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd));
++
++      result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw,
++                                      US_BULK_CB_WRAP_LEN, &act_len);
++      US_DEBUGP("transfer actual length=%d, result=%d\n", act_len, result);
++      return result;
++}
++
++/*
++ * It tries to find the supported Huawei USB dongles.
++ * In Huawei, they assign the following product IDs
++ * for all of their mobile broadband dongles,
++ * including the new dongles in the future.
++ * So if the product ID is not included in this list,
++ * it means it is not Huawei's mobile broadband dongles.
++ */
++static int usb_stor_huawei_dongles_pid(struct us_data *us)
++{
++      struct usb_interface_descriptor *idesc;
++      int idProduct;
++
++      idesc = &us->pusb_intf->cur_altsetting->desc;
++      idProduct = us->pusb_dev->descriptor.idProduct;
++      /* The first port is CDROM,
++       * means the dongle in the single port mode,
++       * and a switch command is required to be sent. */
++      if (idesc && idesc->bInterfaceNumber == 0) {
++              if ((idProduct == 0x1001)
++                      || (idProduct == 0x1003)
++                      || (idProduct == 0x1004)
++                      || (idProduct >= 0x1401 && idProduct <= 0x1500)
++                      || (idProduct >= 0x1505 && idProduct <= 0x1600)
++                      || (idProduct >= 0x1c02 && idProduct <= 0x2202)) {
++                      return 1;
++              }
++      }
++      return 0;
++}
++
++int usb_stor_huawei_init(struct us_data *us)
++{
++      int result = 0;
++
++      if (usb_stor_huawei_dongles_pid(us)) {
++              if (us->pusb_dev->descriptor.idProduct >= 0x1446)
++                      result = usb_stor_huawei_scsi_init(us);
++              else
++                      result = usb_stor_huawei_feature_init(us);
++      }
++      return result;
++}
+--- a/drivers/usb/storage/initializers.h
++++ b/drivers/usb/storage/initializers.h
+@@ -46,5 +46,5 @@ int usb_stor_euscsi_init(struct us_data
+  * flash reader */
+ int usb_stor_ucr61s2b_init(struct us_data *us);
+-/* This places the HUAWEI E220 devices in multi-port mode */
+-int usb_stor_huawei_e220_init(struct us_data *us);
++/* This places the HUAWEI usb dongles in multi-port mode */
++int usb_stor_huawei_init(struct us_data *us);
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -1515,335 +1515,10 @@ UNUSUAL_DEV(  0x1210, 0x0003, 0x0100, 0x
+ /* Reported by fangxiaozhi <huananhu@huawei.com>
+  * This brings the HUAWEI data card devices into multi-port mode
+  */
+-UNUSUAL_DEV(  0x12d1, 0x1001, 0x0000, 0x0000,
++UNUSUAL_VENDOR_INTF(0x12d1, 0x08, 0x06, 0x50,
+               "HUAWEI MOBILE",
+               "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1003, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1004, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1401, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1402, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1403, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1404, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1405, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1406, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1407, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1408, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1409, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x140A, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x140B, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x140C, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x140D, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x140E, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x140F, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1410, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1411, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1412, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1413, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1414, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1415, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1416, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1417, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1418, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1419, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x141A, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x141B, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x141C, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x141D, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x141E, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x141F, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1420, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1421, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1422, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1423, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1424, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1425, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1426, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1427, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1428, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1429, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x142A, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x142B, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x142C, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x142D, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x142E, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x142F, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1430, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1431, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1432, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1433, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1434, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1435, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1436, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1437, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1438, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x1439, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x143A, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x143B, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x143C, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x143D, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x143E, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
+-              0),
+-UNUSUAL_DEV(  0x12d1, 0x143F, 0x0000, 0x0000,
+-              "HUAWEI MOBILE",
+-              "Mass Storage",
+-              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
++              USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_init,
+               0),
+ /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
diff --git a/queue-3.0/usb-xhci-fix-memory-leak-of-urb-private-data.patch b/queue-3.0/usb-xhci-fix-memory-leak-of-urb-private-data.patch
new file mode 100644 (file)
index 0000000..e67b7cf
--- /dev/null
@@ -0,0 +1,38 @@
+From 48c3375c5f69b1c2ef3d1051a0009cb9bce0ce24 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Thu, 17 Jan 2013 10:32:16 -0500
+Subject: USB: XHCI: fix memory leak of URB-private data
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 48c3375c5f69b1c2ef3d1051a0009cb9bce0ce24 upstream.
+
+This patch (as1640) fixes a memory leak in xhci-hcd.  The urb_priv
+data structure isn't always deallocated in the handle_tx_event()
+routine for non-control transfers.  The patch adds a kfree() call so
+that all paths end up freeing the memory properly.
+
+This patch should be backported to kernels as old as 2.6.36, that
+contain the commit 8e51adccd4c4b9ffcd509d7f2afce0a906139f75 "USB: xHCI:
+Introduce urb_priv structure"
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Reported-and-tested-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-ring.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/host/xhci-ring.c
++++ b/drivers/usb/host/xhci-ring.c
+@@ -2506,6 +2506,8 @@ cleanup:
+                               (trb_comp_code != COMP_STALL &&
+                                       trb_comp_code != COMP_BABBLE))
+                               xhci_urb_free_priv(xhci, urb_priv);
++                      else
++                              kfree(urb_priv);
+                       usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb);
+                       if ((urb->actual_length != urb->transfer_buffer_length &&
diff --git a/queue-3.0/xhci-fix-isoc-td-encoding.patch b/queue-3.0/xhci-fix-isoc-td-encoding.patch
new file mode 100644 (file)
index 0000000..b4e75ed
--- /dev/null
@@ -0,0 +1,40 @@
+From 760973d2a74b93eb1697981f7448f0e62767cfc4 Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Fri, 11 Jan 2013 11:19:07 -0800
+Subject: xhci: Fix isoc TD encoding.
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit 760973d2a74b93eb1697981f7448f0e62767cfc4 upstream.
+
+An isochronous TD is comprised of one isochronous TRB chained to zero or
+more normal TRBs.  Only the isoc TRB has the TBC and TLBPC fields.  The
+normal TRBs must set those fields to zeroes.  The code was setting the
+TBC and TLBPC fields for both isoc and normal TRBs.  Fix this.
+
+This should be backported to stable kernels as old as 3.0, that contain
+the commit b61d378f2da41c748aba6ca19d77e1e1c02bcea5 " xhci 1.0: Set
+transfer burst last packet count field."
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-ring.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-ring.c
++++ b/drivers/usb/host/xhci-ring.c
+@@ -3613,9 +3613,11 @@ static int xhci_queue_isoc_tx(struct xhc
+               td = urb_priv->td[i];
+               for (j = 0; j < trbs_per_td; j++) {
+                       u32 remainder = 0;
+-                      field = TRB_TBC(burst_count) | TRB_TLBPC(residue);
++                      field = 0;
+                       if (first_trb) {
++                              field = TRB_TBC(burst_count) |
++                                      TRB_TLBPC(residue);
+                               /* Queue the isoc TRB */
+                               field |= TRB_TYPE(TRB_ISOC);
+                               /* Assume URB_ISO_ASAP is set */