]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2012 19:56:15 +0000 (12:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2012 19:56:15 +0000 (12:56 -0700)
added patches:
usb-ehci-convert-warning-messages-to-debug-level.patch
usb-ftdi_sio-add-tiao-usb-multi-protocol-adapter-tumpa-support.patch
usb-gadget-initialize-the-strings-in-tcm_usb_gadget-properly.patch
usb-gadget-make-g_printer-enumerate-again.patch
usb-host-xhci-fix-null-pointer-dereferencing-with-71c731a-for-non-x86-systems.patch
usb-option-blacklist-qmi-interface-on-zte-mf683.patch
usb-otg-mxs-phy-fix-mx23-operation.patch
usb-qcaux-add-pantech-vendor-class-match.patch
usb-serial-fix-up-bug-with-missing.patch

queue-3.6/series [new file with mode: 0644]
queue-3.6/usb-ehci-convert-warning-messages-to-debug-level.patch [new file with mode: 0644]
queue-3.6/usb-ftdi_sio-add-tiao-usb-multi-protocol-adapter-tumpa-support.patch [new file with mode: 0644]
queue-3.6/usb-gadget-initialize-the-strings-in-tcm_usb_gadget-properly.patch [new file with mode: 0644]
queue-3.6/usb-gadget-make-g_printer-enumerate-again.patch [new file with mode: 0644]
queue-3.6/usb-host-xhci-fix-null-pointer-dereferencing-with-71c731a-for-non-x86-systems.patch [new file with mode: 0644]
queue-3.6/usb-option-blacklist-qmi-interface-on-zte-mf683.patch [new file with mode: 0644]
queue-3.6/usb-otg-mxs-phy-fix-mx23-operation.patch [new file with mode: 0644]
queue-3.6/usb-qcaux-add-pantech-vendor-class-match.patch [new file with mode: 0644]
queue-3.6/usb-serial-fix-up-bug-with-missing.patch [new file with mode: 0644]

diff --git a/queue-3.6/series b/queue-3.6/series
new file mode 100644 (file)
index 0000000..32049ae
--- /dev/null
@@ -0,0 +1,9 @@
+usb-gadget-make-g_printer-enumerate-again.patch
+usb-gadget-initialize-the-strings-in-tcm_usb_gadget-properly.patch
+usb-otg-mxs-phy-fix-mx23-operation.patch
+usb-option-blacklist-qmi-interface-on-zte-mf683.patch
+usb-ftdi_sio-add-tiao-usb-multi-protocol-adapter-tumpa-support.patch
+usb-ehci-convert-warning-messages-to-debug-level.patch
+usb-qcaux-add-pantech-vendor-class-match.patch
+usb-host-xhci-fix-null-pointer-dereferencing-with-71c731a-for-non-x86-systems.patch
+usb-serial-fix-up-bug-with-missing.patch
diff --git a/queue-3.6/usb-ehci-convert-warning-messages-to-debug-level.patch b/queue-3.6/usb-ehci-convert-warning-messages-to-debug-level.patch
new file mode 100644 (file)
index 0000000..b021b26
--- /dev/null
@@ -0,0 +1,48 @@
+From d16ba48774913d244c7eb894d28d8ae2c019a827 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Wed, 19 Sep 2012 17:02:29 -0400
+Subject: USB: EHCI: convert warning messages to debug-level
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit d16ba48774913d244c7eb894d28d8ae2c019a827 upstream.
+
+This patch (as1606) converts two warning messages in the ehci-hcd
+driver to debug messages, and adds a little extra information to each.
+
+The log messages occur when an EHCI controller takes too long (more
+than 20 ms) to turn its async or periodic schedule on or off.  If this
+happens at all, it's liable to happen quite often and there's no point
+spamming the system log with these warnings.  Furthermore, there's
+nothing much we can do about it when the problem happens.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Reported-and-tested-by: Thomas Voegtle <tv@lio96.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/ehci-timer.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/ehci-timer.c
++++ b/drivers/usb/host/ehci-timer.c
+@@ -118,7 +118,8 @@ static void ehci_poll_ASS(struct ehci_hc
+                       ehci_enable_event(ehci, EHCI_HRTIMER_POLL_ASS, true);
+                       return;
+               }
+-              ehci_warn(ehci, "Waited too long for the async schedule status, giving up\n");
++              ehci_dbg(ehci, "Waited too long for the async schedule status (%x/%x), giving up\n",
++                              want, actual);
+       }
+       ehci->ASS_poll_count = 0;
+@@ -163,7 +164,8 @@ static void ehci_poll_PSS(struct ehci_hc
+                       ehci_enable_event(ehci, EHCI_HRTIMER_POLL_PSS, true);
+                       return;
+               }
+-              ehci_warn(ehci, "Waited too long for the periodic schedule status, giving up\n");
++              ehci_dbg(ehci, "Waited too long for the periodic schedule status (%x/%x), giving up\n",
++                              want, actual);
+       }
+       ehci->PSS_poll_count = 0;
diff --git a/queue-3.6/usb-ftdi_sio-add-tiao-usb-multi-protocol-adapter-tumpa-support.patch b/queue-3.6/usb-ftdi_sio-add-tiao-usb-multi-protocol-adapter-tumpa-support.patch
new file mode 100644 (file)
index 0000000..086353a
--- /dev/null
@@ -0,0 +1,54 @@
+From 54575b05af36959dfb6a49a3e9ca0c2b456b7126 Mon Sep 17 00:00:00 2001
+From: Antonio Ospite <ospite@studenti.unina.it>
+Date: Sun, 23 Sep 2012 09:57:25 +0200
+Subject: USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support
+
+From: Antonio Ospite <ospite@studenti.unina.it>
+
+commit 54575b05af36959dfb6a49a3e9ca0c2b456b7126 upstream.
+
+TIAO/DIYGADGET USB Multi-Protocol Adapter (TUMPA) is an FTDI FT2232H
+based device which provides an easily accessible JTAG, SPI, I2C, serial
+breakout.
+
+http://www.diygadget.com/tiao-usb-multi-protocol-adapter-jtag-spi-i2c-serial.html
+http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User%27s_Manual
+
+FTDI FT2232H provides two serial channels (A and B), but on the TUMPA
+channel A is dedicated to JTAG/SPI while channel B can be used for
+UART/RS-232: use the ftdi_jtag_quirk to expose only channel B as
+a usb-serial interface to userspace.
+
+Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c     |    2 ++
+ drivers/usb/serial/ftdi_sio_ids.h |    5 +++++
+ 2 files changed, 7 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -584,6 +584,8 @@ static struct usb_device_id id_table_com
+       { USB_DEVICE(FTDI_VID, FTDI_IBS_PEDO_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_IBS_PROD_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_TAVIR_STK500_PID) },
++      { USB_DEVICE(FTDI_VID, FTDI_TIAO_UMPA_PID),
++              .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+       /*
+        * ELV devices:
+        */
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -517,6 +517,11 @@
+  */
+ #define FTDI_TAVIR_STK500_PID 0xFA33  /* STK500 AVR programmer */
++/*
++ * TIAO product ids (FTDI_VID)
++ * http://www.tiaowiki.com/w/Main_Page
++ */
++#define FTDI_TIAO_UMPA_PID    0x8a98  /* TIAO/DIYGADGET USB Multi-Protocol Adapter */
+ /********************************/
diff --git a/queue-3.6/usb-gadget-initialize-the-strings-in-tcm_usb_gadget-properly.patch b/queue-3.6/usb-gadget-initialize-the-strings-in-tcm_usb_gadget-properly.patch
new file mode 100644 (file)
index 0000000..b8723a6
--- /dev/null
@@ -0,0 +1,126 @@
+From 18786da4853017d983ff6911648543ca617c12d1 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 6 Sep 2012 20:11:18 +0200
+Subject: usb: gadget: initialize the strings in tcm_usb_gadget properly
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+commit 18786da4853017d983ff6911648543ca617c12d1 upstream.
+
+I have no idea what I've been thinking while I was doing this in the first
+place. Now the strings are initialized properly and reported by lsusb.
+
+Acked-by: Michal Nazarewicz <mina86@mina86.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/tcm_usb_gadget.c |   33 ++++++++++++++++++++-------------
+ drivers/usb/gadget/tcm_usb_gadget.h |   14 ++++++++------
+ 2 files changed, 28 insertions(+), 19 deletions(-)
+
+--- a/drivers/usb/gadget/tcm_usb_gadget.c
++++ b/drivers/usb/gadget/tcm_usb_gadget.c
+@@ -1977,7 +1977,6 @@ static struct usb_interface_descriptor b
+       .bInterfaceClass =      USB_CLASS_MASS_STORAGE,
+       .bInterfaceSubClass =   USB_SC_SCSI,
+       .bInterfaceProtocol =   USB_PR_BULK,
+-      .iInterface =           USB_G_STR_INT_UAS,
+ };
+ static struct usb_interface_descriptor uasp_intf_desc = {
+@@ -1988,7 +1987,6 @@ static struct usb_interface_descriptor u
+       .bInterfaceClass =      USB_CLASS_MASS_STORAGE,
+       .bInterfaceSubClass =   USB_SC_SCSI,
+       .bInterfaceProtocol =   USB_PR_UAS,
+-      .iInterface =           USB_G_STR_INT_BBB,
+ };
+ static struct usb_endpoint_descriptor uasp_bi_desc = {
+@@ -2209,20 +2207,16 @@ static struct usb_device_descriptor usbg
+       .bDeviceClass =         USB_CLASS_PER_INTERFACE,
+       .idVendor =             cpu_to_le16(UAS_VENDOR_ID),
+       .idProduct =            cpu_to_le16(UAS_PRODUCT_ID),
+-      .iManufacturer =        USB_G_STR_MANUFACTOR,
+-      .iProduct =             USB_G_STR_PRODUCT,
+-      .iSerialNumber =        USB_G_STR_SERIAL,
+-
+       .bNumConfigurations =   1,
+ };
+ static struct usb_string      usbg_us_strings[] = {
+-      { USB_G_STR_MANUFACTOR, "Target Manufactor"},
+-      { USB_G_STR_PRODUCT,    "Target Product"},
+-      { USB_G_STR_SERIAL,     "000000000001"},
+-      { USB_G_STR_CONFIG,     "default config"},
+-      { USB_G_STR_INT_UAS,    "USB Attached SCSI"},
+-      { USB_G_STR_INT_BBB,    "Bulk Only Transport"},
++      [USB_G_STR_MANUFACTOR].s        = "Target Manufactor",
++      [USB_G_STR_PRODUCT].s           = "Target Product",
++      [USB_G_STR_SERIAL].s            = "000000000001",
++      [USB_G_STR_CONFIG].s            = "default config",
++      [USB_G_STR_INT_UAS].s           = "USB Attached SCSI",
++      [USB_G_STR_INT_BBB].s           = "Bulk Only Transport",
+       { },
+ };
+@@ -2244,7 +2238,6 @@ static int guas_unbind(struct usb_compos
+ static struct usb_configuration usbg_config_driver = {
+       .label                  = "Linux Target",
+       .bConfigurationValue    = 1,
+-      .iConfiguration         = USB_G_STR_CONFIG,
+       .bmAttributes           = USB_CONFIG_ATT_SELFPOWER,
+ };
+@@ -2417,6 +2410,9 @@ static int usbg_cfg_bind(struct usb_conf
+       fu->function.disable = usbg_disable;
+       fu->tpg = the_only_tpg_I_currently_have;
++      bot_intf_desc.iInterface = usbg_us_strings[USB_G_STR_INT_BBB].id;
++      uasp_intf_desc.iInterface = usbg_us_strings[USB_G_STR_INT_UAS].id;
++
+       ret = usb_add_function(c, &fu->function);
+       if (ret)
+               goto err;
+@@ -2431,6 +2427,17 @@ static int usb_target_bind(struct usb_co
+ {
+       int ret;
++      ret = usb_string_ids_tab(cdev, usbg_us_strings);
++      if (ret)
++              return ret;
++
++      usbg_device_desc.iManufacturer =
++              usbg_us_strings[USB_G_STR_MANUFACTOR].id;
++      usbg_device_desc.iProduct = usbg_us_strings[USB_G_STR_PRODUCT].id;
++      usbg_device_desc.iSerialNumber = usbg_us_strings[USB_G_STR_SERIAL].id;
++      usbg_config_driver.iConfiguration =
++              usbg_us_strings[USB_G_STR_CONFIG].id;
++
+       ret = usb_add_config(cdev, &usbg_config_driver,
+                       usbg_cfg_bind);
+       return 0;
+--- a/drivers/usb/gadget/tcm_usb_gadget.h
++++ b/drivers/usb/gadget/tcm_usb_gadget.h
+@@ -16,12 +16,14 @@
+ #define UASP_SS_EP_COMP_LOG_STREAMS 4
+ #define UASP_SS_EP_COMP_NUM_STREAMS (1 << UASP_SS_EP_COMP_LOG_STREAMS)
+-#define USB_G_STR_MANUFACTOR    1
+-#define USB_G_STR_PRODUCT       2
+-#define USB_G_STR_SERIAL        3
+-#define USB_G_STR_CONFIG        4
+-#define USB_G_STR_INT_UAS       5
+-#define USB_G_STR_INT_BBB       6
++enum {
++      USB_G_STR_MANUFACTOR,
++      USB_G_STR_PRODUCT,
++      USB_G_STR_SERIAL,
++      USB_G_STR_CONFIG,
++      USB_G_STR_INT_UAS,
++      USB_G_STR_INT_BBB,
++};
+ #define USB_G_ALT_INT_BBB       0
+ #define USB_G_ALT_INT_UAS       1
diff --git a/queue-3.6/usb-gadget-make-g_printer-enumerate-again.patch b/queue-3.6/usb-gadget-make-g_printer-enumerate-again.patch
new file mode 100644 (file)
index 0000000..6bf60d6
--- /dev/null
@@ -0,0 +1,278 @@
+From 5a175bb84d7344fbe5e26cf61b597129e7c80564 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 6 Sep 2012 20:11:17 +0200
+Subject: usb: gadget: make g_printer enumerate again
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+commit 5a175bb84d7344fbe5e26cf61b597129e7c80564 upstream.
+
+This was broken in 2e87edf49 ("usb: gadget: make g_printer use
+composite").
+The USB-strings were not setup properly and were not used. No function
+was added which results in an empty USB config.
+While fixing this, the interface number is now auto generated and not
+hard coded to 0.
+
+Acked-by: Michal Nazarewicz <mina86@mina86.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/printer.c |  128 +++++++++++++++++++++----------------------
+ 1 file changed, 65 insertions(+), 63 deletions(-)
+
+--- a/drivers/usb/gadget/printer.c
++++ b/drivers/usb/gadget/printer.c
+@@ -141,18 +141,14 @@ module_param(qlen, uint, S_IRUGO|S_IWUSR
+  * descriptors are built on demand.
+  */
+-#define STRING_MANUFACTURER           1
+-#define STRING_PRODUCT                        2
+-#define STRING_SERIALNUM              3
++#define STRING_MANUFACTURER           0
++#define STRING_PRODUCT                        1
++#define STRING_SERIALNUM              2
+ /* holds our biggest descriptor */
+ #define USB_DESC_BUFSIZE              256
+ #define USB_BUFSIZE                   8192
+-/* This device advertises one configuration. */
+-#define DEV_CONFIG_VALUE              1
+-#define       PRINTER_INTERFACE               0
+-
+ static struct usb_device_descriptor device_desc = {
+       .bLength =              sizeof device_desc,
+       .bDescriptorType =      USB_DT_DEVICE,
+@@ -162,16 +158,12 @@ static struct usb_device_descriptor devi
+       .bDeviceProtocol =      0,
+       .idVendor =             cpu_to_le16(PRINTER_VENDOR_NUM),
+       .idProduct =            cpu_to_le16(PRINTER_PRODUCT_NUM),
+-      .iManufacturer =        STRING_MANUFACTURER,
+-      .iProduct =             STRING_PRODUCT,
+-      .iSerialNumber =        STRING_SERIALNUM,
+       .bNumConfigurations =   1
+ };
+ static struct usb_interface_descriptor intf_desc = {
+       .bLength =              sizeof intf_desc,
+       .bDescriptorType =      USB_DT_INTERFACE,
+-      .bInterfaceNumber =     PRINTER_INTERFACE,
+       .bNumEndpoints =        2,
+       .bInterfaceClass =      USB_CLASS_PRINTER,
+       .bInterfaceSubClass =   1,      /* Printer Sub-Class */
+@@ -260,9 +252,9 @@ static char                                pnp_string [1024] =
+ /* static strings, in UTF-8 */
+ static struct usb_string              strings [] = {
+-      { STRING_MANUFACTURER,  manufacturer, },
+-      { STRING_PRODUCT,       product_desc, },
+-      { STRING_SERIALNUM,     serial_num, },
++      [STRING_MANUFACTURER].s = manufacturer,
++      [STRING_PRODUCT].s = product_desc,
++      [STRING_SERIALNUM].s =  serial_num,
+       {  }            /* end of list */
+ };
+@@ -871,25 +863,13 @@ static int set_interface(struct printer_
+       int                     result = 0;
+       /* Free the current interface */
+-      switch (dev->interface) {
+-      case PRINTER_INTERFACE:
+-              printer_reset_interface(dev);
+-              break;
+-      }
++      printer_reset_interface(dev);
+-      switch (number) {
+-      case PRINTER_INTERFACE:
+-              result = set_printer_interface(dev);
+-              if (result) {
+-                      printer_reset_interface(dev);
+-              } else {
+-                      dev->interface = PRINTER_INTERFACE;
+-              }
+-              break;
+-      default:
+-              result = -EINVAL;
+-              /* FALL THROUGH */
+-      }
++      result = set_printer_interface(dev);
++      if (result)
++              printer_reset_interface(dev);
++      else
++              dev->interface = number;
+       if (!result)
+               INFO(dev, "Using interface %x\n", number);
+@@ -972,7 +952,7 @@ static int printer_func_setup(struct usb
+               switch (ctrl->bRequest) {
+               case 0: /* Get the IEEE-1284 PNP String */
+                       /* Only one printer interface is supported. */
+-                      if ((wIndex>>8) != PRINTER_INTERFACE)
++                      if ((wIndex>>8) != dev->interface)
+                               break;
+                       value = (pnp_string[0]<<8)|pnp_string[1];
+@@ -983,7 +963,7 @@ static int printer_func_setup(struct usb
+               case 1: /* Get Port Status */
+                       /* Only one printer interface is supported. */
+-                      if (wIndex != PRINTER_INTERFACE)
++                      if (wIndex != dev->interface)
+                               break;
+                       *(u8 *)req->buf = dev->printer_status;
+@@ -992,7 +972,7 @@ static int printer_func_setup(struct usb
+               case 2: /* Soft Reset */
+                       /* Only one printer interface is supported. */
+-                      if (wIndex != PRINTER_INTERFACE)
++                      if (wIndex != dev->interface)
+                               break;
+                       printer_soft_reset(dev);
+@@ -1020,6 +1000,37 @@ unknown:
+ static int __init printer_func_bind(struct usb_configuration *c,
+               struct usb_function *f)
+ {
++      struct printer_dev *dev = container_of(f, struct printer_dev, function);
++      struct usb_composite_dev *cdev = c->cdev;
++      struct usb_ep           *in_ep, *out_ep;
++      int id;
++
++      id = usb_interface_id(c, f);
++      if (id < 0)
++              return id;
++      intf_desc.bInterfaceNumber = id;
++
++      /* all we really need is bulk IN/OUT */
++      in_ep = usb_ep_autoconfig(cdev->gadget, &fs_ep_in_desc);
++      if (!in_ep) {
++autoconf_fail:
++              dev_err(&cdev->gadget->dev, "can't autoconfigure on %s\n",
++                      cdev->gadget->name);
++              return -ENODEV;
++      }
++      in_ep->driver_data = in_ep;     /* claim */
++
++      out_ep = usb_ep_autoconfig(cdev->gadget, &fs_ep_out_desc);
++      if (!out_ep)
++              goto autoconf_fail;
++      out_ep->driver_data = out_ep;   /* claim */
++
++      /* assumes that all endpoints are dual-speed */
++      hs_ep_in_desc.bEndpointAddress = fs_ep_in_desc.bEndpointAddress;
++      hs_ep_out_desc.bEndpointAddress = fs_ep_out_desc.bEndpointAddress;
++
++      dev->in_ep = in_ep;
++      dev->out_ep = out_ep;
+       return 0;
+ }
+@@ -1035,7 +1046,8 @@ static int printer_func_set_alt(struct u
+       int ret = -ENOTSUPP;
+       if (!alt)
+-              ret = set_interface(dev, PRINTER_INTERFACE);
++              ret = set_interface(dev, intf);
++
+       return ret;
+ }
+@@ -1107,13 +1119,14 @@ static int __init printer_bind_config(st
+ {
+       struct usb_gadget       *gadget = c->cdev->gadget;
+       struct printer_dev      *dev;
+-      struct usb_ep           *in_ep, *out_ep;
+       int                     status = -ENOMEM;
+       int                     gcnum;
+       size_t                  len;
+       u32                     i;
+       struct usb_request      *req;
++      usb_ep_autoconfig_reset(gadget);
++
+       dev = &usb_printer_gadget;
+       dev->function.name = shortname;
+@@ -1125,6 +1138,10 @@ static int __init printer_bind_config(st
+       dev->function.set_alt = printer_func_set_alt;
+       dev->function.disable = printer_func_disable;
++      status = usb_add_function(c, &dev->function);
++      if (status)
++              return status;
++
+       /* Setup the sysfs files for the printer gadget. */
+       dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno,
+                                 NULL, "g_printer");
+@@ -1169,26 +1186,6 @@ static int __init printer_bind_config(st
+       pnp_string[0] = (len >> 8) & 0xFF;
+       pnp_string[1] = len & 0xFF;
+-      /* all we really need is bulk IN/OUT */
+-      usb_ep_autoconfig_reset(gadget);
+-      in_ep = usb_ep_autoconfig(gadget, &fs_ep_in_desc);
+-      if (!in_ep) {
+-autoconf_fail:
+-              dev_err(&gadget->dev, "can't autoconfigure on %s\n",
+-                      gadget->name);
+-              return -ENODEV;
+-      }
+-      in_ep->driver_data = in_ep;     /* claim */
+-
+-      out_ep = usb_ep_autoconfig(gadget, &fs_ep_out_desc);
+-      if (!out_ep)
+-              goto autoconf_fail;
+-      out_ep->driver_data = out_ep;   /* claim */
+-
+-      /* assumes that all endpoints are dual-speed */
+-      hs_ep_in_desc.bEndpointAddress = fs_ep_in_desc.bEndpointAddress;
+-      hs_ep_out_desc.bEndpointAddress = fs_ep_out_desc.bEndpointAddress;
+-
+       usb_gadget_set_selfpowered(gadget);
+       if (gadget->is_otg) {
+@@ -1215,9 +1212,6 @@ autoconf_fail:
+       dev->current_rx_bytes = 0;
+       dev->current_rx_buf = NULL;
+-      dev->in_ep = in_ep;
+-      dev->out_ep = out_ep;
+-
+       for (i = 0; i < QLEN; i++) {
+               req = printer_req_alloc(dev->in_ep, USB_BUFSIZE, GFP_KERNEL);
+               if (!req) {
+@@ -1250,8 +1244,6 @@ autoconf_fail:
+       dev->gadget = gadget;
+       INFO(dev, "%s, version: " DRIVER_VERSION "\n", driver_desc);
+-      INFO(dev, "using %s, OUT %s IN %s\n", gadget->name, out_ep->name,
+-                      in_ep->name);
+       return 0;
+ fail:
+@@ -1266,7 +1258,17 @@ static int printer_unbind(struct usb_com
+ static int __init printer_bind(struct usb_composite_dev *cdev)
+ {
+-      return usb_add_config(cdev, &printer_cfg_driver, printer_bind_config);
++      int ret;
++
++      ret = usb_string_ids_tab(cdev, strings);
++      if (ret < 0)
++              return ret;
++      device_desc.iManufacturer = strings[STRING_MANUFACTURER].id;
++      device_desc.iProduct = strings[STRING_PRODUCT].id;
++      device_desc.iSerialNumber = strings[STRING_SERIALNUM].id;
++
++      ret = usb_add_config(cdev, &printer_cfg_driver, printer_bind_config);
++      return ret;
+ }
+ static struct usb_composite_driver printer_driver = {
diff --git a/queue-3.6/usb-host-xhci-fix-null-pointer-dereferencing-with-71c731a-for-non-x86-systems.patch b/queue-3.6/usb-host-xhci-fix-null-pointer-dereferencing-with-71c731a-for-non-x86-systems.patch
new file mode 100644 (file)
index 0000000..0e63f88
--- /dev/null
@@ -0,0 +1,42 @@
+From 457a73d346187c2cc5d599072f38676f18f130e0 Mon Sep 17 00:00:00 2001
+From: Vivek Gautam <gautam.vivek@samsung.com>
+Date: Sat, 22 Sep 2012 18:11:19 +0530
+Subject: usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems
+
+From: Vivek Gautam <gautam.vivek@samsung.com>
+
+commit 457a73d346187c2cc5d599072f38676f18f130e0 upstream.
+
+In 71c731a: usb: host: xhci: Fix Compliance Mode on SN65LVPE502CP Hardware
+when extracting DMI strings (vendor or product_name) to mark them as quirk
+we may get NULL pointer in case of non-x86 systems which won't define
+CONFIG_DMI. Hence susbsequent strstr() calls crash while driver probing.
+
+So, returning 'false' here in case we get a NULL vendor or product_name.
+
+This is tested with ARM (exynos) system.
+
+This patch should be backported to stable kernels as old as 3.6, that
+contain the commit 71c731a296f1b08a3724bd1b514b64f1bda87a23 "usb: host:
+xhci: Fix Compliance Mode on SN65LVPE502CP Hardware"
+
+Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Reported-by: Sebastian Gottschall (DD-WRT) <s.gottschall@dd-wrt.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -470,6 +470,8 @@ static bool compliance_mode_recovery_tim
+       dmi_product_name = dmi_get_system_info(DMI_PRODUCT_NAME);
+       dmi_sys_vendor = dmi_get_system_info(DMI_SYS_VENDOR);
++      if (!dmi_product_name || !dmi_sys_vendor)
++              return false;
+       if (!(strstr(dmi_sys_vendor, "Hewlett-Packard")))
+               return false;
diff --git a/queue-3.6/usb-option-blacklist-qmi-interface-on-zte-mf683.patch b/queue-3.6/usb-option-blacklist-qmi-interface-on-zte-mf683.patch
new file mode 100644 (file)
index 0000000..b05ab74
--- /dev/null
@@ -0,0 +1,31 @@
+From 160c9425ac52cb30502be2d9c5e848cec91bb115 Mon Sep 17 00:00:00 2001
+From: Bjørn Mork <bjorn@mork.no>
+Date: Wed, 19 Sep 2012 22:02:12 +0200
+Subject: USB: option: blacklist QMI interface on ZTE MF683
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit 160c9425ac52cb30502be2d9c5e848cec91bb115 upstream.
+
+Interface #5 on ZTE MF683 is a QMI/wwan interface.
+
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Cc: Shawn J. Goff <shawn7400@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -870,7 +870,8 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) },
+-      { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff) },
++      { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff),
++        .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) },
diff --git a/queue-3.6/usb-otg-mxs-phy-fix-mx23-operation.patch b/queue-3.6/usb-otg-mxs-phy-fix-mx23-operation.patch
new file mode 100644 (file)
index 0000000..807372b
--- /dev/null
@@ -0,0 +1,116 @@
+From 363366cf61c544ea476f3d220f43a95cb03014f5 Mon Sep 17 00:00:00 2001
+From: Mike Thompson <mpthompson@gmail.com>
+Date: Thu, 30 Aug 2012 18:26:25 -0300
+Subject: usb: otg: mxs-phy: Fix mx23 operation
+
+From: Mike Thompson <mpthompson@gmail.com>
+
+commit 363366cf61c544ea476f3d220f43a95cb03014f5 upstream.
+
+Currently mx23 fails to enumerate a USB device:
+
+[ 1.300000] hub 1-0:1.0: unable to enumerate USB device on port 1
+[ 1.520000] hub 1-0:1.0: unable to enumerate USB device on port 1
+[ 1.740000] hub 1-0:1.0: unable to enumerate USB device on port 1
+[ 1.960000] hub 1-0:1.0: unable to enumerate USB device on port 1
+[ 2.180000] hub 1-0:1.0: unable to enumerate USB device on port 1
+
+Use a kernel workqueue to asynchronously delay the setting of
+ENHOSTDISCONDETECT bit until after higher level hub connect/reset processing
+is complete.  Prematurely setting the bit prevents the connection
+processing from completing and not setting it prevents disconnect from being
+detected. No delay is needed for clearing of ENHOSTDISCONDETECT.
+
+Successfully tested on mx23-olinuxino (micro, mini and maxi variants) and mx28evk.
+
+Signed-off-by: Mike Thompson <mpthompson@gmail.com>
+Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/otg/mxs-phy.c |   38 +++++++++++++++++++++++++++++++++++---
+ 1 file changed, 35 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/otg/mxs-phy.c
++++ b/drivers/usb/otg/mxs-phy.c
+@@ -20,6 +20,7 @@
+ #include <linux/delay.h>
+ #include <linux/err.h>
+ #include <linux/io.h>
++#include <linux/workqueue.h>
+ #define DRIVER_NAME "mxs_phy"
+@@ -34,9 +35,16 @@
+ #define BM_USBPHY_CTRL_ENUTMILEVEL2           BIT(14)
+ #define BM_USBPHY_CTRL_ENHOSTDISCONDETECT     BIT(1)
++/*
++ * Amount of delay in miliseconds to safely enable ENHOSTDISCONDETECT bit
++ * so that connection and reset processing can be completed for the root hub.
++ */
++#define MXY_PHY_ENHOSTDISCONDETECT_DELAY      250
++
+ struct mxs_phy {
+       struct usb_phy phy;
+       struct clk *clk;
++      struct delayed_work enhostdiscondetect_work;
+ };
+ #define to_mxs_phy(p) container_of((p), struct mxs_phy, phy)
+@@ -62,6 +70,7 @@ static int mxs_phy_init(struct usb_phy *
+       clk_prepare_enable(mxs_phy->clk);
+       mxs_phy_hw_init(mxs_phy);
++      INIT_DELAYED_WORK(&mxs_phy->enhostdiscondetect_work, NULL);
+       return 0;
+ }
+@@ -76,13 +85,34 @@ static void mxs_phy_shutdown(struct usb_
+       clk_disable_unprepare(mxs_phy->clk);
+ }
++static void mxs_phy_enhostdiscondetect_delay(struct work_struct *ws)
++{
++      struct mxs_phy *mxs_phy = container_of(ws, struct mxs_phy,
++                                              enhostdiscondetect_work.work);
++
++      /* Enable HOSTDISCONDETECT after delay. */
++      dev_dbg(mxs_phy->phy.dev, "Setting ENHOSTDISCONDETECT\n");
++      writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
++                              mxs_phy->phy.io_priv + HW_USBPHY_CTRL_SET);
++}
++
+ static int mxs_phy_on_connect(struct usb_phy *phy, int port)
+ {
++      struct mxs_phy *mxs_phy = to_mxs_phy(phy);
++
+       dev_dbg(phy->dev, "Connect on port %d\n", port);
+-      mxs_phy_hw_init(to_mxs_phy(phy));
+-      writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
+-                      phy->io_priv + HW_USBPHY_CTRL_SET);
++      mxs_phy_hw_init(mxs_phy);
++
++      /*
++       * Delay enabling ENHOSTDISCONDETECT so that connection and
++       * reset processing can be completed for the root hub.
++       */
++      dev_dbg(phy->dev, "Delaying setting ENHOSTDISCONDETECT\n");
++      PREPARE_DELAYED_WORK(&mxs_phy->enhostdiscondetect_work,
++                      mxs_phy_enhostdiscondetect_delay);
++      schedule_delayed_work(&mxs_phy->enhostdiscondetect_work,
++                      msecs_to_jiffies(MXY_PHY_ENHOSTDISCONDETECT_DELAY));
+       return 0;
+ }
+@@ -91,6 +121,8 @@ static int mxs_phy_on_disconnect(struct
+ {
+       dev_dbg(phy->dev, "Disconnect on port %d\n", port);
++      /* No need to delay before clearing ENHOSTDISCONDETECT. */
++      dev_dbg(phy->dev, "Clearing ENHOSTDISCONDETECT\n");
+       writel_relaxed(BM_USBPHY_CTRL_ENHOSTDISCONDETECT,
+                       phy->io_priv + HW_USBPHY_CTRL_CLR);
diff --git a/queue-3.6/usb-qcaux-add-pantech-vendor-class-match.patch b/queue-3.6/usb-qcaux-add-pantech-vendor-class-match.patch
new file mode 100644 (file)
index 0000000..cf784dc
--- /dev/null
@@ -0,0 +1,49 @@
+From c638eb2872b3af079501e7ee44cbb8a5cce9b4b5 Mon Sep 17 00:00:00 2001
+From: Bjørn Mork <bjorn@mork.no>
+Date: Wed, 19 Sep 2012 22:02:03 +0200
+Subject: USB: qcaux: add Pantech vendor class match
+
+From: Bjørn Mork <bjorn@mork.no>
+
+commit c638eb2872b3af079501e7ee44cbb8a5cce9b4b5 upstream.
+
+The three Pantech devices UML190 (106c:3716), UML290 (106c:3718) and
+P4200 (106c:3721) all use the same subclasses to identify vendor
+specific functions.  Replace the existing device specific entries
+with generic vendor matching, adding support for the P4200.
+
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Cc: Thomas Schäfer <tschaefer@t-online.de>
+Acked-by: Dan Williams <dcbw@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/qcaux.c |   10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+--- a/drivers/usb/serial/qcaux.c
++++ b/drivers/usb/serial/qcaux.c
+@@ -36,8 +36,6 @@
+ #define UTSTARCOM_PRODUCT_UM175_V1            0x3712
+ #define UTSTARCOM_PRODUCT_UM175_V2            0x3714
+ #define UTSTARCOM_PRODUCT_UM175_ALLTEL                0x3715
+-#define PANTECH_PRODUCT_UML190_VZW            0x3716
+-#define PANTECH_PRODUCT_UML290_VZW            0x3718
+ /* CMOTECH devices */
+ #define CMOTECH_VENDOR_ID                     0x16d8
+@@ -68,11 +66,9 @@ static struct usb_device_id id_table[] =
+       { USB_DEVICE_AND_INTERFACE_INFO(LG_VENDOR_ID, LG_PRODUCT_VX4400_6000, 0xff, 0xff, 0x00) },
+       { USB_DEVICE_AND_INTERFACE_INFO(SANYO_VENDOR_ID, SANYO_PRODUCT_KATANA_LX, 0xff, 0xff, 0x00) },
+       { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_U520, 0xff, 0x00, 0x00) },
+-      { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML190_VZW, 0xff, 0xff, 0xff) },
+-      { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML190_VZW, 0xff, 0xfe, 0xff) },
+-      { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xfd, 0xff) },  /* NMEA */
+-      { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xfe, 0xff) },  /* WMC */
+-      { USB_DEVICE_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, PANTECH_PRODUCT_UML290_VZW, 0xff, 0xff, 0xff) },  /* DIAG */
++      { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfd, 0xff) },  /* NMEA */
++      { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfe, 0xff) },  /* WMC */
++      { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xff, 0xff) },  /* DIAG */
+       { },
+ };
+ MODULE_DEVICE_TABLE(usb, id_table);
diff --git a/queue-3.6/usb-serial-fix-up-bug-with-missing.patch b/queue-3.6/usb-serial-fix-up-bug-with-missing.patch
new file mode 100644 (file)
index 0000000..815c2b2
--- /dev/null
@@ -0,0 +1,45 @@
+From 44b0f0836b62171617d56c6528c821ceaa6ea506 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Wed, 19 Sep 2012 08:15:21 +0100
+Subject: USB: serial: fix up bug with missing {}
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit 44b0f0836b62171617d56c6528c821ceaa6ea506 upstream.
+
+As reported by Fengguang:
+
+FYI, coccinelle warns about
+
+drivers/usb/serial/usb-serial.c:1415:3-51: code aligned with following code on line 1416
+
+vim +1415 drivers/usb/serial/usb-serial.c
+
+  1412          /* we only set the reset_resume field if the serial_driver has one */
+  1413          for (sd = serial_drivers; *sd; ++sd) {
+  1414                  if ((*sd)->reset_resume)
+> 1415                          udriver->reset_resume = usb_serial_reset_resume;
+> 1416                          break;
+  1417          }
+
+Reported-by: Fengguang Wu <fengguang.wu@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/usb-serial.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/usb-serial.c
++++ b/drivers/usb/serial/usb-serial.c
+@@ -1426,9 +1426,10 @@ int usb_serial_register_drivers(struct u
+       /* we only set the reset_resume field if the serial_driver has one */
+       for (sd = serial_drivers; *sd; ++sd) {
+-              if ((*sd)->reset_resume)
++              if ((*sd)->reset_resume) {
+                       udriver->reset_resume = usb_serial_reset_resume;
+                       break;
++              }
+       }
+       rc = usb_register(udriver);