aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--driver-core/base-platform-safe-handling-for-null-platform-data-and-resources.patch56
-rw-r--r--driver-core/base-platform-simplifications-for-null-platform-data-resources-handling.patch74
-rw-r--r--series21
-rw-r--r--tty/serial-max3107-fix-memory-leaks-when-returning-on-error.patch117
-rw-r--r--tty/serial-mrst_max3110-make-the-irq-option-runtime.patch139
-rw-r--r--tty/serial-mrst_max3110-some-code-cleanup.patch742
-rw-r--r--usb/ohci-work-around-for-nvidia-shutdown-problem.patch166
-rw-r--r--usb/usb-change-acm_iad_descriptor-bfunctionprotocol-to-usb_cdc_acm_proto_at_v25ter.patch36
-rw-r--r--usb/usb-ftdi_sio-add-pid-for-accesio-products.patch42
-rw-r--r--usb/usb-gadget-composite-prevent-oops-for-non-standard-control-request.patch61
-rw-r--r--usb/usb-gadget-remove-pr_-level-uses-of-kern_-level.patch28
-rw-r--r--usb/usb-host-oxu210hp-hcd-use-static-const-char-const-where-possible.patch26
-rw-r--r--usb/usb-isp1362-hcd-removes-config_usb_otg-dependent-code.patch52
-rw-r--r--usb/usb-ohci-sm501-add-iounmap-on-error-path.patch39
-rw-r--r--usb/usb-omap-ohci-missing-driver-unregister-in-module-exit.patch34
-rw-r--r--usb/usb-option-add-more-zte-modem-usb-id-s.patch104
-rw-r--r--usb/usb-otg-add-common-data-structure-for-intel-mid-platform-langwell-penwell.patch206
-rw-r--r--usb/usb-otg-langwell-update-otg-kconfig-and-driver-version.patch63
-rw-r--r--usb/usb-r8a66597-udc-initialize-uninitialized-variable-fix-compile-warning.patch39
-rw-r--r--usb/usb-teach-devices-file-about-wireless-and-superspeed-usb.patch152
-rw-r--r--usb/uwb-use-pm-format-to-print-mac-address.patch48
21 files changed, 2245 insertions, 0 deletions
diff --git a/driver-core/base-platform-safe-handling-for-null-platform-data-and-resources.patch b/driver-core/base-platform-safe-handling-for-null-platform-data-and-resources.patch
new file mode 100644
index 00000000000000..cc6ba4e0e40d62
--- /dev/null
+++ b/driver-core/base-platform-safe-handling-for-null-platform-data-and-resources.patch
@@ -0,0 +1,56 @@
+From cbouatmailru@gmail.com Tue Sep 21 13:28:07 2010
+Date: Tue, 7 Sep 2010 17:31:49 +0400
+From: Anton Vorontsov <cbouatmailru@gmail.com>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Samuel Ortiz <sameo@linux.intel.com>,
+ Mark Brown <broonie@opensource.wolfsonmicro.com>,
+ linux-kernel@vger.kernel.org
+Subject: base/platform: Safe handling for NULL platform data and resources
+Message-ID: <20100907133149.GA28139@oksana.dev.rtsoft.ru>
+Content-Disposition: inline
+
+Some users of platform_device_add_{data,resources}() assume that
+NULL data and resources will be handled specially, i.e. just ignored.
+
+But the platform core ends up calling kmemdup(NULL, 0, ...), which
+returns a non-NULL result (i.e. ZERO_SIZE_PTR), which causes drivers
+to oops on a valid code, something like:
+
+ if (platform_data)
+ stuff = platform_data->stuff;
+
+This patch makes the platform core a bit more safe for such cases.
+
+Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/platform.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/base/platform.c
++++ b/drivers/base/platform.c
+@@ -192,6 +192,9 @@ int platform_device_add_resources(struct
+ {
+ struct resource *r;
+
++ if (!res)
++ return 0;
++
+ r = kmemdup(res, sizeof(struct resource) * num, GFP_KERNEL);
+ if (r) {
+ pdev->resource = r;
+@@ -215,8 +218,12 @@ EXPORT_SYMBOL_GPL(platform_device_add_re
+ int platform_device_add_data(struct platform_device *pdev, const void *data,
+ size_t size)
+ {
+- void *d = kmemdup(data, size, GFP_KERNEL);
++ void *d;
++
++ if (!data)
++ return 0;
+
++ d = kmemdup(data, size, GFP_KERNEL);
+ if (d) {
+ pdev->dev.platform_data = d;
+ return 0;
diff --git a/driver-core/base-platform-simplifications-for-null-platform-data-resources-handling.patch b/driver-core/base-platform-simplifications-for-null-platform-data-resources-handling.patch
new file mode 100644
index 00000000000000..d47efaca1ee7e6
--- /dev/null
+++ b/driver-core/base-platform-simplifications-for-null-platform-data-resources-handling.patch
@@ -0,0 +1,74 @@
+From cbouatmailru@gmail.com Tue Sep 21 13:28:26 2010
+Date: Tue, 7 Sep 2010 17:31:54 +0400
+From: Anton Vorontsov <cbouatmailru@gmail.com>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Samuel Ortiz <sameo@linux.intel.com>,
+ Mark Brown <broonie@opensource.wolfsonmicro.com>,
+ linux-kernel@vger.kernel.org
+Subject: base/platform: Simplifications for NULL platform data/resources handling
+Message-ID: <20100907133154.GB28139@oksana.dev.rtsoft.ru>
+Content-Disposition: inline
+
+There's no need to explicitly check for data and resources being NULL,
+as platform_device_add_{data,resources}() do this internally nowadays.
+
+This makes the code more linear and less indented.
+
+Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/platform.c | 34 +++++++++++++---------------------
+ 1 file changed, 13 insertions(+), 21 deletions(-)
+
+--- a/drivers/base/platform.c
++++ b/drivers/base/platform.c
+@@ -380,17 +380,13 @@ struct platform_device *__init_or_module
+
+ pdev->dev.parent = parent;
+
+- if (res) {
+- ret = platform_device_add_resources(pdev, res, num);
+- if (ret)
+- goto err;
+- }
+-
+- if (data) {
+- ret = platform_device_add_data(pdev, data, size);
+- if (ret)
+- goto err;
+- }
++ ret = platform_device_add_resources(pdev, res, num);
++ if (ret)
++ goto err;
++
++ ret = platform_device_add_data(pdev, data, size);
++ if (ret)
++ goto err;
+
+ ret = platform_device_add(pdev);
+ if (ret) {
+@@ -537,17 +533,13 @@ struct platform_device * __init_or_modul
+ goto err_out;
+ }
+
+- if (res) {
+- error = platform_device_add_resources(pdev, res, n_res);
+- if (error)
+- goto err_pdev_put;
+- }
++ error = platform_device_add_resources(pdev, res, n_res);
++ if (error)
++ goto err_pdev_put;
+
+- if (data) {
+- error = platform_device_add_data(pdev, data, size);
+- if (error)
+- goto err_pdev_put;
+- }
++ error = platform_device_add_data(pdev, data, size);
++ if (error)
++ goto err_pdev_put;
+
+ error = platform_device_add(pdev);
+ if (error)
diff --git a/series b/series
index 704a13c7590048..8f5061c3ecdebd 100644
--- a/series
+++ b/series
@@ -43,6 +43,8 @@ driver-core/driver-core-platform_bus-allow-runtime-override-of-dev_pm_ops.patch
driver-core/add-packet-hub-driver-for-topcliff-platform-controller-hub.patch
driver-core/pch_phub-fix-build-warnings.patch
driver-core/debugfs-mark-me-as-the-maintainer.patch
+driver-core/base-platform-safe-handling-for-null-platform-data-and-resources.patch
+driver-core/base-platform-simplifications-for-null-platform-data-resources-handling.patch
# can we really almost drop it? please let it happen this time...
driver-core/driver-core-remove-config_sysfs_deprecated_v2-but-keep-it-for-block-devices.patch
@@ -71,6 +73,9 @@ tty/serial-core-restore-termios-settings-when-resume-console-ports.patch
tty/add-ttyprintk-driver.patch
tty/char-mxser-call-pci_disable_device-from-probe-remove.patch
tty/tty_io-check-return-code-of-tty_register_device.patch
+tty/serial-mrst_max3110-some-code-cleanup.patch
+tty/serial-mrst_max3110-make-the-irq-option-runtime.patch
+tty/serial-max3107-fix-memory-leaks-when-returning-on-error.patch
###################################
@@ -107,8 +112,24 @@ usb/usb-kconfig-fix-typos-in-usb_functionfs-description.patch
usb/usb-ehci-tdi-let-s-tdi_reset-set-host-mode.patch
usb/usb-gadget-rndis-fix-up-coding-style-issues-in-the-file.patch
usb/drivers-usb-ftdi-elan-sema.patch
+usb/usb-otg-add-common-data-structure-for-intel-mid-platform-langwell-penwell.patch
+usb/usb-otg-langwell-update-otg-kconfig-and-driver-version.patch
+usb/usb-r8a66597-udc-initialize-uninitialized-variable-fix-compile-warning.patch
+usb/usb-change-acm_iad_descriptor-bfunctionprotocol-to-usb_cdc_acm_proto_at_v25ter.patch
+usb/usb-ohci-sm501-add-iounmap-on-error-path.patch
+usb/ohci-work-around-for-nvidia-shutdown-problem.patch
+usb/usb-gadget-composite-prevent-oops-for-non-standard-control-request.patch
+usb/usb-isp1362-hcd-removes-config_usb_otg-dependent-code.patch
+usb/usb-gadget-remove-pr_-level-uses-of-kern_-level.patch
+usb/usb-option-add-more-zte-modem-usb-id-s.patch
+usb/uwb-use-pm-format-to-print-mac-address.patch
+usb/usb-teach-devices-file-about-wireless-and-superspeed-usb.patch
+usb/usb-host-oxu210hp-hcd-use-static-const-char-const-where-possible.patch
+usb/usb-ftdi_sio-add-pid-for-accesio-products.patch
+usb/usb-omap-ohci-missing-driver-unregister-in-module-exit.patch
# staging stuff for next is now in the staging-next tree on git.kernel.org
+
diff --git a/tty/serial-max3107-fix-memory-leaks-when-returning-on-error.patch b/tty/serial-max3107-fix-memory-leaks-when-returning-on-error.patch
new file mode 100644
index 00000000000000..a82cc76ccadd4d
--- /dev/null
+++ b/tty/serial-max3107-fix-memory-leaks-when-returning-on-error.patch
@@ -0,0 +1,117 @@
+From dave@gnu.org Tue Sep 21 13:40:18 2010
+Subject: serial: max3107: Fix memory leaks when returning on error
+From: Davidlohr Bueso <dave@gnu.org>
+To: jianwei.yang@intel.com, alan@linux.intel.com, gregkh@suse.de
+Cc: linux-serial@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
+Date: Mon, 13 Sep 2010 12:08:11 -0400
+Message-ID: <1284394091.2055.5.camel@cowboy>
+
+Fix memory leaks in max3107_probe() when returning on error.
+
+Signed-off-by: Davidlohr Bueso <dave@gnu.org>
+Acked-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/max3107.c | 34 +++++++++++++++++++++++++---------
+ 1 file changed, 25 insertions(+), 9 deletions(-)
+
+--- a/drivers/serial/max3107.c
++++ b/drivers/serial/max3107.c
+@@ -986,12 +986,14 @@ int max3107_probe(struct spi_device *spi
+ s->rxbuf = kzalloc(sizeof(u16) * (MAX3107_RX_FIFO_SIZE+2), GFP_KERNEL);
+ if (!s->rxbuf) {
+ pr_err("Allocating RX buffer failed\n");
+- return -ENOMEM;
++ retval = -ENOMEM;
++ goto err_free4;
+ }
+ s->rxstr = kzalloc(sizeof(u8) * MAX3107_RX_FIFO_SIZE, GFP_KERNEL);
+ if (!s->rxstr) {
+ pr_err("Allocating RX buffer failed\n");
+- return -ENOMEM;
++ retval = -ENOMEM;
++ goto err_free3;
+ }
+ /* SPI Tx buffer
+ * SPI transfer buffer
+@@ -1002,7 +1004,8 @@ int max3107_probe(struct spi_device *spi
+ s->txbuf = kzalloc(sizeof(u16) * MAX3107_TX_FIFO_SIZE + 3, GFP_KERNEL);
+ if (!s->txbuf) {
+ pr_err("Allocating TX buffer failed\n");
+- return -ENOMEM;
++ retval = -ENOMEM;
++ goto err_free2;
+ }
+ /* Initialize shared data lock */
+ spin_lock_init(&s->data_lock);
+@@ -1021,13 +1024,15 @@ int max3107_probe(struct spi_device *spi
+ buf[0] = MAX3107_REVID_REG;
+ if (max3107_rw(s, (u8 *)buf, (u8 *)buf, 2)) {
+ dev_err(&s->spi->dev, "SPI transfer for REVID read failed\n");
+- return -EIO;
++ retval = -EIO;
++ goto err_free1;
+ }
+ if ((buf[0] & MAX3107_SPI_RX_DATA_MASK) != MAX3107_REVID1 &&
+ (buf[0] & MAX3107_SPI_RX_DATA_MASK) != MAX3107_REVID2) {
+ dev_err(&s->spi->dev, "REVID %x does not match\n",
+ (buf[0] & MAX3107_SPI_RX_DATA_MASK));
+- return -ENODEV;
++ retval = -ENODEV;
++ goto err_free1;
+ }
+
+ /* Disable all interrupts */
+@@ -1047,7 +1052,8 @@ int max3107_probe(struct spi_device *spi
+ /* Perform SPI transfer */
+ if (max3107_rw(s, (u8 *)buf, NULL, 4)) {
+ dev_err(&s->spi->dev, "SPI transfer for init failed\n");
+- return -EIO;
++ retval = -EIO;
++ goto err_free1;
+ }
+
+ /* Register UART driver */
+@@ -1055,7 +1061,7 @@ int max3107_probe(struct spi_device *spi
+ retval = uart_register_driver(&max3107_uart_driver);
+ if (retval) {
+ dev_err(&s->spi->dev, "Registering UART driver failed\n");
+- return retval;
++ goto err_free1;
+ }
+ driver_registered = 1;
+ }
+@@ -1074,13 +1080,13 @@ int max3107_probe(struct spi_device *spi
+ retval = uart_add_one_port(&max3107_uart_driver, &s->port);
+ if (retval < 0) {
+ dev_err(&s->spi->dev, "Adding UART port failed\n");
+- return retval;
++ goto err_free1;
+ }
+
+ if (pdata->configure) {
+ retval = pdata->configure(s);
+ if (retval < 0)
+- return retval;
++ goto err_free1;
+ }
+
+ /* Go to suspend mode */
+@@ -1088,6 +1094,16 @@ int max3107_probe(struct spi_device *spi
+ pdata->hw_suspend(s, 1);
+
+ return 0;
++
++err_free1:
++ kfree(s->txbuf);
++err_free2:
++ kfree(s->rxstr);
++err_free3:
++ kfree(s->rxbuf);
++err_free4:
++ kfree(s);
++ return retval;
+ }
+ EXPORT_SYMBOL_GPL(max3107_probe);
+
diff --git a/tty/serial-mrst_max3110-make-the-irq-option-runtime.patch b/tty/serial-mrst_max3110-make-the-irq-option-runtime.patch
new file mode 100644
index 00000000000000..13df6777ab34db
--- /dev/null
+++ b/tty/serial-mrst_max3110-make-the-irq-option-runtime.patch
@@ -0,0 +1,139 @@
+From feng.tang@intel.com Tue Sep 21 13:39:12 2010
+From: Alan Cox <alan@linux.intel.com>
+To: linux-serial@vger.kernel.org
+Cc: greg@kroah.com,
+ alan@linux.intel.com,
+ <mingo@elte.hu>
+Subject: serial: mrst_max3110: Make the IRQ option runtime
+Date: Mon, 13 Sep 2010 15:39:56 +0800
+Message-Id: <1284363596-26867-1-git-send-email-feng.tang@intel.com>
+
+From: Alan Cox <alan@linux.intel.com>
+
+And while we are at it allow it to fail to find one. Without this the IRQ
+option will cause the 3110 driver to fail on 0.7 SFI firmware.
+
+Acked-by: Feng Tang <feng.tang@intel.com>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/Kconfig | 7 -----
+ drivers/serial/mrst_max3110.c | 55 +++++++++++++++++++++---------------------
+ 2 files changed, 28 insertions(+), 34 deletions(-)
+
+--- a/drivers/serial/Kconfig
++++ b/drivers/serial/Kconfig
+@@ -717,13 +717,6 @@ config SERIAL_MRST_MAX3110
+ the Intel Moorestown platform. On other systems use the max3100
+ driver.
+
+-config MRST_MAX3110_IRQ
+- boolean "Enable GPIO IRQ for Max3110 over Moorestown"
+- default n
+- depends on SERIAL_MRST_MAX3110 && GPIO_LANGWELL
+- help
+- This has to be enabled after Moorestown GPIO driver is loaded
+-
+ config SERIAL_MFD_HSU
+ tristate "Medfield High Speed UART support"
+ depends on PCI
+--- a/drivers/serial/mrst_max3110.c
++++ b/drivers/serial/mrst_max3110.c
+@@ -446,7 +446,6 @@ static int max3110_main_thread(void *_ma
+ return ret;
+ }
+
+-#ifdef CONFIG_MRST_MAX3110_IRQ
+ static irqreturn_t serial_m3110_irq(int irq, void *dev_id)
+ {
+ struct uart_max3110 *max = dev_id;
+@@ -458,7 +457,7 @@ static irqreturn_t serial_m3110_irq(int
+
+ return IRQ_HANDLED;
+ }
+-#else
++
+ /* if don't use RX IRQ, then need a thread to polling read */
+ static int max3110_read_thread(void *_max)
+ {
+@@ -481,7 +480,6 @@ static int max3110_read_thread(void *_ma
+
+ return 0;
+ }
+-#endif
+
+ static int serial_m3110_startup(struct uart_port *port)
+ {
+@@ -504,34 +502,38 @@ static int serial_m3110_startup(struct u
+ /* as we use thread to handle tx/rx, need set low latency */
+ port->state->port.tty->low_latency = 1;
+
+-#ifdef CONFIG_MRST_MAX3110_IRQ
+- ret = request_irq(max->irq, serial_m3110_irq,
++ if (max->irq) {
++ max->read_thread = NULL;
++ ret = request_irq(max->irq, serial_m3110_irq,
+ IRQ_TYPE_EDGE_FALLING, "max3110", max);
+- if (ret)
+- return ret;
++ if (ret) {
++ max->irq = 0;
++ pr_err(PR_FMT "unable to allocate IRQ, polling\n");
++ } else {
++ /* Enable RX IRQ only */
++ config |= WC_RXA_IRQ_ENABLE;
++ }
++ }
+
+- /* Enable RX IRQ only */
+- config |= WC_RXA_IRQ_ENABLE;
+-#else
+- /* If IRQ is disabled, start a read thread for input data */
+- max->read_thread =
+- kthread_run(max3110_read_thread, max, "max3110_read");
+- if (IS_ERR(max->read_thread)) {
+- ret = PTR_ERR(max->read_thread);
+- max->read_thread = NULL;
+- pr_err(PR_FMT "Can't create read thread!");
+- return ret;
++ if (max->irq == 0) {
++ /* If IRQ is disabled, start a read thread for input data */
++ max->read_thread =
++ kthread_run(max3110_read_thread, max, "max3110_read");
++ if (IS_ERR(max->read_thread)) {
++ ret = PTR_ERR(max->read_thread);
++ max->read_thread = NULL;
++ pr_err(PR_FMT "Can't create read thread!\n");
++ return ret;
++ }
+ }
+-#endif
+
+ ret = max3110_out(max, config);
+ if (ret) {
+-#ifdef CONFIG_MRST_MAX3110_IRQ
+- free_irq(max->irq, max);
+-#else
+- kthread_stop(max->read_thread);
++ if (max->irq)
++ free_irq(max->irq, max);
++ if (max->read_thread)
++ kthread_stop(max->read_thread);
+ max->read_thread = NULL;
+-#endif
+ return ret;
+ }
+
+@@ -550,9 +552,8 @@ static void serial_m3110_shutdown(struct
+ max->read_thread = NULL;
+ }
+
+-#ifdef CONFIG_MRST_MAX3110_IRQ
+- free_irq(max->irq, max);
+-#endif
++ if (max->irq)
++ free_irq(max->irq, max);
+
+ /* Disable interrupts from this port */
+ config = WC_TAG | WC_SW_SHDI;
diff --git a/tty/serial-mrst_max3110-some-code-cleanup.patch b/tty/serial-mrst_max3110-some-code-cleanup.patch
new file mode 100644
index 00000000000000..a9315cc5cee5f0
--- /dev/null
+++ b/tty/serial-mrst_max3110-some-code-cleanup.patch
@@ -0,0 +1,742 @@
+From feng.tang@intel.com Tue Sep 21 13:38:49 2010
+From: Feng Tang <feng.tang@intel.com>
+To: linux-serial@vger.kernel.org
+Cc: greg@kroah.com,
+ alan@linux.intel.com,
+ <mingo@elte.hu>,
+ Feng Tang <feng.tang@intel.com>
+Subject: serial: mrst_max3110: some code cleanup
+Date: Mon, 13 Sep 2010 15:39:48 +0800
+Message-Id: <1284363588-26835-1-git-send-email-feng.tang@intel.com>
+
+The cleanup for mrst_max3110 includes:
+* remove unneeded head files
+* make the spi_transfer dma safe, so that driver is more portable
+* add more check for error return value
+* use mutex_trylock for read thread
+
+Signed-off-by: Feng Tang <feng.tang@intel.com>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/mrst_max3110.c | 329 +++++++++++++++++++++++++-----------------
+ drivers/serial/mrst_max3110.h | 1
+ 2 files changed, 202 insertions(+), 128 deletions(-)
+
+--- a/drivers/serial/mrst_max3110.c
++++ b/drivers/serial/mrst_max3110.c
+@@ -1,7 +1,7 @@
+ /*
+- * max3110.c - spi uart protocol driver for Maxim 3110 on Moorestown
++ * mrst_max3110.c - spi uart protocol driver for Maxim 3110
+ *
+- * Copyright (C) Intel 2008 Feng Tang <feng.tang@intel.com>
++ * Copyright (c) 2008-2010, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+@@ -31,18 +31,13 @@
+ #include <linux/ioport.h>
+ #include <linux/init.h>
+ #include <linux/console.h>
+-#include <linux/sysrq.h>
+-#include <linux/platform_device.h>
+ #include <linux/tty.h>
+ #include <linux/tty_flip.h>
+ #include <linux/serial_core.h>
+ #include <linux/serial_reg.h>
+
+ #include <linux/kthread.h>
+-#include <linux/delay.h>
+-#include <asm/atomic.h>
+ #include <linux/spi/spi.h>
+-#include <linux/spi/dw_spi.h>
+
+ #include "mrst_max3110.h"
+
+@@ -55,7 +50,7 @@
+ struct uart_max3110 {
+ struct uart_port port;
+ struct spi_device *spi;
+- char *name;
++ char name[24];
+
+ wait_queue_head_t wq;
+ struct task_struct *main_thread;
+@@ -66,35 +61,30 @@ struct uart_max3110 {
+ u16 cur_conf;
+ u8 clock;
+ u8 parity, word_7bits;
++ u16 irq;
+
+ unsigned long uart_flags;
+
+ /* console related */
+ struct circ_buf con_xmit;
+-
+- /* irq related */
+- u16 irq;
+ };
+
+ /* global data structure, may need be removed */
+-struct uart_max3110 *pmax;
+-static inline void receive_char(struct uart_max3110 *max, u8 ch);
++static struct uart_max3110 *pmax;
++
+ static void receive_chars(struct uart_max3110 *max,
+ unsigned char *str, int len);
+-static int max3110_read_multi(struct uart_max3110 *max, int len, u8 *buf);
+-static void max3110_console_receive(struct uart_max3110 *max);
++static int max3110_read_multi(struct uart_max3110 *max, u8 *buf);
++static void max3110_con_receive(struct uart_max3110 *max);
+
+-int max3110_write_then_read(struct uart_max3110 *max,
+- const u8 *txbuf, u8 *rxbuf, unsigned len, int always_fast)
++static int max3110_write_then_read(struct uart_max3110 *max,
++ const void *txbuf, void *rxbuf, unsigned len, int always_fast)
+ {
+ struct spi_device *spi = max->spi;
+ struct spi_message message;
+ struct spi_transfer x;
+ int ret;
+
+- if (!txbuf || !rxbuf)
+- return -EINVAL;
+-
+ spi_message_init(&message);
+ memset(&x, 0, sizeof x);
+ x.len = len;
+@@ -103,7 +93,7 @@ int max3110_write_then_read(struct uart_
+ spi_message_add_tail(&x, &message);
+
+ if (always_fast)
+- x.speed_hz = 3125000;
++ x.speed_hz = spi->max_speed_hz;
+ else if (max->baud)
+ x.speed_hz = max->baud;
+
+@@ -112,58 +102,80 @@ int max3110_write_then_read(struct uart_
+ return ret;
+ }
+
+-/* Write a u16 to the device, and return one u16 read back */
+-int max3110_out(struct uart_max3110 *max, const u16 out)
++/* Write a 16b word to the device */
++static int max3110_out(struct uart_max3110 *max, const u16 out)
+ {
+- u16 tmp;
++ void *buf;
++ u16 *obuf, *ibuf;
++ u8 ch;
+ int ret;
+
+- ret = max3110_write_then_read(max, (u8 *)&out, (u8 *)&tmp, 2, 1);
+- if (ret)
+- return ret;
++ buf = kzalloc(8, GFP_KERNEL | GFP_DMA);
++ if (!buf)
++ return -ENOMEM;
++
++ obuf = buf;
++ ibuf = buf + 4;
++ *obuf = out;
++ ret = max3110_write_then_read(max, obuf, ibuf, 2, 1);
++ if (ret) {
++ pr_warning(PR_FMT "%s(): get err msg %d when sending 0x%x\n",
++ __func__, ret, out);
++ goto exit;
++ }
+
+ /* If some valid data is read back */
+- if (tmp & MAX3110_READ_DATA_AVAILABLE)
+- receive_char(max, (tmp & 0xff));
++ if (*ibuf & MAX3110_READ_DATA_AVAILABLE) {
++ ch = *ibuf & 0xff;
++ receive_chars(max, &ch, 1);
++ }
+
++exit:
++ kfree(buf);
+ return ret;
+ }
+
+-#define MAX_READ_LEN 20
+ /*
+ * This is usually used to read data from SPIC RX FIFO, which doesn't
+- * need any delay like flushing character out. It returns how many
+- * valide bytes are read back
++ * need any delay like flushing character out.
++ *
++ * Return how many valide bytes are read back
+ */
+-static int max3110_read_multi(struct uart_max3110 *max, int len, u8 *buf)
++static int max3110_read_multi(struct uart_max3110 *max, u8 *rxbuf)
+ {
+- u16 out[MAX_READ_LEN], in[MAX_READ_LEN];
+- u8 *pbuf, valid_str[MAX_READ_LEN];
+- int i, j, bytelen;
+-
+- if (len > MAX_READ_LEN) {
+- pr_err(PR_FMT "read len %d is too large\n", len);
++ void *buf;
++ u16 *obuf, *ibuf;
++ u8 *pbuf, valid_str[M3110_RX_FIFO_DEPTH];
++ int i, j, blen;
++
++ blen = M3110_RX_FIFO_DEPTH * sizeof(u16);
++ buf = kzalloc(blen * 2, GFP_KERNEL | GFP_DMA);
++ if (!buf) {
++ pr_warning(PR_FMT "%s(): fail to alloc dma buffer\n", __func__);
+ return 0;
+ }
+
+- bytelen = len * 2;
+- memset(out, 0, bytelen);
+- memset(in, 0, bytelen);
++ /* tx/rx always have the same length */
++ obuf = buf;
++ ibuf = buf + blen;
+
+- if (max3110_write_then_read(max, (u8 *)out, (u8 *)in, bytelen, 1))
++ if (max3110_write_then_read(max, obuf, ibuf, blen, 1)) {
++ kfree(buf);
+ return 0;
++ }
+
+- /* If caller don't provide a buffer, then handle received char */
+- pbuf = buf ? buf : valid_str;
++ /* If caller doesn't provide a buffer, then handle received char */
++ pbuf = rxbuf ? rxbuf : valid_str;
+
+- for (i = 0, j = 0; i < len; i++) {
+- if (in[i] & MAX3110_READ_DATA_AVAILABLE)
+- pbuf[j++] = (u8)(in[i] & 0xff);
++ for (i = 0, j = 0; i < M3110_RX_FIFO_DEPTH; i++) {
++ if (ibuf[i] & MAX3110_READ_DATA_AVAILABLE)
++ pbuf[j++] = ibuf[i] & 0xff;
+ }
+
+ if (j && (pbuf == valid_str))
+ receive_chars(max, valid_str, j);
+
++ kfree(buf);
+ return j;
+ }
+
+@@ -177,10 +189,6 @@ static void serial_m3110_con_putchar(str
+ xmit->buf[xmit->head] = (char)ch;
+ xmit->head = (xmit->head + 1) & (PAGE_SIZE - 1);
+ }
+-
+-
+- if (!test_and_set_bit(CON_TX_NEEDED, &max->uart_flags))
+- wake_up_process(max->main_thread);
+ }
+
+ /*
+@@ -196,6 +204,9 @@ static void serial_m3110_con_write(struc
+ return;
+
+ uart_console_write(&pmax->port, s, count, serial_m3110_con_putchar);
++
++ if (!test_and_set_bit(CON_TX_NEEDED, &pmax->uart_flags))
++ wake_up_process(pmax->main_thread);
+ }
+
+ static int __init
+@@ -209,6 +220,9 @@ serial_m3110_con_setup(struct console *c
+
+ pr_info(PR_FMT "setting up console\n");
+
++ if (co->index == -1)
++ co->index = 0;
++
+ if (!max) {
+ pr_err(PR_FMT "pmax is NULL, return");
+ return -ENODEV;
+@@ -239,8 +253,6 @@ static struct console serial_m3110_conso
+ .data = &serial_m3110_reg,
+ };
+
+-#define MRST_CONSOLE (&serial_m3110_console)
+-
+ static unsigned int serial_m3110_tx_empty(struct uart_port *port)
+ {
+ return 1;
+@@ -258,32 +270,44 @@ static void serial_m3110_stop_rx(struct
+ }
+
+ #define WORDS_PER_XFER 128
+-static inline void send_circ_buf(struct uart_max3110 *max,
++static void send_circ_buf(struct uart_max3110 *max,
+ struct circ_buf *xmit)
+ {
+- int len, left = 0;
+- u16 obuf[WORDS_PER_XFER], ibuf[WORDS_PER_XFER];
++ void *buf;
++ u16 *obuf, *ibuf;
+ u8 valid_str[WORDS_PER_XFER];
+- int i, j;
++ int i, j, len, blen, dma_size, left, ret = 0;
++
++
++ dma_size = WORDS_PER_XFER * sizeof(u16) * 2;
++ buf = kzalloc(dma_size, GFP_KERNEL | GFP_DMA);
++ if (!buf)
++ return;
++ obuf = buf;
++ ibuf = buf + dma_size/2;
+
+ while (!uart_circ_empty(xmit)) {
+ left = uart_circ_chars_pending(xmit);
+ while (left) {
+- len = (left >= WORDS_PER_XFER) ? WORDS_PER_XFER : left;
++ len = min(left, WORDS_PER_XFER);
++ blen = len * sizeof(u16);
++ memset(ibuf, 0, blen);
+
+- memset(obuf, 0, len * 2);
+- memset(ibuf, 0, len * 2);
+ for (i = 0; i < len; i++) {
+ obuf[i] = (u8)xmit->buf[xmit->tail] | WD_TAG;
+ xmit->tail = (xmit->tail + 1) &
+ (UART_XMIT_SIZE - 1);
+ }
+- max3110_write_then_read(max, (u8 *)obuf,
+- (u8 *)ibuf, len * 2, 0);
++
++ /* Fail to send msg to console is not very critical */
++ ret = max3110_write_then_read(max, obuf, ibuf, blen, 0);
++ if (ret)
++ pr_warning(PR_FMT "%s(): get err msg %d\n",
++ __func__, ret);
+
+ for (i = 0, j = 0; i < len; i++) {
+ if (ibuf[i] & MAX3110_READ_DATA_AVAILABLE)
+- valid_str[j++] = (u8)(ibuf[i] & 0xff);
++ valid_str[j++] = ibuf[i] & 0xff;
+ }
+
+ if (j)
+@@ -293,6 +317,8 @@ static inline void send_circ_buf(struct
+ left -= len;
+ }
+ }
++
++ kfree(buf);
+ }
+
+ static void transmit_char(struct uart_max3110 *max)
+@@ -312,8 +338,10 @@ static void transmit_char(struct uart_ma
+ serial_m3110_stop_tx(port);
+ }
+
+-/* This will be called by uart_write() and tty_write, can't
+- * go to sleep */
++/*
++ * This will be called by uart_write() and tty_write, can't
++ * go to sleep
++ */
+ static void serial_m3110_start_tx(struct uart_port *port)
+ {
+ struct uart_max3110 *max =
+@@ -335,7 +363,7 @@ static void receive_chars(struct uart_ma
+
+ tty = port->state->port.tty;
+ if (!tty)
+- return; /* receive some char before the tty is opened */
++ return;
+
+ while (len) {
+ usable = tty_buffer_request_room(tty, len);
+@@ -343,32 +371,37 @@ static void receive_chars(struct uart_ma
+ tty_insert_flip_string(tty, str, usable);
+ str += usable;
+ port->icount.rx += usable;
+- tty_flip_buffer_push(tty);
+ }
+ len -= usable;
+ }
++ tty_flip_buffer_push(tty);
+ }
+
+-static inline void receive_char(struct uart_max3110 *max, u8 ch)
+-{
+- receive_chars(max, &ch, 1);
+-}
+-
+-static void max3110_console_receive(struct uart_max3110 *max)
++/*
++ * This routine will be used in read_thread or RX IRQ handling,
++ * it will first do one round buffer read(8 words), if there is some
++ * valid RX data, will try to read 5 more rounds till all data
++ * is read out.
++ *
++ * Use stack space as data buffer to save some system load, and chose
++ * 504 Btyes as a threadhold to do a bulk push to upper tty layer when
++ * receiving bulk data, a much bigger buffer may cause stack overflow
++ */
++static void max3110_con_receive(struct uart_max3110 *max)
+ {
+ int loop = 1, num, total = 0;
+ u8 recv_buf[512], *pbuf;
+
+ pbuf = recv_buf;
+ do {
+- num = max3110_read_multi(max, 8, pbuf);
++ num = max3110_read_multi(max, pbuf);
+
+ if (num) {
+- loop = 10;
++ loop = 5;
+ pbuf += num;
+ total += num;
+
+- if (total >= 500) {
++ if (total >= 504) {
+ receive_chars(max, recv_buf, total);
+ pbuf = recv_buf;
+ total = 0;
+@@ -396,7 +429,7 @@ static int max3110_main_thread(void *_ma
+ mutex_lock(&max->thread_mutex);
+
+ if (test_and_clear_bit(BIT_IRQ_PENDING, &max->uart_flags))
+- max3110_console_receive(max);
++ max3110_con_receive(max);
+
+ /* first handle console output */
+ if (test_and_clear_bit(CON_TX_NEEDED, &max->uart_flags))
+@@ -433,9 +466,14 @@ static int max3110_read_thread(void *_ma
+
+ pr_info(PR_FMT "start read thread\n");
+ do {
+- mutex_lock(&max->thread_mutex);
+- max3110_console_receive(max);
+- mutex_unlock(&max->thread_mutex);
++ /*
++ * If can't acquire the mutex, it means the main thread
++ * is running which will also perform the rx job
++ */
++ if (mutex_trylock(&max->thread_mutex)) {
++ max3110_con_receive(max);
++ mutex_unlock(&max->thread_mutex);
++ }
+
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ / 20);
+@@ -452,15 +490,16 @@ static int serial_m3110_startup(struct u
+ u16 config = 0;
+ int ret = 0;
+
+- if (port->line != 0)
++ if (port->line != 0) {
+ pr_err(PR_FMT "uart port startup failed\n");
++ return -1;
++ }
+
+- /* firstly disable all IRQ and config it to 115200, 8n1 */
++ /* Disable all IRQ and config it to 115200, 8n1 */
+ config = WC_TAG | WC_FIFO_ENABLE
+ | WC_1_STOPBITS
+ | WC_8BIT_WORD
+ | WC_BAUD_DR2;
+- ret = max3110_out(max, config);
+
+ /* as we use thread to handle tx/rx, need set low latency */
+ port->state->port.tty->low_latency = 1;
+@@ -471,14 +510,30 @@ static int serial_m3110_startup(struct u
+ if (ret)
+ return ret;
+
+- /* enable RX IRQ only */
++ /* Enable RX IRQ only */
+ config |= WC_RXA_IRQ_ENABLE;
+- max3110_out(max, config);
+ #else
+- /* if IRQ is disabled, start a read thread for input data */
++ /* If IRQ is disabled, start a read thread for input data */
+ max->read_thread =
+ kthread_run(max3110_read_thread, max, "max3110_read");
++ if (IS_ERR(max->read_thread)) {
++ ret = PTR_ERR(max->read_thread);
++ max->read_thread = NULL;
++ pr_err(PR_FMT "Can't create read thread!");
++ return ret;
++ }
++#endif
++
++ ret = max3110_out(max, config);
++ if (ret) {
++#ifdef CONFIG_MRST_MAX3110_IRQ
++ free_irq(max->irq, max);
++#else
++ kthread_stop(max->read_thread);
++ max->read_thread = NULL;
+ #endif
++ return ret;
++ }
+
+ max->cur_conf = config;
+ return 0;
+@@ -515,8 +570,7 @@ static int serial_m3110_request_port(str
+
+ static void serial_m3110_config_port(struct uart_port *port, int flags)
+ {
+- /* give it fake type */
+- port->type = PORT_PXA;
++ port->type = PORT_MAX3100;
+ }
+
+ static int
+@@ -551,6 +605,9 @@ serial_m3110_set_termios(struct uart_por
+ new_conf |= WC_7BIT_WORD;
+ break;
+ default:
++ /* We only support CS7 & CS8 */
++ termios->c_cflag &= ~CSIZE;
++ termios->c_cflag |= CS8;
+ case CS8:
+ cval = UART_LCR_WLEN8;
+ new_conf |= WC_8BIT_WORD;
+@@ -559,7 +616,7 @@ serial_m3110_set_termios(struct uart_por
+
+ baud = uart_get_baud_rate(port, termios, old, 0, 230400);
+
+- /* first calc the div for 1.8MHZ clock case */
++ /* First calc the div for 1.8MHZ clock case */
+ switch (baud) {
+ case 300:
+ clk_div = WC_BAUD_DR384;
+@@ -595,7 +652,7 @@ serial_m3110_set_termios(struct uart_por
+ if (max->clock & MAX3110_HIGH_CLK)
+ break;
+ default:
+- /* pick the previous baud rate */
++ /* Pick the previous baud rate */
+ baud = max->baud;
+ clk_div = max->cur_conf & WC_BAUD_DIV_MASK;
+ tty_termios_encode_baud_rate(termios, baud, baud);
+@@ -603,15 +660,21 @@ serial_m3110_set_termios(struct uart_por
+
+ if (max->clock & MAX3110_HIGH_CLK) {
+ clk_div += 1;
+- /* high clk version max3110 doesn't support B300 */
+- if (baud == 300)
++ /* High clk version max3110 doesn't support B300 */
++ if (baud == 300) {
+ baud = 600;
++ clk_div = WC_BAUD_DR384;
++ }
+ if (baud == 230400)
+ clk_div = WC_BAUD_DR1;
+ tty_termios_encode_baud_rate(termios, baud, baud);
+ }
+
+ new_conf = (new_conf & ~WC_BAUD_DIV_MASK) | clk_div;
++
++ if (unlikely(termios->c_cflag & CMSPAR))
++ termios->c_cflag &= ~CMSPAR;
++
+ if (termios->c_cflag & CSTOPB)
+ new_conf |= WC_2_STOPBITS;
+ else
+@@ -631,13 +694,14 @@ serial_m3110_set_termios(struct uart_por
+
+ new_conf |= WC_TAG;
+ if (new_conf != max->cur_conf) {
+- max3110_out(max, new_conf);
+- max->cur_conf = new_conf;
+- max->baud = baud;
++ if (!max3110_out(max, new_conf)) {
++ max->cur_conf = new_conf;
++ max->baud = baud;
++ }
+ }
+ }
+
+-/* don't handle hw handshaking */
++/* Don't handle hw handshaking */
+ static unsigned int serial_m3110_get_mctrl(struct uart_port *port)
+ {
+ return TIOCM_DSR | TIOCM_CAR | TIOCM_DSR;
+@@ -671,7 +735,7 @@ struct uart_ops serial_m3110_ops = {
+ .break_ctl = serial_m3110_break_ctl,
+ .startup = serial_m3110_startup,
+ .shutdown = serial_m3110_shutdown,
+- .set_termios = serial_m3110_set_termios, /* must have */
++ .set_termios = serial_m3110_set_termios,
+ .pm = serial_m3110_pm,
+ .type = serial_m3110_type,
+ .release_port = serial_m3110_release_port,
+@@ -687,52 +751,60 @@ static struct uart_driver serial_m3110_r
+ .major = TTY_MAJOR,
+ .minor = 64,
+ .nr = 1,
+- .cons = MRST_CONSOLE,
++ .cons = &serial_m3110_console,
+ };
+
++#ifdef CONFIG_PM
+ static int serial_m3110_suspend(struct spi_device *spi, pm_message_t state)
+ {
++ struct uart_max3110 *max = spi_get_drvdata(spi);
++
++ disable_irq(max->irq);
++ uart_suspend_port(&serial_m3110_reg, &max->port);
++ max3110_out(max, max->cur_conf | WC_SW_SHDI);
+ return 0;
+ }
+
+ static int serial_m3110_resume(struct spi_device *spi)
+ {
++ struct uart_max3110 *max = spi_get_drvdata(spi);
++
++ max3110_out(max, max->cur_conf);
++ uart_resume_port(&serial_m3110_reg, &max->port);
++ enable_irq(max->irq);
+ return 0;
+ }
++#else
++#define serial_m3110_suspend NULL
++#define serial_m3110_resume NULL
++#endif
+
+-static struct dw_spi_chip spi0_uart = {
+- .poll_mode = 1,
+- .enable_dma = 0,
+- .type = SPI_FRF_SPI,
+-};
+-
+-static int serial_m3110_probe(struct spi_device *spi)
++static int __devinit serial_m3110_probe(struct spi_device *spi)
+ {
+ struct uart_max3110 *max;
+- int ret;
+- unsigned char *buffer;
++ void *buffer;
+ u16 res;
++ int ret = 0;
++
+ max = kzalloc(sizeof(*max), GFP_KERNEL);
+ if (!max)
+ return -ENOMEM;
+
+- /* set spi info */
+- spi->mode = SPI_MODE_0;
++ /* Set spi info */
+ spi->bits_per_word = 16;
+ max->clock = MAX3110_HIGH_CLK;
+- spi->controller_data = &spi0_uart;
+
+ spi_setup(spi);
+
+- max->port.type = PORT_PXA; /* need apply for a max3110 type */
+- max->port.fifosize = 2; /* only have 16b buffer */
++ max->port.type = PORT_MAX3100;
++ max->port.fifosize = 2; /* Only have 16b buffer */
+ max->port.ops = &serial_m3110_ops;
+ max->port.line = 0;
+ max->port.dev = &spi->dev;
+ max->port.uartclk = 115200;
+
+ max->spi = spi;
+- max->name = spi->modalias; /* use spi name as the name */
++ strcpy(max->name, spi->modalias);
+ max->irq = (u16)spi->irq;
+
+ mutex_init(&max->thread_mutex);
+@@ -754,13 +826,15 @@ static int serial_m3110_probe(struct spi
+ ret = -ENODEV;
+ goto err_get_page;
+ }
+- buffer = (unsigned char *)__get_free_page(GFP_KERNEL);
++
++ buffer = (void *)__get_free_page(GFP_KERNEL);
+ if (!buffer) {
+ ret = -ENOMEM;
+ goto err_get_page;
+ }
+- max->con_xmit.buf = (unsigned char *)buffer;
+- max->con_xmit.head = max->con_xmit.tail = 0;
++ max->con_xmit.buf = buffer;
++ max->con_xmit.head = 0;
++ max->con_xmit.tail = 0;
+
+ max->main_thread = kthread_run(max3110_main_thread,
+ max, "max3110_main");
+@@ -769,8 +843,10 @@ static int serial_m3110_probe(struct spi
+ goto err_kthread;
+ }
+
++ spi_set_drvdata(spi, max);
+ pmax = max;
+- /* give membase a psudo value to pass serial_core's check */
++
++ /* Give membase a psudo value to pass serial_core's check */
+ max->port.membase = (void *)0xff110000;
+ uart_add_one_port(&serial_m3110_reg, &max->port);
+
+@@ -779,19 +855,17 @@ static int serial_m3110_probe(struct spi
+ err_kthread:
+ free_page((unsigned long)buffer);
+ err_get_page:
+- pmax = NULL;
+ kfree(max);
+ return ret;
+ }
+
+-static int max3110_remove(struct spi_device *dev)
++static int __devexit serial_m3110_remove(struct spi_device *dev)
+ {
+- struct uart_max3110 *max = pmax;
++ struct uart_max3110 *max = spi_get_drvdata(dev);
+
+- if (!pmax)
++ if (!max)
+ return 0;
+
+- pmax = NULL;
+ uart_remove_one_port(&serial_m3110_reg, &max->port);
+
+ free_page((unsigned long)max->con_xmit.buf);
+@@ -810,13 +884,12 @@ static struct spi_driver uart_max3110_dr
+ .owner = THIS_MODULE,
+ },
+ .probe = serial_m3110_probe,
+- .remove = __devexit_p(max3110_remove),
++ .remove = __devexit_p(serial_m3110_remove),
+ .suspend = serial_m3110_suspend,
+ .resume = serial_m3110_resume,
+ };
+
+-
+-int __init serial_m3110_init(void)
++static int __init serial_m3110_init(void)
+ {
+ int ret = 0;
+
+@@ -831,7 +904,7 @@ int __init serial_m3110_init(void)
+ return ret;
+ }
+
+-void __exit serial_m3110_exit(void)
++static void __exit serial_m3110_exit(void)
+ {
+ spi_unregister_driver(&uart_max3110_driver);
+ uart_unregister_driver(&serial_m3110_reg);
+@@ -840,5 +913,5 @@ void __exit serial_m3110_exit(void)
+ module_init(serial_m3110_init);
+ module_exit(serial_m3110_exit);
+
+-MODULE_LICENSE("GPL");
++MODULE_LICENSE("GPL v2");
+ MODULE_ALIAS("max3110-uart");
+--- a/drivers/serial/mrst_max3110.h
++++ b/drivers/serial/mrst_max3110.h
+@@ -56,4 +56,5 @@
+ #define WC_BAUD_DR192 (0xE)
+ #define WC_BAUD_DR384 (0xF)
+
++#define M3110_RX_FIFO_DEPTH 8
+ #endif
diff --git a/usb/ohci-work-around-for-nvidia-shutdown-problem.patch b/usb/ohci-work-around-for-nvidia-shutdown-problem.patch
new file mode 100644
index 00000000000000..a1e62cd803a349
--- /dev/null
+++ b/usb/ohci-work-around-for-nvidia-shutdown-problem.patch
@@ -0,0 +1,166 @@
+From stern+4c863d94@rowland.harvard.edu Tue Sep 21 13:32:23 2010
+Date: Fri, 10 Sep 2010 16:37:05 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+cc: =?ISO-8859-1?Q?Pali_Roh=C3=A1r?= <pali.rohar@gmail.com>, David Brownell <david-b@pacbell.net>
+Subject: OHCI: work around for nVidia shutdown problem
+Message-ID: <Pine.LNX.4.44L0.1009101634500.1651-100000@iolanthe.rowland.org>
+
+This patch (as1417) fixes a problem affecting some (or all) nVidia
+chipsets. When the computer is shut down, the OHCI controllers
+continue to power the USB buses and evidently they drive a Reset
+signal out all their ports. This prevents attached devices from going
+to low power. Mouse LEDs stay on, for example, which is disconcerting
+for users and a drain on laptop batteries.
+
+The fix involves leaving each OHCI controller in the OPERATIONAL state
+during system shutdown rather than putting it in the RESET state.
+Although this nominally means the controller is running, in fact it's
+not doing very much since all the schedules are all disabled. However
+there is ongoing DMA to the Host Controller Communications Area, so
+the patch also disables the bus-master capability of all PCI USB
+controllers after the shutdown routine runs.
+
+The fix is applied only to nVidia-based PCI OHCI controllers, so it
+shouldn't cause problems on systems using other hardware. As an added
+safety measure, in case the kernel encounters one of these running
+controllers during boot, the patch changes quirk_usb_handoff_ohci()
+(which runs early on during PCI discovery) to reset the controller
+before anything bad can happen.
+
+Reported-by: Pali Rohár <pali.rohar@gmail.com>
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+CC: David Brownell <david-b@pacbell.net>
+Tested-by: Pali Rohár <pali.rohar@gmail.com>
+CC: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hcd-pci.c | 4 +++-
+ drivers/usb/host/ohci-hcd.c | 9 ++++++++-
+ drivers/usb/host/ohci-pci.c | 18 ++++++++++++++++++
+ drivers/usb/host/ohci.h | 1 +
+ drivers/usb/host/pci-quirks.c | 18 +++++++++++-------
+ 5 files changed, 41 insertions(+), 9 deletions(-)
+
+--- a/drivers/usb/core/hcd-pci.c
++++ b/drivers/usb/core/hcd-pci.c
+@@ -329,8 +329,10 @@ void usb_hcd_pci_shutdown(struct pci_dev
+ return;
+
+ if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) &&
+- hcd->driver->shutdown)
++ hcd->driver->shutdown) {
+ hcd->driver->shutdown(hcd);
++ pci_disable_device(dev);
++ }
+ }
+ EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown);
+
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -398,7 +398,14 @@ ohci_shutdown (struct usb_hcd *hcd)
+
+ ohci = hcd_to_ohci (hcd);
+ ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
+- ohci_usb_reset (ohci);
++ ohci->hc_control = ohci_readl(ohci, &ohci->regs->control);
++
++ /* If the SHUTDOWN quirk is set, don't put the controller in RESET */
++ ohci->hc_control &= (ohci->flags & OHCI_QUIRK_SHUTDOWN ?
++ OHCI_CTRL_RWC | OHCI_CTRL_HCFS :
++ OHCI_CTRL_RWC);
++ ohci_writel(ohci, ohci->hc_control, &ohci->regs->control);
++
+ /* flush the writes */
+ (void) ohci_readl (ohci, &ohci->regs->control);
+ }
+--- a/drivers/usb/host/ohci-pci.c
++++ b/drivers/usb/host/ohci-pci.c
+@@ -201,6 +201,20 @@ static int ohci_quirk_amd700(struct usb_
+ return 0;
+ }
+
++/* nVidia controllers continue to drive Reset signalling on the bus
++ * even after system shutdown, wasting power. This flag tells the
++ * shutdown routine to leave the controller OPERATIONAL instead of RESET.
++ */
++static int ohci_quirk_nvidia_shutdown(struct usb_hcd *hcd)
++{
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++
++ ohci->flags |= OHCI_QUIRK_SHUTDOWN;
++ ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
++
++ return 0;
++}
++
+ /*
+ * The hardware normally enables the A-link power management feature, which
+ * lets the system lower the power consumption in idle states.
+@@ -332,6 +346,10 @@ static const struct pci_device_id ohci_p
+ PCI_DEVICE(PCI_VENDOR_ID_ATI, 0x4399),
+ .driver_data = (unsigned long)ohci_quirk_amd700,
+ },
++ {
++ PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID),
++ .driver_data = (unsigned long) ohci_quirk_nvidia_shutdown,
++ },
+
+ /* FIXME for some of the early AMD 760 southbridges, OHCI
+ * won't work at all. blacklist them.
+--- a/drivers/usb/host/ohci.h
++++ b/drivers/usb/host/ohci.h
+@@ -403,6 +403,7 @@ struct ohci_hcd {
+ #define OHCI_QUIRK_HUB_POWER 0x100 /* distrust firmware power/oc setup */
+ #define OHCI_QUIRK_AMD_ISO 0x200 /* ISO transfers*/
+ #define OHCI_QUIRK_AMD_PREFETCH 0x400 /* pre-fetch for ISO transfer */
++#define OHCI_QUIRK_SHUTDOWN 0x800 /* nVidia power bug */
+ // there are also chip quirks/bugs in init logic
+
+ struct work_struct nec_work; /* Worker for NEC quirk */
+--- a/drivers/usb/host/pci-quirks.c
++++ b/drivers/usb/host/pci-quirks.c
+@@ -169,6 +169,7 @@ static int __devinit mmio_resource_enabl
+ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
+ {
+ void __iomem *base;
++ u32 control;
+
+ if (!mmio_resource_enabled(pdev, 0))
+ return;
+@@ -177,10 +178,14 @@ static void __devinit quirk_usb_handoff_
+ if (base == NULL)
+ return;
+
++ control = readl(base + OHCI_CONTROL);
++
+ /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
+-#ifndef __hppa__
+-{
+- u32 control = readl(base + OHCI_CONTROL);
++#ifdef __hppa__
++#define OHCI_CTRL_MASK (OHCI_CTRL_RWC | OHCI_CTRL_IR)
++#else
++#define OHCI_CTRL_MASK OHCI_CTRL_RWC
++
+ if (control & OHCI_CTRL_IR) {
+ int wait_time = 500; /* arbitrary; 5 seconds */
+ writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
+@@ -194,13 +199,12 @@ static void __devinit quirk_usb_handoff_
+ dev_warn(&pdev->dev, "OHCI: BIOS handoff failed"
+ " (BIOS bug?) %08x\n",
+ readl(base + OHCI_CONTROL));
+-
+- /* reset controller, preserving RWC */
+- writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
+ }
+-}
+ #endif
+
++ /* reset controller, preserving RWC (and possibly IR) */
++ writel(control & OHCI_CTRL_MASK, base + OHCI_CONTROL);
++
+ /*
+ * disable interrupts
+ */
diff --git a/usb/usb-change-acm_iad_descriptor-bfunctionprotocol-to-usb_cdc_acm_proto_at_v25ter.patch b/usb/usb-change-acm_iad_descriptor-bfunctionprotocol-to-usb_cdc_acm_proto_at_v25ter.patch
new file mode 100644
index 00000000000000..f4238d6e689ada
--- /dev/null
+++ b/usb/usb-change-acm_iad_descriptor-bfunctionprotocol-to-usb_cdc_acm_proto_at_v25ter.patch
@@ -0,0 +1,36 @@
+From linux-usb-owner@vger.kernel.org Tue Sep 21 13:31:27 2010
+From: Praveena Nadahally <praveen.nadahally@stericsson.com>
+Cc: <STEricsson_nomadik_linux@list.st.com>,
+ <linus.walleij@stericsson.com>,
+ Praveena Nadahally <praveen.nadahally@stericsson.com>
+Subject: USB: Change acm_iad_descriptor bFunctionProtocol to USB_CDC_ACM_PROTO_AT_V25TER
+Date: Fri, 10 Sep 2010 23:05:03 +0530
+Message-ID: <1284140103-1413-1-git-send-email-praveen.nadahally@stericsson.com>
+
+The protocol code is set 00 in IAD and it's set to 01 in ACM control
+interface descriptor in f_acm.c file. Due to this, windows is unable to
+install the modem(ACM) driver based on class-subclass-protocol matching.
+
+This patch corrects the protocol code in ACM IAD to the same as in
+acm_control_interface_desc protocol code.
+
+Acked-by: Linus Walleij <linus.walleij@stericsson.com>
+Signed-off-by: Praveena Nadahally <praveen.nadahally@stericsson.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/f_acm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/f_acm.c
++++ b/drivers/usb/gadget/f_acm.c
+@@ -111,7 +111,7 @@ acm_iad_descriptor = {
+ .bInterfaceCount = 2, // control + data
+ .bFunctionClass = USB_CLASS_COMM,
+ .bFunctionSubClass = USB_CDC_SUBCLASS_ACM,
+- .bFunctionProtocol = USB_CDC_PROTO_NONE,
++ .bFunctionProtocol = USB_CDC_ACM_PROTO_AT_V25TER,
+ /* .iFunction = DYNAMIC */
+ };
+
diff --git a/usb/usb-ftdi_sio-add-pid-for-accesio-products.patch b/usb/usb-ftdi_sio-add-pid-for-accesio-products.patch
new file mode 100644
index 00000000000000..ae32cfc0ed7555
--- /dev/null
+++ b/usb/usb-ftdi_sio-add-pid-for-accesio-products.patch
@@ -0,0 +1,42 @@
+From richmattes@gmail.com Tue Sep 21 13:43:10 2010
+Message-ID: <4C8EFB9C.2080608@gmail.com>
+Date: Tue, 14 Sep 2010 00:35:40 -0400
+From: Rich Mattes <richmattes@gmail.com>
+To: gregkh@suse.de
+Cc: linux-usb@vger.kernel.org
+Subject: USB: ftdi_sio: Add PID for accesio products
+
+Adds support for Accesio USB to Serial adapters, which are built around
+FTDI FT232 UARTs. Tested with the Accesio USB-COM-4SM.
+
+Signed-off-by: Rich Mattes <richmattes@gmail.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 1 +
+ drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -751,6 +751,7 @@ static struct usb_device_id id_table_com
+ { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID),
+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+ { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) },
++ { USB_DEVICE(FTDI_VID, ACCESIO_COM4SM_PID) },
+ { USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID),
+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+ { USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_24_MASTER_WING_PID) },
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -1063,3 +1063,9 @@
+ * Submitted by John G. Rogers
+ */
+ #define SEGWAY_RMP200_PID 0xe729
++
++
++/*
++ * Accesio USB Data Acquisition products (http://www.accesio.com/)
++ */
++#define ACCESIO_COM4SM_PID 0xD578
diff --git a/usb/usb-gadget-composite-prevent-oops-for-non-standard-control-request.patch b/usb/usb-gadget-composite-prevent-oops-for-non-standard-control-request.patch
new file mode 100644
index 00000000000000..c05c10aa8f6bb8
--- /dev/null
+++ b/usb/usb-gadget-composite-prevent-oops-for-non-standard-control-request.patch
@@ -0,0 +1,61 @@
+From linux-usb-owner@vger.kernel.org Tue Sep 21 13:33:12 2010
+From: Roger Quadros <roger.quadros@nokia.com>
+To: dbrownell@users.sourceforge.net
+Cc: linux-usb@vger.kernel.org
+Subject: usb gadget: composite: prevent OOPS for non-standard control request
+Date: Wed, 8 Sep 2010 13:48:44 +0300
+Message-Id: <1283942924-31991-1-git-send-email-roger.quadros@nokia.com>
+
+From: Roger Quadros <roger.quadros@nokia.com>
+
+The composite gadget will OOPS if the host sends a control request
+targetted to an interface of an un-configured composite device. This patch
+prevents this.
+
+The OOPS was observed during WHQL USB CV tests. With this patch, the device
+STALLs as per requirement.
+
+Failing test case: From host do the following. I used libusb-1.0
+
+1) Set configuration to zero.
+ libusb_control_transfer(device_handle,
+ 0, /* standard OUT */
+ 0x9, /* setConfiguration */
+ 0, 0, NULL, 0, 0);
+
+2) Query current configuratioan.
+ libusb_control_transfer(device_handle,
+ 0x80, /* standard IN*/
+ 0x8, /* getConfiguration */
+ 0, 0, data, 1, 0);
+
+3) Send the non-standard ctrl transfer targetted to interface
+ libusb_control_transfer(device_handle,
+ 0x81, /* standard IN to interface*/
+ 0x6, /* getDescriptor */
+ 0x2300, 0, data, 0x12, 0);
+
+Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
+Cc: stable <stable@kernel.org>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Michal Nazarewicz <m.nazarewicz@samsung.com>
+Cc: Robert Lukassen <robert.lukassen@tomtom.com>
+Cc: Kyungmin Park <kyungmin.park@samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/composite.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/composite.c
++++ b/drivers/usb/gadget/composite.c
+@@ -928,7 +928,8 @@ unknown:
+ */
+ switch (ctrl->bRequestType & USB_RECIP_MASK) {
+ case USB_RECIP_INTERFACE:
+- f = cdev->config->interface[intf];
++ if (cdev->config)
++ f = cdev->config->interface[intf];
+ break;
+
+ case USB_RECIP_ENDPOINT:
diff --git a/usb/usb-gadget-remove-pr_-level-uses-of-kern_-level.patch b/usb/usb-gadget-remove-pr_-level-uses-of-kern_-level.patch
new file mode 100644
index 00000000000000..2c1f933326d264
--- /dev/null
+++ b/usb/usb-gadget-remove-pr_-level-uses-of-kern_-level.patch
@@ -0,0 +1,28 @@
+From joe@perches.com Tue Sep 21 13:35:19 2010
+From: Joe Perches <joe@perches.com>
+To: Jiri Kosina <trivial@kernel.org>
+Cc: David Brownell <dbrownell@users.sourceforge.net>,
+ Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org,
+ linux-kernel@vger.kernel.org
+Subject: USB: gadget: Remove pr_<level> uses of KERN_<level>
+Date: Sat, 11 Sep 2010 22:10:58 -0700
+Message-Id: <141dd5ea20749b4b37d60cae53d1751bb88ba15c.1284267142.git.joe@perches.com>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/r8a66597-udc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/r8a66597-udc.c
++++ b/drivers/usb/gadget/r8a66597-udc.c
+@@ -274,7 +274,7 @@ static int pipe_buffer_setting(struct r8
+ }
+
+ if (buf_bsize && ((bufnum + 16) >= R8A66597_MAX_BUFNUM)) {
+- pr_err(KERN_ERR "r8a66597 pipe memory is insufficient\n");
++ pr_err("r8a66597 pipe memory is insufficient\n");
+ return -ENOMEM;
+ }
+
diff --git a/usb/usb-host-oxu210hp-hcd-use-static-const-char-const-where-possible.patch b/usb/usb-host-oxu210hp-hcd-use-static-const-char-const-where-possible.patch
new file mode 100644
index 00000000000000..bd8858cf5e142b
--- /dev/null
+++ b/usb/usb-host-oxu210hp-hcd-use-static-const-char-const-where-possible.patch
@@ -0,0 +1,26 @@
+From joe@perches.com Tue Sep 21 13:42:51 2010
+From: Joe Perches <joe@perches.com>
+To: linux-kernel@vger.kernel.org
+Cc: Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org
+Subject: usb: host: oxu210hp-hcd: Use static const char * const where possible
+Date: Mon, 13 Sep 2010 21:23:58 -0700
+Message-Id: <84f23080775f186887489722fd2a3af4a3af3974.1284435710.git.joe@perches.com>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/oxu210hp-hcd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/oxu210hp-hcd.c
++++ b/drivers/usb/host/oxu210hp-hcd.c
+@@ -3696,7 +3696,7 @@ static void oxu_configuration(struct pla
+ static int oxu_verify_id(struct platform_device *pdev, void *base)
+ {
+ u32 id;
+- char *bo[] = {
++ static const char * const bo[] = {
+ "reserved",
+ "128-pin LQFP",
+ "84-pin TFBGA",
diff --git a/usb/usb-isp1362-hcd-removes-config_usb_otg-dependent-code.patch b/usb/usb-isp1362-hcd-removes-config_usb_otg-dependent-code.patch
new file mode 100644
index 00000000000000..c00803ec5baea7
--- /dev/null
+++ b/usb/usb-isp1362-hcd-removes-config_usb_otg-dependent-code.patch
@@ -0,0 +1,52 @@
+From martinez.javier@gmail.com Tue Sep 21 13:34:17 2010
+Subject: [PATCH] USB: isp1362-hcd: Removes CONFIG_USB_OTG dependent code,
+ fix build breakage
+From: Javier Martinez Canillas <martinez.javier@gmail.com>
+To: Greg Kroah-Hartman <gregkh@suse.de>,
+ Mike Frysinger <vapier@gentoo.org>,
+ Lothar Wassmann <LW@KARO-electronics.de>,
+ Julia Lawall <julia@diku.dk>,
+ Andrew Morton <akpm@linux-foundation.org>, linux-usb@vger.kernel.org,
+ linux-kernel@vger.kernel.org
+Date: Thu, 09 Sep 2010 17:31:29 -0400
+Message-ID: <1284067889.4583.3.camel@lenovo>
+
+In today linux-next I got a compile error on usb/host/isp1362-hcd:
+
+drivers/usb/host/isp1362-hcd.c: In function ‘isp1362_hub_control’:
+drivers/usb/host/isp1362-hcd.c:1680: error: ‘ohci’ undeclared (first use in this function)
+
+The problem is when the CONFIG_USB_OTG option is enabled.
+
+ohci variable is never declared and there isn't any CONFIG_USB_OTG dependent code
+besides the portion defined in isp1362_hub_control.
+
+So I think that maybe USB OTG support is not needed/supported.
+
+This patch removes the CONFIG_USB_OTG dependent block so the driver can compile cleanly.
+
+Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
+Cc: Mike Frysinger <vapier@gentoo.org>
+Cc: Lothar Wassmann <LW@KARO-electronics.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/isp1362-hcd.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/drivers/usb/host/isp1362-hcd.c
++++ b/drivers/usb/host/isp1362-hcd.c
+@@ -1676,13 +1676,6 @@ static int isp1362_hub_control(struct us
+ switch (wValue) {
+ case USB_PORT_FEAT_SUSPEND:
+ _DBG(0, "USB_PORT_FEAT_SUSPEND\n");
+-#ifdef CONFIG_USB_OTG
+- if (ohci->hcd.self.otg_port == (wIndex + 1) &&
+- ohci->hcd.self.b_hnp_enable) {
+- start_hnp(ohci);
+- break;
+- }
+-#endif
+ spin_lock_irqsave(&isp1362_hcd->lock, flags);
+ isp1362_write_reg32(isp1362_hcd, HCRHPORT1 + wIndex, RH_PS_PSS);
+ isp1362_hcd->rhport[wIndex] =
diff --git a/usb/usb-ohci-sm501-add-iounmap-on-error-path.patch b/usb/usb-ohci-sm501-add-iounmap-on-error-path.patch
new file mode 100644
index 00000000000000..20addc0aac0cc4
--- /dev/null
+++ b/usb/usb-ohci-sm501-add-iounmap-on-error-path.patch
@@ -0,0 +1,39 @@
+From linux-usb-owner@vger.kernel.org Tue Sep 21 13:32:09 2010
+Date: Fri, 10 Sep 2010 21:35:15 +0200
+From: Dan Carpenter <error27@gmail.com>
+To: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org,
+ kernel-janitors@vger.kernel.org
+Subject: USB: ohci-sm501: add iounmap on error path
+Message-ID: <20100910193515.GH5959@bicker>
+Content-Disposition: inline
+
+This ioremap() was leaked on an error path.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-sm501.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ohci-sm501.c
++++ b/drivers/usb/host/ohci-sm501.c
+@@ -168,7 +168,7 @@ static int ohci_hcd_sm501_drv_probe(stru
+
+ retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
+ if (retval)
+- goto err4;
++ goto err5;
+
+ /* enable power and unmask interrupts */
+
+@@ -176,6 +176,8 @@ static int ohci_hcd_sm501_drv_probe(stru
+ sm501_modify_reg(dev->parent, SM501_IRQ_MASK, 1 << 6, 0);
+
+ return 0;
++err5:
++ iounmap(hcd->regs);
+ err4:
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ err3:
diff --git a/usb/usb-omap-ohci-missing-driver-unregister-in-module-exit.patch b/usb/usb-omap-ohci-missing-driver-unregister-in-module-exit.patch
new file mode 100644
index 00000000000000..6af060de2dfd2b
--- /dev/null
+++ b/usb/usb-omap-ohci-missing-driver-unregister-in-module-exit.patch
@@ -0,0 +1,34 @@
+From linux-usb-owner@vger.kernel.org Tue Sep 21 13:43:34 2010
+From: Keshava Munegowda <keshava_mgowda@ti.com>
+To: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org
+Cc: gadiyar@ti.com, nskamat@ti.com,
+ Keshava Munegowda <keshava_mgowda@ti.com>
+Subject: usb: omap: ohci: Missing driver unregister in module exit
+Date: Tue, 14 Sep 2010 04:40:01 +0530
+Message-Id: <1284419401-32101-1-git-send-email-keshava_mgowda@ti.com>
+
+The un-registration of OHCI driver was not done in the ohci_hcd_mod_exit
+function. This was affecting rmmod command not to work for OMAP3
+platforms. The platform driver un-registration for OMAP3 platforms is
+perfomed while removing the OHCI module from kernel.
+
+Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
+Signed-of-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-hcd.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -1277,6 +1277,9 @@ static void __exit ohci_hcd_mod_exit(voi
+ #ifdef PLATFORM_DRIVER
+ platform_driver_unregister(&PLATFORM_DRIVER);
+ #endif
++#ifdef OMAP3_PLATFORM_DRIVER
++ platform_driver_unregister(&OMAP3_PLATFORM_DRIVER);
++#endif
+ #ifdef PS3_SYSTEM_BUS_DRIVER
+ ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
+ #endif
diff --git a/usb/usb-option-add-more-zte-modem-usb-id-s.patch b/usb/usb-option-add-more-zte-modem-usb-id-s.patch
new file mode 100644
index 00000000000000..9a51bbd4c8044f
--- /dev/null
+++ b/usb/usb-option-add-more-zte-modem-usb-id-s.patch
@@ -0,0 +1,104 @@
+From linux-usb-owner@vger.kernel.org Tue Sep 21 13:36:08 2010
+Message-ID: <4C8CE6AE.3040506@redhat.com>
+Date: Sun, 12 Sep 2010 11:41:50 -0300
+From: Mauro Carvalho Chehab <mchehab@redhat.com>
+To: Greg KH <greg@kroah.com>
+CC: linux-usb@vger.kernel.org, Matthias Urlichs <smurf@smurf.noris.de>
+Subject: USB: option: Add more ZTE modem USB id's
+
+There are lots of ZTE USB id's currently not covered by usb/serial. Adds them,
+to allow those devices to work properly on Linux.
+
+While here, put the USB ID's for 0x2002/0x2003 at the sorted order.
+
+This patch is based on zte.c file found on MF645.
+
+PS.: The ZTE driver is commenting the USB ID for 0x0053. It also adds, commented,
+an USB ID for 0x0026.
+
+Not sure why, but I think that 0053 is used by their devices in storage mode only.
+So, I opted to keep the comment on this patch.
+
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/option.c | 23 ++++++++++++++++++++---
+ 1 file changed, 20 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -622,6 +622,7 @@ static const struct usb_device_id option
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0011, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff) },
+@@ -633,38 +634,52 @@ static const struct usb_device_id option
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0023, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff) },
+- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) },
++ /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0038, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0040, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0043, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0044, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0048, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0050, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff) },
++ /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0056, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0064, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0065, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0079, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0082, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0083, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) },
+- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) },
+- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0087, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0106, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0108, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0113, 0xff, 0xff, 0xff) },
+@@ -880,6 +895,8 @@ static const struct usb_device_id option
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) },
++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },
diff --git a/usb/usb-otg-add-common-data-structure-for-intel-mid-platform-langwell-penwell.patch b/usb/usb-otg-add-common-data-structure-for-intel-mid-platform-langwell-penwell.patch
new file mode 100644
index 00000000000000..8fef4fba4006dc
--- /dev/null
+++ b/usb/usb-otg-add-common-data-structure-for-intel-mid-platform-langwell-penwell.patch
@@ -0,0 +1,206 @@
+From alan@linux.intel.com Tue Sep 21 13:28:47 2010
+From: Hao Wu <hao.wu@intel.com>
+Subject: USB OTG: Add common data structure for Intel MID Platform (Langwell/Penwell)
+To: greg@kroah.com, randy.dunlap@oracle.com, linux-usb@vger.kernel.org
+Date: Thu, 09 Sep 2010 22:35:39 +0100
+Message-ID: <20100909213508.12453.40511.stgit@localhost.localdomain>
+
+From: Hao Wu <hao.wu@intel.com>
+
+This patch adds one new header file for the common data structure used in
+Intel Penwell/Langwell MID Platform OTG Transceiver drivers. After switched
+to the common data structure, Langwell/Penwell OTG Transceiver driver will
+provide an unified interface to host/client driver.
+
+Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
+Signed-off-by: Hao Wu <hao.wu@intel.com>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/usb/intel_mid_otg.h | 180 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 180 insertions(+)
+
+--- /dev/null
++++ b/include/linux/usb/intel_mid_otg.h
+@@ -0,0 +1,180 @@
++/*
++ * Intel MID (Langwell/Penwell) USB OTG Transceiver driver
++ * Copyright (C) 2008 - 2010, Intel Corporation.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms and conditions of the GNU General Public License,
++ * version 2, as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
++ * more details.
++ *
++ * You should have received a copy of the GNU General Public License along with
++ * this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ */
++
++#ifndef __INTEL_MID_OTG_H
++#define __INTEL_MID_OTG_H
++
++#include <linux/pm.h>
++#include <linux/usb/otg.h>
++#include <linux/notifier.h>
++
++struct intel_mid_otg_xceiv;
++
++/* This is a common data structure for Intel MID platform to
++ * save values of the OTG state machine */
++struct otg_hsm {
++ /* Input */
++ int a_bus_resume;
++ int a_bus_suspend;
++ int a_conn;
++ int a_sess_vld;
++ int a_srp_det;
++ int a_vbus_vld;
++ int b_bus_resume;
++ int b_bus_suspend;
++ int b_conn;
++ int b_se0_srp;
++ int b_ssend_srp;
++ int b_sess_end;
++ int b_sess_vld;
++ int id;
++/* id values */
++#define ID_B 0x05
++#define ID_A 0x04
++#define ID_ACA_C 0x03
++#define ID_ACA_B 0x02
++#define ID_ACA_A 0x01
++ int power_up;
++ int adp_change;
++ int test_device;
++
++ /* Internal variables */
++ int a_set_b_hnp_en;
++ int b_srp_done;
++ int b_hnp_enable;
++ int hnp_poll_enable;
++
++ /* Timeout indicator for timers */
++ int a_wait_vrise_tmout;
++ int a_wait_bcon_tmout;
++ int a_aidl_bdis_tmout;
++ int a_bidl_adis_tmout;
++ int a_bidl_adis_tmr;
++ int a_wait_vfall_tmout;
++ int b_ase0_brst_tmout;
++ int b_bus_suspend_tmout;
++ int b_srp_init_tmout;
++ int b_srp_fail_tmout;
++ int b_srp_fail_tmr;
++ int b_adp_sense_tmout;
++
++ /* Informative variables */
++ int a_bus_drop;
++ int a_bus_req;
++ int a_clr_err;
++ int b_bus_req;
++ int a_suspend_req;
++ int b_bus_suspend_vld;
++
++ /* Output */
++ int drv_vbus;
++ int loc_conn;
++ int loc_sof;
++
++ /* Others */
++ int vbus_srp_up;
++};
++
++/* must provide ULPI access function to read/write registers implemented in
++ * ULPI address space */
++struct iotg_ulpi_access_ops {
++ int (*read)(struct intel_mid_otg_xceiv *iotg, u8 reg, u8 *val);
++ int (*write)(struct intel_mid_otg_xceiv *iotg, u8 reg, u8 val);
++};
++
++#define OTG_A_DEVICE 0x0
++#define OTG_B_DEVICE 0x1
++
++/*
++ * the Intel MID (Langwell/Penwell) otg transceiver driver needs to interact
++ * with device and host drivers to implement the USB OTG related feature. More
++ * function members are added based on otg_transceiver data structure for this
++ * purpose.
++ */
++struct intel_mid_otg_xceiv {
++ struct otg_transceiver otg;
++ struct otg_hsm hsm;
++
++ /* base address */
++ void __iomem *base;
++
++ /* ops to access ulpi */
++ struct iotg_ulpi_access_ops ulpi_ops;
++
++ /* atomic notifier for interrupt context */
++ struct atomic_notifier_head iotg_notifier;
++
++ /* start/stop USB Host function */
++ int (*start_host)(struct intel_mid_otg_xceiv *iotg);
++ int (*stop_host)(struct intel_mid_otg_xceiv *iotg);
++
++ /* start/stop USB Peripheral function */
++ int (*start_peripheral)(struct intel_mid_otg_xceiv *iotg);
++ int (*stop_peripheral)(struct intel_mid_otg_xceiv *iotg);
++
++ /* start/stop ADP sense/probe function */
++ int (*set_adp_probe)(struct intel_mid_otg_xceiv *iotg,
++ bool enabled, int dev);
++ int (*set_adp_sense)(struct intel_mid_otg_xceiv *iotg,
++ bool enabled);
++
++#ifdef CONFIG_PM
++ /* suspend/resume USB host function */
++ int (*suspend_host)(struct intel_mid_otg_xceiv *iotg,
++ pm_message_t message);
++ int (*resume_host)(struct intel_mid_otg_xceiv *iotg);
++
++ int (*suspend_peripheral)(struct intel_mid_otg_xceiv *iotg,
++ pm_message_t message);
++ int (*resume_peripheral)(struct intel_mid_otg_xceiv *iotg);
++#endif
++
++};
++static inline
++struct intel_mid_otg_xceiv *otg_to_mid_xceiv(struct otg_transceiver *otg)
++{
++ return container_of(otg, struct intel_mid_otg_xceiv, otg);
++}
++
++#define MID_OTG_NOTIFY_CONNECT 0x0001
++#define MID_OTG_NOTIFY_DISCONN 0x0002
++#define MID_OTG_NOTIFY_HSUSPEND 0x0003
++#define MID_OTG_NOTIFY_HRESUME 0x0004
++#define MID_OTG_NOTIFY_CSUSPEND 0x0005
++#define MID_OTG_NOTIFY_CRESUME 0x0006
++#define MID_OTG_NOTIFY_HOSTADD 0x0007
++#define MID_OTG_NOTIFY_HOSTREMOVE 0x0008
++#define MID_OTG_NOTIFY_CLIENTADD 0x0009
++#define MID_OTG_NOTIFY_CLIENTREMOVE 0x000a
++
++static inline int
++intel_mid_otg_register_notifier(struct intel_mid_otg_xceiv *iotg,
++ struct notifier_block *nb)
++{
++ return atomic_notifier_chain_register(&iotg->iotg_notifier, nb);
++}
++
++static inline void
++intel_mid_otg_unregister_notifier(struct intel_mid_otg_xceiv *iotg,
++ struct notifier_block *nb)
++{
++ atomic_notifier_chain_unregister(&iotg->iotg_notifier, nb);
++}
++
++#endif /* __INTEL_MID_OTG_H */
diff --git a/usb/usb-otg-langwell-update-otg-kconfig-and-driver-version.patch b/usb/usb-otg-langwell-update-otg-kconfig-and-driver-version.patch
new file mode 100644
index 00000000000000..ec96e6eb44db3f
--- /dev/null
+++ b/usb/usb-otg-langwell-update-otg-kconfig-and-driver-version.patch
@@ -0,0 +1,63 @@
+From alan@linux.intel.com Tue Sep 21 13:29:35 2010
+From: Hao Wu <hao.wu@intel.com>
+Subject: USB OTG Langwell: Update OTG Kconfig and driver version.
+To: greg@kroah.com, randy.dunlap@oracle.com, linux-usb@vger.kernel.org
+Date: Thu, 09 Sep 2010 22:35:54 +0100
+Message-ID: <20100909213546.12453.19125.stgit@localhost.localdomain>
+
+From: Hao Wu <hao.wu@intel.com>
+
+This patch updated Kconfig for langwell otg transceiver driver.
+Add ipc driver(INTEL_SCU_IPC) as a dependency. Driver version is
+updated too.
+
+Signed-off-by: Hao Wu <hao.wu@intel.com>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/otg/Kconfig | 2 +-
+ drivers/usb/otg/langwell_otg.c | 4 ++--
+ include/linux/usb/langwell_otg.h | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/otg/Kconfig
++++ b/drivers/usb/otg/Kconfig
+@@ -69,7 +69,7 @@ config NOP_USB_XCEIV
+
+ config USB_LANGWELL_OTG
+ tristate "Intel Langwell USB OTG dual-role support"
+- depends on USB && X86_MRST
++ depends on USB && PCI && INTEL_SCU_IPC
+ select USB_OTG
+ select USB_OTG_UTILS
+ help
+--- a/drivers/usb/otg/langwell_otg.c
++++ b/drivers/usb/otg/langwell_otg.c
+@@ -1,6 +1,6 @@
+ /*
+ * Intel Langwell USB OTG transceiver driver
+- * Copyright (C) 2008 - 2009, Intel Corporation.
++ * Copyright (C) 2008 - 2010, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+@@ -40,7 +40,7 @@
+ #include <linux/usb/langwell_otg.h>
+
+ #define DRIVER_DESC "Intel Langwell USB OTG transceiver driver"
+-#define DRIVER_VERSION "3.0.0.32L.0003"
++#define DRIVER_VERSION "July 10, 2010"
+
+ MODULE_DESCRIPTION(DRIVER_DESC);
+ MODULE_AUTHOR("Henry Yuan <hang.yuan@intel.com>, Hao Wu <hao.wu@intel.com>");
+--- a/include/linux/usb/langwell_otg.h
++++ b/include/linux/usb/langwell_otg.h
+@@ -1,6 +1,6 @@
+ /*
+ * Intel Langwell USB OTG transceiver driver
+- * Copyright (C) 2008, Intel Corporation.
++ * Copyright (C) 2008 - 2010, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
diff --git a/usb/usb-r8a66597-udc-initialize-uninitialized-variable-fix-compile-warning.patch b/usb/usb-r8a66597-udc-initialize-uninitialized-variable-fix-compile-warning.patch
new file mode 100644
index 00000000000000..13cbd63b81a428
--- /dev/null
+++ b/usb/usb-r8a66597-udc-initialize-uninitialized-variable-fix-compile-warning.patch
@@ -0,0 +1,39 @@
+From linux-usb-owner@vger.kernel.org Tue Sep 21 13:30:34 2010
+Subject: USB: r8a66597-udc: Initialize uninitialized variable, fix compile warning
+From: Javier Martinez Canillas <martinez.javier@gmail.com>
+To: David Brownell <dbrownell@users.sourceforge.net>,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Paul Mundt <lethal@linux-sh.org>,
+ Magnus Damm <damm@opensource.se>,
+ Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
+ linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
+Date: Fri, 10 Sep 2010 08:42:08 -0400
+Message-ID: <1284122528.6726.4.camel@lenovo>
+
+In today linux-next I got a compile warning due a possible uninitialized variable
+
+This patch solves the issue initializing the variable
+
+
+Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Paul Mundt <lethal@linux-sh.org>
+Cc: Magnus Damm <damm@opensource.se>
+Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/r8a66597-udc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/r8a66597-udc.h
++++ b/drivers/usb/gadget/r8a66597-udc.h
+@@ -136,7 +136,7 @@ static inline void r8a66597_read_fifo(st
+ int len)
+ {
+ void __iomem *fifoaddr = r8a66597->reg + offset;
+- unsigned int data;
++ unsigned int data = 0;
+ int i;
+
+ if (r8a66597->pdata->on_chip) {
diff --git a/usb/usb-teach-devices-file-about-wireless-and-superspeed-usb.patch b/usb/usb-teach-devices-file-about-wireless-and-superspeed-usb.patch
new file mode 100644
index 00000000000000..fd1ca1302ddbb8
--- /dev/null
+++ b/usb/usb-teach-devices-file-about-wireless-and-superspeed-usb.patch
@@ -0,0 +1,152 @@
+From stern+4c863d94@rowland.harvard.edu Tue Sep 21 13:39:55 2010
+Date: Mon, 13 Sep 2010 10:43:25 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+cc: David Vrabel <david.vrabel@csr.com>,
+ Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Subject: USB: teach "devices" file about Wireless and SuperSpeed USB
+Message-ID: <Pine.LNX.4.44L0.1009131041410.1584-100000@iolanthe.rowland.org>
+
+The /sys/kernel/debug/usb/devices file doesn't know about Wireless or
+SuperSpeed USB. This patch (as1416b) teaches it, and updates the
+Documentation/usb/proc_sub_info.txt file accordingly.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+CC: David Vrabel <david.vrabel@csr.com>
+CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/usb/proc_usb_info.txt | 36 +++++++++++++++++++++++-------------
+ drivers/usb/core/devices.c | 11 +++++++----
+ 2 files changed, 30 insertions(+), 17 deletions(-)
+
+--- a/Documentation/usb/proc_usb_info.txt
++++ b/Documentation/usb/proc_usb_info.txt
+@@ -1,12 +1,17 @@
+ /proc/bus/usb filesystem output
+ ===============================
+-(version 2003.05.30)
++(version 2010.09.13)
+
+
+ The usbfs filesystem for USB devices is traditionally mounted at
+ /proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as
+ the /proc/bus/usb/BBB/DDD files.
+
++In many modern systems the usbfs filsystem isn't used at all. Instead
++USB device nodes are created under /dev/usb/ or someplace similar. The
++"devices" file is available in debugfs, typically as
++/sys/kernel/debug/usb/devices.
++
+
+ **NOTE**: If /proc/bus/usb appears empty, and a host controller
+ driver has been linked, then you need to mount the
+@@ -106,8 +111,8 @@ Legend:
+
+ Topology info:
+
+-T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd
+-| | | | | | | | |__MaxChildren
++T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=dddd MxCh=dd
++| | | | | | | | |__MaxChildren
+ | | | | | | | |__Device Speed in Mbps
+ | | | | | | |__DeviceNumber
+ | | | | | |__Count of devices at this level
+@@ -120,8 +125,13 @@ T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd
+ Speed may be:
+ 1.5 Mbit/s for low speed USB
+ 12 Mbit/s for full speed USB
+- 480 Mbit/s for high speed USB (added for USB 2.0)
+-
++ 480 Mbit/s for high speed USB (added for USB 2.0);
++ also used for Wireless USB, which has no fixed speed
++ 5000 Mbit/s for SuperSpeed USB (added for USB 3.0)
++
++ For reasons lost in the mists of time, the Port number is always
++ too low by 1. For example, a device plugged into port 4 will
++ show up with "Port=03".
+
+ Bandwidth info:
+ B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd
+@@ -291,7 +301,7 @@ Here's an example, from a system which h
+ an external hub connected to the root hub, and a mouse and
+ a serial converter connected to the external hub.
+
+-T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
++T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
+ B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0
+ D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
+ P: Vendor=0000 ProdID=0000 Rev= 0.00
+@@ -301,21 +311,21 @@ C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
+ I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
+ E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
+
+-T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
++T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
+ D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
+ P: Vendor=0451 ProdID=1446 Rev= 1.00
+ C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
+ I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
+ E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=255ms
+
+-T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
++T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
+ D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
+ P: Vendor=04b4 ProdID=0001 Rev= 0.00
+ C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
+ I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse
+ E: Ad=81(I) Atr=03(Int.) MxPS= 3 Ivl= 10ms
+
+-T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
++T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
+ D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
+ P: Vendor=0565 ProdID=0001 Rev= 1.08
+ S: Manufacturer=Peracom Networks, Inc.
+@@ -330,12 +340,12 @@ E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=
+ Selecting only the "T:" and "I:" lines from this (for example, by using
+ "procusb ti"), we have:
+
+-T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
+-T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
++T: Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
++T: Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 4
+ I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
+-T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
++T: Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
+ I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=mouse
+-T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
++T: Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
+ I: If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=serial
+
+
+--- a/drivers/usb/core/devices.c
++++ b/drivers/usb/core/devices.c
+@@ -66,8 +66,8 @@
+ #define ALLOW_SERIAL_NUMBER
+
+ static const char *format_topo =
+-/* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd */
+-"\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%3s MxCh=%2d\n";
++/* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=dddd MxCh=dd */
++"\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%-4s MxCh=%2d\n";
+
+ static const char *format_string_manufacturer =
+ /* S: Manufacturer=xxxx */
+@@ -520,11 +520,14 @@ static ssize_t usb_device_dump(char __us
+ speed = "1.5"; break;
+ case USB_SPEED_UNKNOWN: /* usb 1.1 root hub code */
+ case USB_SPEED_FULL:
+- speed = "12 "; break;
++ speed = "12"; break;
++ case USB_SPEED_WIRELESS: /* Wireless has no real fixed speed */
+ case USB_SPEED_HIGH:
+ speed = "480"; break;
++ case USB_SPEED_SUPER:
++ speed = "5000"; break;
+ default:
+- speed = "?? ";
++ speed = "??";
+ }
+ data_end = pages_start + sprintf(pages_start, format_topo,
+ bus->busnum, level, parent_devnum,
diff --git a/usb/uwb-use-pm-format-to-print-mac-address.patch b/usb/uwb-use-pm-format-to-print-mac-address.patch
new file mode 100644
index 00000000000000..1ec7377e095e0c
--- /dev/null
+++ b/usb/uwb-use-pm-format-to-print-mac-address.patch
@@ -0,0 +1,48 @@
+From linux-usb-owner@vger.kernel.org Tue Sep 21 13:39:39 2010
+From: Andy Shevchenko <andy.shevchenko@gmail.com>
+To: linux-usb@vger.kernel.org
+Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
+ David Vrabel <david.vrabel@csr.com>
+Subject: uwb: use '%pM' format to print MAC address
+Date: Mon, 13 Sep 2010 11:24:52 +0300
+Message-Id: <1284366292-1585-1-git-send-email-andy.shevchenko@gmail.com>
+
+Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
+Cc: David Vrabel <david.vrabel@csr.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/uwb/address.c | 5 +----
+ drivers/uwb/wlp/wss-lc.c | 7 ++-----
+ 2 files changed, 3 insertions(+), 9 deletions(-)
+
+--- a/drivers/uwb/address.c
++++ b/drivers/uwb/address.c
+@@ -363,10 +363,7 @@ size_t __uwb_addr_print(char *buf, size_
+ {
+ size_t result;
+ if (type)
+- result = scnprintf(buf, buf_size,
+- "%02x:%02x:%02x:%02x:%02x:%02x",
+- addr[0], addr[1], addr[2],
+- addr[3], addr[4], addr[5]);
++ result = scnprintf(buf, buf_size, "%pM", addr);
+ else
+ result = scnprintf(buf, buf_size, "%02x:%02x",
+ addr[1], addr[0]);
+--- a/drivers/uwb/wlp/wss-lc.c
++++ b/drivers/uwb/wlp/wss-lc.c
+@@ -791,11 +791,8 @@ int wlp_wss_prep_hdr(struct wlp *wlp, st
+ } else {
+ if (printk_ratelimit())
+ dev_err(dev, "WLP: Destination neighbor (Ethernet: "
+- "%02x:%02x:%02x:%02x:%02x:%02x, Dev: "
+- "%02x:%02x) is not connected. \n", eth_addr[0],
+- eth_addr[1], eth_addr[2], eth_addr[3],
+- eth_addr[4], eth_addr[5], dev_addr->data[1],
+- dev_addr->data[0]);
++ "%pM, Dev: %02x:%02x) is not connected.\n",
++ eth_addr, dev_addr->data[1], dev_addr->data[0]);
+ result = -EINVAL;
+ }
+ return result;