aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-07-21 13:15:30 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-21 13:15:30 -0700
commit1c0bf62749683622d2f566e6e17669eb9dfe5c97 (patch)
tree9c072304e7e89a23cf25f3179cdfa3e93613560f
parent37928702e54c4f8229e59cb4a0aef3503cd6076b (diff)
downloadpatches-1c0bf62749683622d2f566e6e17669eb9dfe5c97.tar.gz
more bugfixes
-rw-r--r--driver-core/debugfs-no-longer-needs-to-depend-on-sysfs.patch36
-rw-r--r--driver-core/driver-core-fix-memory-leak-one-one-error-path-in-bus_register.patch29
-rw-r--r--driver-core/sysfs-fix-discrepancies-between-implementation-and-documentation.patch121
-rw-r--r--driver-core/sysfs-fix-one-more-signature-discrepancy-between-sysfs-implementation-and-docs.patch40
-rw-r--r--series28
-rw-r--r--tty/tty-implement-btm-as-mutex-instead-of-bkl.patch2
-rw-r--r--tty/vt-fix-warning-statement-with-no-effect-due-to-vt_kern.h.patch108
-rw-r--r--usb.current/usb-add-quirk-for-broadcom-bt-dongle.patch30
-rw-r--r--usb.current/usb-ftdi-add-support-for-the-rt-system-vx-7-radio-programming-cable.patch48
-rw-r--r--usb.current/usb-sisusbvga-fix-for-usb-3.0.patch42
-rw-r--r--usb.current/usb-usb-storage-fix-initializations-of-urb-fields.patch41
-rw-r--r--usb.current/usb-xhci-set-mult-field-in-endpoint-context-correctly.patch48
-rw-r--r--usb/usb-autoconvert-trivial-bkl-users-to-private-mutex.patch309
-rw-r--r--usb/usb-ehci-debug-port-device-gadget.patch523
-rw-r--r--usb/usb-gadget-remove-unnecessary-casts-of-private_data.patch46
-rw-r--r--usb/usb-host-remove-dead-config_arch_karo.patch61
-rw-r--r--usb/usb-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch32
-rw-r--r--usb/usb-misc-remove-unnecessary-casts-of-private_data.patch195
-rw-r--r--usb/usb-musb-forward-debug-mode-feature-to-gadget.patch36
-rw-r--r--usb/usb-otg-ulpi-add-support-for-smsc-usb3319-ulpi-phy.patch43
-rw-r--r--usb/usb-otg-ulpi-extend-the-generic-ulpi-driver.patch386
-rw-r--r--usb/usb-otg-ulpi-remove-unused-macro.patch32
-rw-r--r--usb/usb-otg-ulpi.c-fix-register-write.patch48
-rw-r--r--usb/usb-pxa-fix-incorrect-config_cpu_pxa27x-to-config_pxa27x.patch51
-rw-r--r--usb/usb-serial-enable-async-suspend-for-usb-serial-port-device.patch32
-rw-r--r--usb/usb-storage-freecom-fixed-several-coding-style-issues.patch76
-rw-r--r--usb/usb-usb-skeleton-remove-unnecessary-casts-of-private_data.patch54
-rw-r--r--usb/usb-xhci-trivial-use-array_size.patch4
28 files changed, 2498 insertions, 3 deletions
diff --git a/driver-core/debugfs-no-longer-needs-to-depend-on-sysfs.patch b/driver-core/debugfs-no-longer-needs-to-depend-on-sysfs.patch
new file mode 100644
index 00000000000000..95fe96a6f01e3f
--- /dev/null
+++ b/driver-core/debugfs-no-longer-needs-to-depend-on-sysfs.patch
@@ -0,0 +1,36 @@
+From randy.dunlap@oracle.com Wed Jul 21 13:04:45 2010
+Message-ID: <4C462B93.2050403@oracle.com>
+Date: Tue, 20 Jul 2010 16:04:51 -0700
+From: Randy Dunlap <randy.dunlap@oracle.com>
+To: Greg KH <gregkh@suse.de>
+Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
+ linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
+Subject: debugfs: no longer needs to depend on SYSFS
+
+From: Randy Dunlap <randy.dunlap@oracle.com>
+
+debugfs no longer uses 'kernel_subsys' (which is gone), and other
+kernel/ksysfs.c code is always built, so DEBUG_FS does not need
+to depend on SYSFS.
+
+Fixes this kconfig warning:
+
+warning: (TREE_RCU_TRACE || AMD_IOMMU_STATS && AMD_IOMMU || MTD_UBI_DEBUG && MTD && SYSFS && MTD_UBI || UBIFS_FS_DEBUG && MISC_FILESYSTEMS && UBIFS_FS || DEBUG_KMEMLEAK && DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && (X86 || ARM || PPC || S390 || SPARC64 || SUPERH || MICROBLAZE) && SYSFS || TRACING || X86_PTDUMP && DEBUG_KERNEL || BLK_DEV_IO_TRACE && TRACING_SUPPORT && FTRACE && SYSFS && BLOCK) selects DEBUG_FS which has unmet direct dependencies (SYSFS)
+
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ lib/Kconfig.debug | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/lib/Kconfig.debug
++++ b/lib/Kconfig.debug
+@@ -76,7 +76,6 @@ config UNUSED_SYMBOLS
+
+ config DEBUG_FS
+ bool "Debug Filesystem"
+- depends on SYSFS
+ help
+ debugfs is a virtual file system that kernel developers use to put
+ debugging files into. Enable this option to be able to read and
diff --git a/driver-core/driver-core-fix-memory-leak-one-one-error-path-in-bus_register.patch b/driver-core/driver-core-fix-memory-leak-one-one-error-path-in-bus_register.patch
new file mode 100644
index 00000000000000..a81cda18ba1d81
--- /dev/null
+++ b/driver-core/driver-core-fix-memory-leak-one-one-error-path-in-bus_register.patch
@@ -0,0 +1,29 @@
+From albcamus@gmail.com Wed Jul 21 13:07:03 2010
+From: Jike Song <albcamus@gmail.com>
+To: gregkh@suse.de
+Cc: linux-kernel@vger.kernel.org, huangweibing@gmail.com,
+ Jike Song <albcamus@gmail.com>
+Subject: driver core: fix memory leak one one error path in bus_register()
+Date: Thu, 15 Jul 2010 17:43:54 +0800
+Message-Id: <1279187034-11826-1-git-send-email-albcamus@gmail.com>
+
+Reported-by: huangweibing@gmail.com
+Signed-off-by: Jike Song <albcamus@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/bus.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/base/bus.c
++++ b/drivers/base/bus.c
+@@ -945,8 +945,8 @@ bus_devices_fail:
+ bus_remove_file(bus, &bus_attr_uevent);
+ bus_uevent_fail:
+ kset_unregister(&bus->p->subsys);
+- kfree(bus->p);
+ out:
++ kfree(bus->p);
+ bus->p = NULL;
+ return retval;
+ }
diff --git a/driver-core/sysfs-fix-discrepancies-between-implementation-and-documentation.patch b/driver-core/sysfs-fix-discrepancies-between-implementation-and-documentation.patch
new file mode 100644
index 00000000000000..b9f272c2fc8a41
--- /dev/null
+++ b/driver-core/sysfs-fix-discrepancies-between-implementation-and-documentation.patch
@@ -0,0 +1,121 @@
+From akpm@linux-foundation.org Wed Jul 21 11:52:09 2010
+Message-Id: <201007202222.o6KMM5nu021214@imap1.linux-foundation.org>
+Subject: sysfs: fix discrepancies between implementation and documentation
+To: greg@kroah.com
+Cc: kay.sievers@vrfy.org, akpm@linux-foundation.org, bvanassche@acm.org,
+ bart.vanassche@gmail.com, randy.dunlap@oracle.com
+From: akpm@linux-foundation.org
+Date: Tue, 20 Jul 2010 15:22:05 -0700
+
+From: Bart Van Assche <bvanassche@acm.org>
+
+Fix all discrepancies I know of between the sysfs implementation and its
+documentation.
+
+Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
+Cc: Randy Dunlap <randy.dunlap@oracle.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/filesystems/sysfs.txt | 44 ++++++++++++++++++++----------------
+ 1 file changed, 25 insertions(+), 19 deletions(-)
+
+--- a/Documentation/filesystems/sysfs.txt
++++ b/Documentation/filesystems/sysfs.txt
+@@ -4,7 +4,7 @@ sysfs - _The_ filesystem for exporting k
+ Patrick Mochel <mochel@osdl.org>
+ Mike Murphy <mamurph@cs.clemson.edu>
+
+-Revised: 22 February 2009
++Revised: 10 July 2010
+ Original: 10 January 2003
+
+
+@@ -124,7 +124,7 @@ show and store methods of the attribute
+
+ struct sysfs_ops {
+ ssize_t (*show)(struct kobject *, struct attribute *, char *);
+- ssize_t (*store)(struct kobject *, struct attribute *, const char *);
++ ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t);
+ };
+
+ [ Subsystems should have already defined a struct kobj_type as a
+@@ -139,18 +139,22 @@ calls the associated methods.
+
+ To illustrate:
+
++#define to_dev(obj) container_of(obj, struct device, kobj)
+ #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
+-#define to_dev(d) container_of(d, struct device, kobj)
+
+-static ssize_t
+-dev_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
++static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
++ char *buf)
+ {
+- struct device_attribute * dev_attr = to_dev_attr(attr);
+- struct device * dev = to_dev(kobj);
+- ssize_t ret = 0;
++ struct device_attribute *dev_attr = to_dev_attr(attr);
++ struct device *dev = to_dev(kobj);
++ ssize_t ret = -EIO;
+
+ if (dev_attr->show)
+- ret = dev_attr->show(dev, buf);
++ ret = dev_attr->show(dev, dev_attr, buf);
++ if (ret >= (ssize_t)PAGE_SIZE) {
++ print_symbol("dev_attr_show: %s returned bad count\n",
++ (unsigned long)dev_attr->show);
++ }
+ return ret;
+ }
+
+@@ -163,10 +167,9 @@ To read or write attributes, show() or s
+ specified when declaring the attribute. The method types should be as
+ simple as those defined for device attributes:
+
+-ssize_t (*show)(struct device * dev, struct device_attribute * attr,
+- char * buf);
+-ssize_t (*store)(struct device * dev, struct device_attribute * attr,
+- const char * buf);
++ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf);
++ssize_t (*store)(struct device *dev, struct device_attribute *attr,
++ const char *buf, size_t count);
+
+ IOW, they should take only an object, an attribute, and a buffer as parameters.
+
+@@ -209,8 +212,8 @@ Other notes:
+
+ - show() should always use snprintf().
+
+-- store() should return the number of bytes used from the buffer. This
+- can be done using strlen().
++- store() should return the number of bytes used from the buffer. If the
++ entire buffer has been used, just return the count argument.
+
+ - show() or store() can always return errors. If a bad value comes
+ through, be sure to return an error.
+@@ -223,15 +226,18 @@ Other notes:
+
+ A very simple (and naive) implementation of a device attribute is:
+
+-static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t show_name(struct device *dev, struct device_attribute *attr,
++ char *buf)
+ {
+ return snprintf(buf, PAGE_SIZE, "%s\n", dev->name);
+ }
+
+-static ssize_t store_name(struct device * dev, const char * buf)
++static ssize_t store_name(struct device *dev, struct device_attribute *attr,
++ const char *buf, size_t count)
+ {
+- sscanf(buf, "%20s", dev->name);
+- return strnlen(buf, PAGE_SIZE);
++ snprintf(dev->name, sizeof(dev->name), "%.*s",
++ (int)min(count, sizeof(dev->name) - 1), buf);
++ return count;
+ }
+
+ static DEVICE_ATTR(name, S_IRUGO, show_name, store_name);
diff --git a/driver-core/sysfs-fix-one-more-signature-discrepancy-between-sysfs-implementation-and-docs.patch b/driver-core/sysfs-fix-one-more-signature-discrepancy-between-sysfs-implementation-and-docs.patch
new file mode 100644
index 00000000000000..7a06690ecf0e28
--- /dev/null
+++ b/driver-core/sysfs-fix-one-more-signature-discrepancy-between-sysfs-implementation-and-docs.patch
@@ -0,0 +1,40 @@
+From weiny2@llnl.gov Wed Jul 21 11:52:36 2010
+Date: Thu, 15 Jul 2010 11:34:44 -0700
+From: Ira Weiny <weiny2@llnl.gov>
+To: Patrick Mochel <mochel@osdl.org>,
+ Mike Murphy <mamurph@cs.clemson.edu>
+Cc: Randy Dunlap <rdunlap@xenotime.net>,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Phil Carmody <ext-phil.2.carmody@nokia.com>,
+ Lucian Adrian Grijincu <lgrijincu@ixiacom.com>,
+ linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
+Subject: sysfs: Fix one more signature discrepancy between sysfs implementation and docs.
+Message-Id: <20100715113444.68bbe2dd.weiny2@llnl.gov>
+
+Signed-off-by: Ira Weiny <weiny2@llnl.gov>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/filesystems/sysfs.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/Documentation/filesystems/sysfs.txt
++++ b/Documentation/filesystems/sysfs.txt
+@@ -4,7 +4,7 @@ sysfs - _The_ filesystem for exporting k
+ Patrick Mochel <mochel@osdl.org>
+ Mike Murphy <mamurph@cs.clemson.edu>
+
+-Revised: 10 July 2010
++Revised: 15 July 2010
+ Original: 10 January 2003
+
+
+@@ -333,7 +333,7 @@ Structure:
+ struct bus_attribute {
+ struct attribute attr;
+ ssize_t (*show)(struct bus_type *, char * buf);
+- ssize_t (*store)(struct bus_type *, const char * buf);
++ ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
+ };
+
+ Declaring:
diff --git a/series b/series
index 1c6d8464600813..8f018ff813533f 100644
--- a/series
+++ b/series
@@ -29,6 +29,11 @@ usb.current/usb-xhci-fix-another-bug-in-link-trb-activation-change.patch
usb.current/usb-fix-usb3.0-port-speed-downgrade-after-port-reset.patch
usb.current/usb-xhci-set-ep0-dequeue-ptr-after-reset-of-configured-device.patch
usb.current/usb-adds-artisman-usb-dongle-to-list-of-quirky-devices.patch
+usb.current/usb-sisusbvga-fix-for-usb-3.0.patch
+usb.current/usb-xhci-set-mult-field-in-endpoint-context-correctly.patch
+usb.current/usb-usb-storage-fix-initializations-of-urb-fields.patch
+usb.current/usb-add-quirk-for-broadcom-bt-dongle.patch
+usb.current/usb-ftdi-add-support-for-the-rt-system-vx-7-radio-programming-cable.patch
#################################
# Staging patches for 2.6.35
@@ -56,6 +61,12 @@ driver-core/firmware-update-hotplug-script-remove-sysfs-files.patch
driver-core/sysfs-sysfs_chmod_file-s-attr-can-be-const.patch
driver-core/dmi-id-fix-a-memory-leak-in-dmi_id_init-error-path.patch
driver-core/dcdbas-remove-a-redundant-smi_data_buf_free-in-dcdbas_exit.patch
+driver-core/sysfs-fix-discrepancies-between-implementation-and-documentation.patch
+driver-core/sysfs-fix-one-more-signature-discrepancy-between-sysfs-implementation-and-docs.patch
+driver-core/debugfs-no-longer-needs-to-depend-on-sysfs.patch
+driver-core/driver-core-fix-memory-leak-one-one-error-path-in-bus_register.patch
+
+# can we really drop it?
driver-core/driver-core-remove-config_sysfs_deprecated.patch
#####################################
@@ -113,6 +124,7 @@ tty/tty-avoid-recursive-btm-in-pty_close.patch
tty/serial-max3107-introduce-a-max3107-driver.patch
tty/serial-max3107-abstract-out-the-platform-specific-bits.patch
tty/tty_io-remove-casts-from-void.patch
+tty/vt-fix-warning-statement-with-no-effect-due-to-vt_kern.h.patch
###################################
@@ -191,7 +203,23 @@ usb/usb-ulpi-fix-compilation-warning.patch
usb/usb-ehci_omap-fix-device-detect-issue-with-modules.patch
usb/usb-musb-kill-board-specific-pinmux-from-driver-file.patch
usb/usb-musb-do-not-override-dma-mode-in-channel-program.patch
+usb/usb-storage-freecom-fixed-several-coding-style-issues.patch
+usb/usb-autoconvert-trivial-bkl-users-to-private-mutex.patch
+usb/usb-usb-skeleton-remove-unnecessary-casts-of-private_data.patch
+usb/usb-misc-remove-unnecessary-casts-of-private_data.patch
+usb/usb-gadget-remove-unnecessary-casts-of-private_data.patch
+usb/usb-ehci-debug-port-device-gadget.patch
+usb/usb-musb-forward-debug-mode-feature-to-gadget.patch
+usb/usb-serial-enable-async-suspend-for-usb-serial-port-device.patch
+usb/usb-pxa-fix-incorrect-config_cpu_pxa27x-to-config_pxa27x.patch
+usb/usb-host-remove-dead-config_arch_karo.patch
+usb/usb-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch
+usb/usb-otg-ulpi.c-fix-register-write.patch
+usb/usb-otg-ulpi-remove-unused-macro.patch
+usb/usb-otg-ulpi-add-support-for-smsc-usb3319-ulpi-phy.patch
+usb/usb-otg-ulpi-extend-the-generic-ulpi-driver.patch
# staging stuff is now in the staging-next tree on git.kernel.org
+
diff --git a/tty/tty-implement-btm-as-mutex-instead-of-bkl.patch b/tty/tty-implement-btm-as-mutex-instead-of-bkl.patch
index e8e84b2cb1f629..ea976092596d69 100644
--- a/tty/tty-implement-btm-as-mutex-instead-of-bkl.patch
+++ b/tty/tty-implement-btm-as-mutex-instead-of-bkl.patch
@@ -120,7 +120,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* wait_event_interruptible_tty -- wait for a condition with the tty lock held
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
-@@ -428,6 +428,16 @@ config RT_MUTEX_TESTER
+@@ -427,6 +427,16 @@ config RT_MUTEX_TESTER
help
This option enables a rt-mutex tester.
diff --git a/tty/vt-fix-warning-statement-with-no-effect-due-to-vt_kern.h.patch b/tty/vt-fix-warning-statement-with-no-effect-due-to-vt_kern.h.patch
new file mode 100644
index 00000000000000..0fee0e47d28e7b
--- /dev/null
+++ b/tty/vt-fix-warning-statement-with-no-effect-due-to-vt_kern.h.patch
@@ -0,0 +1,108 @@
+From kjwinchester@gmail.com Wed Jul 21 12:14:37 2010
+From: Kevin Winchester <kjwinchester@gmail.com>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Kevin Winchester <kjwinchester@gmail.com>,
+ Alan Cox <alan@linux.intel.com>, linux-kernel@vger.kernel.org
+Subject: vt: Fix warning: statement with no effect due to vt_kern.h
+Date: Sat, 10 Jul 2010 18:57:56 -0300
+Message-Id: <1278799076-5928-1-git-send-email-kjwinchester@gmail.com>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+
+Using:
+
+ gcc (GCC) 4.5.0 20100610 (prerelease)
+
+with CONFIG_CONSOLE_TRANSLATIONS=n, the following warnings are seen:
+
+ drivers/char/vt_ioctl.c: In function ‘vt_ioctl’:
+ drivers/char/vt_ioctl.c:1309:4: warning: statement with no effect
+ drivers/char/vt.c: In function ‘vc_allocate’:
+ drivers/char/vt.c:774:3: warning: statement with no effect
+ drivers/video/console/vgacon.c: In function ‘vgacon_init’:
+ drivers/video/console/vgacon.c:587:3: warning: statement with no effect
+ drivers/video/console/vgacon.c: In function ‘vgacon_deinit’:
+ drivers/video/console/vgacon.c:606:2: warning: statement with no effect
+ drivers/video/console/fbcon.c: In function ‘fbcon_init’:
+ drivers/video/console/fbcon.c:1087:3: warning: statement with no effect
+ drivers/video/console/fbcon.c:1089:3: warning: statement with no effect
+ drivers/video/console/fbcon.c: In function ‘fbcon_set_disp’:
+ drivers/video/console/fbcon.c:1369:3: warning: statement with no effect
+ drivers/video/console/fbcon.c:1371:3: warning: statement with no effect
+
+This is because several functions in include/linux/vt_kern.h are
+defined to (0). Convert them to static inline functions to
+silence the warnings and gain a bit of type safety.
+
+Signed-off-by: Kevin Winchester <kjwinchester@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/vt_kern.h | 57 ++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 46 insertions(+), 11 deletions(-)
+
+--- a/include/linux/vt_kern.h
++++ b/include/linux/vt_kern.h
+@@ -76,17 +76,52 @@ int con_copy_unimap(struct vc_data *dst_
+ #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
+ ((vc)->vc_toggle_meta ? 0x80 : 0)])
+ #else
+-#define con_set_trans_old(arg) (0)
+-#define con_get_trans_old(arg) (-EINVAL)
+-#define con_set_trans_new(arg) (0)
+-#define con_get_trans_new(arg) (-EINVAL)
+-#define con_clear_unimap(vc, ui) (0)
+-#define con_set_unimap(vc, ct, list) (0)
+-#define con_set_default_unimap(vc) (0)
+-#define con_copy_unimap(d, s) (0)
+-#define con_get_unimap(vc, ct, uct, list) (-EINVAL)
+-#define con_free_unimap(vc) do { ; } while (0)
+-#define con_protect_unimap(vc, rdonly) do { ; } while (0)
++static inline int con_set_trans_old(unsigned char __user *table)
++{
++ return 0;
++}
++static inline int con_get_trans_old(unsigned char __user *table)
++{
++ return -EINVAL;
++}
++static inline int con_set_trans_new(unsigned short __user *table)
++{
++ return 0;
++}
++static inline int con_get_trans_new(unsigned short __user *table)
++{
++ return -EINVAL;
++}
++static inline int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui)
++{
++ return 0;
++}
++static inline
++int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
++{
++ return 0;
++}
++static inline
++int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct,
++ struct unipair __user *list)
++{
++ return -EINVAL;
++}
++static inline int con_set_default_unimap(struct vc_data *vc)
++{
++ return 0;
++}
++static inline void con_free_unimap(struct vc_data *vc)
++{
++}
++static inline void con_protect_unimap(struct vc_data *vc, int rdonly)
++{
++}
++static inline
++int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
++{
++ return 0;
++}
+
+ #define vc_translate(vc, c) (c)
+ #endif
diff --git a/usb.current/usb-add-quirk-for-broadcom-bt-dongle.patch b/usb.current/usb-add-quirk-for-broadcom-bt-dongle.patch
new file mode 100644
index 00000000000000..e71e8c7843f458
--- /dev/null
+++ b/usb.current/usb-add-quirk-for-broadcom-bt-dongle.patch
@@ -0,0 +1,30 @@
+From oliver@neukum.org Wed Jul 21 12:59:11 2010
+From: Oliver Neukum <oliver@neukum.org>
+To: "Greg Kroah-Hartman" <gregkh@suse.de>
+Subject: USB: add quirk for Broadcom BT dongle
+Date: Wed, 14 Jul 2010 18:26:22 +0200
+Cc: linux-usb@vger.kernel.org, stable@kernel.org
+Message-Id: <201007141826.23016.oliver@neukum.org>
+
+This device needs to be reset when resuming
+
+Signed-off-by: Oliver Neukum <oneukum@suse.de>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/quirks.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -68,6 +68,9 @@ static const struct usb_device_id usb_qu
+ /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */
+ { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },
+
++ /* Broadcom BCM92035DGROM BT dongle */
++ { USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME },
++
+ /* Action Semiconductor flash disk */
+ { USB_DEVICE(0x10d6, 0x2200), .driver_info =
+ USB_QUIRK_STRING_FETCH_255 },
diff --git a/usb.current/usb-ftdi-add-support-for-the-rt-system-vx-7-radio-programming-cable.patch b/usb.current/usb-ftdi-add-support-for-the-rt-system-vx-7-radio-programming-cable.patch
new file mode 100644
index 00000000000000..c32b671d6d2d05
--- /dev/null
+++ b/usb.current/usb-ftdi-add-support-for-the-rt-system-vx-7-radio-programming-cable.patch
@@ -0,0 +1,48 @@
+From linux-usb-owner@vger.kernel.org Wed Jul 21 13:02:45 2010
+Date: Wed, 21 Jul 2010 08:39:22 -0500
+From: Corey Minyard <minyard@acm.org>
+To: linux-usb@vger.kernel.org
+Subject: USB: FTDI: Add support for the RT System VX-7 radio programming cable
+Message-id: <20100721133922.GC9725@mail.minyard.local>
+Content-disposition: inline
+
+From: Corey Minyard <minyard@acm.org>
+
+RT Systems has put out bunch of ham radio cables based on the FT232RL
+chip. Each cable type has a unique PID, this adds one for the Yaesu VX-7
+radios.
+
+Signed-off-by: Corey Minyard <minyard@acm.org>
+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
+@@ -691,6 +691,7 @@ static struct usb_device_id id_table_com
+ { USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID),
+ .driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk },
+ { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) },
++ { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) },
+ { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -696,6 +696,12 @@
+ #define TELLDUS_TELLSTICK_PID 0x0C30 /* RF control dongle 433 MHz using FT232RL */
+
+ /*
++ * RT Systems programming cables for various ham radios
++ */
++#define RTSYSTEMS_VID 0x2100 /* Vendor ID */
++#define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */
++
++/*
+ * Bayer Ascensia Contour blood glucose meter USB-converter cable.
+ * http://winglucofacts.com/cables/
+ */
diff --git a/usb.current/usb-sisusbvga-fix-for-usb-3.0.patch b/usb.current/usb-sisusbvga-fix-for-usb-3.0.patch
new file mode 100644
index 00000000000000..3ca82a76134ef6
--- /dev/null
+++ b/usb.current/usb-sisusbvga-fix-for-usb-3.0.patch
@@ -0,0 +1,42 @@
+From linux-usb-owner@vger.kernel.org Wed Jul 21 11:41:33 2010
+From: Oliver Neukum <oliver@neukum.org>
+To: Thomas Winischhofer <thomas@winischhofer.net>
+Subject: USB: sisusbvga: Fix for USB 3.0
+Date: Fri, 16 Jul 2010 17:36:26 +0200
+Cc: linux-usb@vger.kernel.org
+Message-Id: <201007161736.26601.oliver@neukum.org>
+
+From: Oliver Neukum <oliver@neukum.org>
+
+Super speed is also fast enough to let sisusbvga operate.
+Therefor expand the checks.
+
+Signed-off-by: Oliver Neukum <oneukum@suse.de>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/misc/sisusbvga/sisusb.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/misc/sisusbvga/sisusb.c
++++ b/drivers/usb/misc/sisusbvga/sisusb.c
+@@ -2436,7 +2436,8 @@ sisusb_open(struct inode *inode, struct
+ }
+
+ if (!sisusb->devinit) {
+- if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH) {
++ if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH ||
++ sisusb->sisusb_dev->speed == USB_SPEED_SUPER) {
+ if (sisusb_init_gfxdevice(sisusb, 0)) {
+ mutex_unlock(&sisusb->lock);
+ dev_err(&sisusb->sisusb_dev->dev, "Failed to initialize device\n");
+@@ -3166,7 +3167,7 @@ static int sisusb_probe(struct usb_inter
+
+ sisusb->present = 1;
+
+- if (dev->speed == USB_SPEED_HIGH) {
++ if (dev->speed == USB_SPEED_HIGH || dev->speed == USB_SPEED_SUPER) {
+ int initscreen = 1;
+ #ifdef INCL_SISUSB_CON
+ if (sisusb_first_vc > 0 &&
diff --git a/usb.current/usb-usb-storage-fix-initializations-of-urb-fields.patch b/usb.current/usb-usb-storage-fix-initializations-of-urb-fields.patch
new file mode 100644
index 00000000000000..2692009f821a97
--- /dev/null
+++ b/usb.current/usb-usb-storage-fix-initializations-of-urb-fields.patch
@@ -0,0 +1,41 @@
+From bob@bobcopeland.com Wed Jul 21 11:55:52 2010
+From: Bob Copeland <me@bobcopeland.com>
+To: stern@rowland.harvard.edu, mdharm-usb@one-eyed-alien.net,
+ gregkh@suse.de
+Cc: linux-usb@vger.kernel.org, lkml@vger.kernel.org,
+ Bob Copeland <me@bobcopeland.com>
+Subject: USB: usb-storage: fix initializations of urb fields
+Date: Mon, 12 Jul 2010 11:18:18 -0400
+Message-Id: <1278947898-8707-1-git-send-email-me@bobcopeland.com>
+
+Commit 0ede76fcec5415ef82a423a95120286895822e2d, "USB: remove uses of
+URB_NO_SETUP_DMA_MAP" introduced a regression by inadvertantly removing
+initialization of the transfer flags. This caused initialization
+failures in the ums-karma driver. Fix the regression by zeroing it.
+
+While at it, as Alan Stern points out, the initializers for
+actual_length and status are handled by the core and error_count
+only matters for isochronous urbs, so they don't need to be set here.
+Remove them.
+
+Signed-off-by: Bob Copeland <me@bobcopeland.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/transport.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/usb/storage/transport.c
++++ b/drivers/usb/storage/transport.c
+@@ -139,9 +139,7 @@ static int usb_stor_msg_common(struct us
+
+ /* fill the common fields in the URB */
+ us->current_urb->context = &urb_done;
+- us->current_urb->actual_length = 0;
+- us->current_urb->error_count = 0;
+- us->current_urb->status = 0;
++ us->current_urb->transfer_flags = 0;
+
+ /* we assume that if transfer_buffer isn't us->iobuf then it
+ * hasn't been mapped for DMA. Yes, this is clunky, but it's
diff --git a/usb.current/usb-xhci-set-mult-field-in-endpoint-context-correctly.patch b/usb.current/usb-xhci-set-mult-field-in-endpoint-context-correctly.patch
new file mode 100644
index 00000000000000..e1eeebbf09806b
--- /dev/null
+++ b/usb.current/usb-xhci-set-mult-field-in-endpoint-context-correctly.patch
@@ -0,0 +1,48 @@
+From sarah.a.sharp@linux.intel.com Wed Jul 21 11:51:34 2010
+Date: Sat, 10 Jul 2010 15:48:01 +0200
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+To: Greg KH <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org
+Subject: USB: xhci: Set Mult field in endpoint context correctly.
+Message-ID: <20100710134801.GA2062@xanatos>
+Content-Disposition: inline
+
+The bmAttributes field of the SuperSpeed Endpoint Companion Descriptor has
+different meanings, depending on the endpoint type. If the endpoint is
+isochronous, the bmAttributes field is the maximum number of packets
+within a service interval that this endpoint supports. If the endpoint is
+bulk, it's the number of stream IDs this endpoint supports.
+
+Only set the Mult field of the xHCI endpoint context using the
+bmAttributes field if the endpoint is isochronous, and the device is a
+SuperSpeed device.
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci-mem.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/xhci-mem.c
++++ b/drivers/usb/host/xhci-mem.c
+@@ -1023,7 +1023,7 @@ static inline unsigned int xhci_get_endp
+ return EP_INTERVAL(interval);
+ }
+
+-/* The "Mult" field in the endpoint context is only set for SuperSpeed devices.
++/* The "Mult" field in the endpoint context is only set for SuperSpeed isoc eps.
+ * High speed endpoint descriptors can define "the number of additional
+ * transaction opportunities per microframe", but that goes in the Max Burst
+ * endpoint context field.
+@@ -1031,7 +1031,8 @@ static inline unsigned int xhci_get_endp
+ static inline u32 xhci_get_endpoint_mult(struct usb_device *udev,
+ struct usb_host_endpoint *ep)
+ {
+- if (udev->speed != USB_SPEED_SUPER)
++ if (udev->speed != USB_SPEED_SUPER ||
++ !usb_endpoint_xfer_isoc(&ep->desc))
+ return 0;
+ return ep->ss_ep_comp.bmAttributes;
+ }
diff --git a/usb/usb-autoconvert-trivial-bkl-users-to-private-mutex.patch b/usb/usb-autoconvert-trivial-bkl-users-to-private-mutex.patch
new file mode 100644
index 00000000000000..bd7101db9aedd3
--- /dev/null
+++ b/usb/usb-autoconvert-trivial-bkl-users-to-private-mutex.patch
@@ -0,0 +1,309 @@
+From arnd@arndb.de Wed Jul 21 11:55:04 2010
+From: Arnd Bergmann <arnd@arndb.de>
+To: linux-kernel@vger.kernel.org
+Cc: John Kacur <jkacur@redhat.com>,
+ Frederic Weisbecker <fweisbec@gmail.com>,
+ Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@suse.de>,
+ linux-usb@vger.kernel.org
+Subject: USB: autoconvert trivial BKL users to private mutex
+Date: Sun, 11 Jul 2010 23:18:56 +0200
+Message-Id: <1278883143-29035-6-git-send-email-arnd@arndb.de>
+
+All these files use the big kernel lock in a trivial
+way to serialize their private file operations,
+typically resulting from an earlier semi-automatic
+pushdown from VFS.
+
+None of these drivers appears to want to lock against
+other code, and they all use the BKL as the top-level
+lock in their file operations, meaning that there
+is no lock-order inversion problem.
+
+Consequently, we can remove the BKL completely,
+replacing it with a per-file mutex in every case.
+Using a scripted approach means we can avoid
+typos.
+
+file=$1
+name=$2
+if grep -q lock_kernel ${file} ; then
+ if grep -q 'include.*linux.mutex.h' ${file} ; then
+ sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
+ else
+ sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
+ fi
+ sed -i ${file} \
+ -e "/^#include.*linux.mutex.h/,$ {
+ 1,/^\(static\|int\|long\)/ {
+ /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);
+
+} }" \
+ -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
+ -e '/[ ]*cycle_kernel_lock();/d'
+else
+ sed -i -e '/include.*\<smp_lock.h\>/d' ${file} \
+ -e '/cycle_kernel_lock()/d'
+fi
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/printer.c | 7 ++++---
+ drivers/usb/misc/iowarrior.c | 15 ++++++++-------
+ drivers/usb/misc/rio500.c | 15 ++++++++-------
+ drivers/usb/misc/usblcd.c | 16 ++++++++--------
+ 4 files changed, 28 insertions(+), 25 deletions(-)
+
+--- a/drivers/usb/gadget/printer.c
++++ b/drivers/usb/gadget/printer.c
+@@ -25,7 +25,7 @@
+ #include <linux/ioport.h>
+ #include <linux/sched.h>
+ #include <linux/slab.h>
+-#include <linux/smp_lock.h>
++#include <linux/mutex.h>
+ #include <linux/errno.h>
+ #include <linux/init.h>
+ #include <linux/timer.h>
+@@ -70,6 +70,7 @@
+ #define DRIVER_DESC "Printer Gadget"
+ #define DRIVER_VERSION "2007 OCT 06"
+
++static DEFINE_MUTEX(printer_mutex);
+ static const char shortname [] = "printer";
+ static const char driver_desc [] = DRIVER_DESC;
+
+@@ -476,7 +477,7 @@ printer_open(struct inode *inode, struct
+ unsigned long flags;
+ int ret = -EBUSY;
+
+- lock_kernel();
++ mutex_lock(&printer_mutex);
+ dev = container_of(inode->i_cdev, struct printer_dev, printer_cdev);
+
+ spin_lock_irqsave(&dev->lock, flags);
+@@ -492,7 +493,7 @@ printer_open(struct inode *inode, struct
+ spin_unlock_irqrestore(&dev->lock, flags);
+
+ DBG(dev, "printer_open returned %x\n", ret);
+- unlock_kernel();
++ mutex_unlock(&printer_mutex);
+ return ret;
+ }
+
+--- a/drivers/usb/misc/iowarrior.c
++++ b/drivers/usb/misc/iowarrior.c
+@@ -18,7 +18,7 @@
+ #include <linux/init.h>
+ #include <linux/slab.h>
+ #include <linux/sched.h>
+-#include <linux/smp_lock.h>
++#include <linux/mutex.h>
+ #include <linux/poll.h>
+ #include <linux/usb/iowarrior.h>
+
+@@ -61,6 +61,7 @@ MODULE_DESCRIPTION(DRIVER_DESC);
+ MODULE_LICENSE("GPL");
+
+ /* Module parameters */
++static DEFINE_MUTEX(iowarrior_mutex);
+ static int debug = 0;
+ module_param(debug, bool, 0644);
+ MODULE_PARM_DESC(debug, "debug=1 enables debugging messages");
+@@ -493,7 +494,7 @@ static long iowarrior_ioctl(struct file
+ return -ENOMEM;
+
+ /* lock this object */
+- lock_kernel();
++ mutex_lock(&iowarrior_mutex);
+ mutex_lock(&dev->mutex);
+
+ /* verify that the device wasn't unplugged */
+@@ -585,7 +586,7 @@ static long iowarrior_ioctl(struct file
+ error_out:
+ /* unlock the device */
+ mutex_unlock(&dev->mutex);
+- unlock_kernel();
++ mutex_unlock(&iowarrior_mutex);
+ kfree(buffer);
+ return retval;
+ }
+@@ -602,12 +603,12 @@ static int iowarrior_open(struct inode *
+
+ dbg("%s", __func__);
+
+- lock_kernel();
++ mutex_lock(&iowarrior_mutex);
+ subminor = iminor(inode);
+
+ interface = usb_find_interface(&iowarrior_driver, subminor);
+ if (!interface) {
+- unlock_kernel();
++ mutex_unlock(&iowarrior_mutex);
+ err("%s - error, can't find device for minor %d", __func__,
+ subminor);
+ return -ENODEV;
+@@ -617,7 +618,7 @@ static int iowarrior_open(struct inode *
+ dev = usb_get_intfdata(interface);
+ if (!dev) {
+ mutex_unlock(&iowarrior_open_disc_lock);
+- unlock_kernel();
++ mutex_unlock(&iowarrior_mutex);
+ return -ENODEV;
+ }
+
+@@ -644,7 +645,7 @@ static int iowarrior_open(struct inode *
+
+ out:
+ mutex_unlock(&dev->mutex);
+- unlock_kernel();
++ mutex_unlock(&iowarrior_mutex);
+ return retval;
+ }
+
+--- a/drivers/usb/misc/rio500.c
++++ b/drivers/usb/misc/rio500.c
+@@ -32,7 +32,7 @@
+ #include <linux/kernel.h>
+ #include <linux/signal.h>
+ #include <linux/sched.h>
+-#include <linux/smp_lock.h>
++#include <linux/mutex.h>
+ #include <linux/errno.h>
+ #include <linux/random.h>
+ #include <linux/poll.h>
+@@ -72,6 +72,7 @@ struct rio_usb_data {
+ struct mutex lock; /* general race avoidance */
+ };
+
++static DEFINE_MUTEX(rio500_mutex);
+ static struct rio_usb_data rio_instance;
+
+ static int open_rio(struct inode *inode, struct file *file)
+@@ -79,12 +80,12 @@ static int open_rio(struct inode *inode,
+ struct rio_usb_data *rio = &rio_instance;
+
+ /* against disconnect() */
+- lock_kernel();
++ mutex_lock(&rio500_mutex);
+ mutex_lock(&(rio->lock));
+
+ if (rio->isopen || !rio->present) {
+ mutex_unlock(&(rio->lock));
+- unlock_kernel();
++ mutex_unlock(&rio500_mutex);
+ return -EBUSY;
+ }
+ rio->isopen = 1;
+@@ -94,7 +95,7 @@ static int open_rio(struct inode *inode,
+ mutex_unlock(&(rio->lock));
+
+ dev_info(&rio->rio_dev->dev, "Rio opened.\n");
+- unlock_kernel();
++ mutex_unlock(&rio500_mutex);
+
+ return 0;
+ }
+@@ -491,7 +492,7 @@ static void disconnect_rio(struct usb_in
+ struct rio_usb_data *rio = usb_get_intfdata (intf);
+
+ usb_set_intfdata (intf, NULL);
+- lock_kernel();
++ mutex_lock(&rio500_mutex);
+ if (rio) {
+ usb_deregister_dev(intf, &usb_rio_class);
+
+@@ -501,7 +502,7 @@ static void disconnect_rio(struct usb_in
+ /* better let it finish - the release will do whats needed */
+ rio->rio_dev = NULL;
+ mutex_unlock(&(rio->lock));
+- unlock_kernel();
++ mutex_unlock(&rio500_mutex);
+ return;
+ }
+ kfree(rio->ibuf);
+@@ -512,7 +513,7 @@ static void disconnect_rio(struct usb_in
+ rio->present = 0;
+ mutex_unlock(&(rio->lock));
+ }
+- unlock_kernel();
++ mutex_unlock(&rio500_mutex);
+ }
+
+ static const struct usb_device_id rio_table[] = {
+--- a/drivers/usb/misc/usblcd.c
++++ b/drivers/usb/misc/usblcd.c
+@@ -16,7 +16,6 @@
+ #include <linux/kernel.h>
+ #include <linux/init.h>
+ #include <linux/slab.h>
+-#include <linux/smp_lock.h>
+ #include <linux/errno.h>
+ #include <linux/mutex.h>
+ #include <asm/uaccess.h>
+@@ -30,6 +29,7 @@
+ #define IOCTL_GET_DRV_VERSION 2
+
+
++static DEFINE_MUTEX(lcd_mutex);
+ static const struct usb_device_id id_table[] = {
+ { .idVendor = 0x10D2, .match_flags = USB_DEVICE_ID_MATCH_VENDOR, },
+ { },
+@@ -74,12 +74,12 @@ static int lcd_open(struct inode *inode,
+ struct usb_interface *interface;
+ int subminor, r;
+
+- lock_kernel();
++ mutex_lock(&lcd_mutex);
+ subminor = iminor(inode);
+
+ interface = usb_find_interface(&lcd_driver, subminor);
+ if (!interface) {
+- unlock_kernel();
++ mutex_unlock(&lcd_mutex);
+ err ("USBLCD: %s - error, can't find device for minor %d",
+ __func__, subminor);
+ return -ENODEV;
+@@ -89,7 +89,7 @@ static int lcd_open(struct inode *inode,
+ dev = usb_get_intfdata(interface);
+ if (!dev) {
+ mutex_unlock(&open_disc_mutex);
+- unlock_kernel();
++ mutex_unlock(&lcd_mutex);
+ return -ENODEV;
+ }
+
+@@ -101,13 +101,13 @@ static int lcd_open(struct inode *inode,
+ r = usb_autopm_get_interface(interface);
+ if (r < 0) {
+ kref_put(&dev->kref, lcd_delete);
+- unlock_kernel();
++ mutex_unlock(&lcd_mutex);
+ return r;
+ }
+
+ /* save our object in the file's private structure */
+ file->private_data = dev;
+- unlock_kernel();
++ mutex_unlock(&lcd_mutex);
+
+ return 0;
+ }
+@@ -164,14 +164,14 @@ static long lcd_ioctl(struct file *file,
+
+ switch (cmd) {
+ case IOCTL_GET_HARD_VERSION:
+- lock_kernel();
++ mutex_lock(&lcd_mutex);
+ bcdDevice = le16_to_cpu((dev->udev)->descriptor.bcdDevice);
+ sprintf(buf,"%1d%1d.%1d%1d",
+ (bcdDevice & 0xF000)>>12,
+ (bcdDevice & 0xF00)>>8,
+ (bcdDevice & 0xF0)>>4,
+ (bcdDevice & 0xF));
+- unlock_kernel();
++ mutex_unlock(&lcd_mutex);
+ if (copy_to_user((void __user *)arg,buf,strlen(buf))!=0)
+ return -EFAULT;
+ break;
diff --git a/usb/usb-ehci-debug-port-device-gadget.patch b/usb/usb-ehci-debug-port-device-gadget.patch
new file mode 100644
index 00000000000000..f61f10aebef357
--- /dev/null
+++ b/usb/usb-ehci-debug-port-device-gadget.patch
@@ -0,0 +1,523 @@
+From linux-usb-owner@vger.kernel.org Wed Jul 21 12:12:45 2010
+Date: Mon, 12 Jul 2010 18:37:53 +0200
+From: stephane duverger <stephane.duverger@gmail.com>
+To: Greg KH <greg@kroah.com>
+Cc: dbrownell@users.sourceforge.net, linux-usb@vger.kernel.org
+Subject: USB: EHCI Debug Port Device Gadget
+Message-ID: <20100712183753.2efecb8e@riot.ssi.corp>
+
+This is a patch that implements an USB EHCI Debug Device using the
+Gadget API. This patch applies to a 2.6.35-rc3 kernel.
+
+The gadget needs a compliant usb controller that forwards the
+USB_DEVICE_DEBUG_MODE feature to its gadget.
+
+The gadget provides two configuration modes, one that only printk() the
+received data, and one that exposes a serial device to userland
+(/dev/ttyGSxxx).
+
+The gadget has been tested on an IGEPv2 board running a 2.6.35-rc1
+kernel. The debug port was fed on the host side by a 2.6.34 kernel.
+
+Signed-off-by: Stephane Duverger <stephane.duverger@gmail.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/Kconfig | 28 ++
+ drivers/usb/gadget/Makefile | 2
+ drivers/usb/gadget/dbgp.c | 434 ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 464 insertions(+)
+
+--- a/drivers/usb/gadget/Kconfig
++++ b/drivers/usb/gadget/Kconfig
+@@ -915,6 +915,34 @@ config USB_G_HID
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "g_hid".
+
++config USB_G_DBGP
++ tristate "EHCI Debug Device Gadget"
++ help
++ This gadget emulates an EHCI Debug device. This is useful when you want
++ to interact with an EHCI Debug Port.
++
++ Say "y" to link the driver statically, or "m" to build a
++ dynamically linked module called "g_dbgp".
++
++if USB_G_DBGP
++choice
++ prompt "EHCI Debug Device mode"
++ default USB_G_DBGP_SERIAL
++
++config USB_G_DBGP_PRINTK
++ depends on USB_G_DBGP
++ bool "printk"
++ help
++ Directly printk() received data. No interaction.
++
++config USB_G_DBGP_SERIAL
++ depends on USB_G_DBGP
++ bool "serial"
++ help
++ Userland can interact using /dev/ttyGSxxx.
++endchoice
++endif
++
+ # put drivers that need isochronous transfer support (for audio
+ # or video class gadget drivers), or specific hardware, here.
+ config USB_G_WEBCAM
+--- a/drivers/usb/gadget/Makefile
++++ b/drivers/usb/gadget/Makefile
+@@ -44,6 +44,7 @@ g_printer-objs := printer.o
+ g_cdc-objs := cdc2.o
+ g_multi-objs := multi.o
+ g_hid-objs := hid.o
++g_dbgp-objs := dbgp.o
+ g_nokia-objs := nokia.o
+ g_webcam-objs := webcam.o
+
+@@ -60,6 +61,7 @@ obj-$(CONFIG_USB_G_PRINTER) += g_printer
+ obj-$(CONFIG_USB_MIDI_GADGET) += g_midi.o
+ obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o
+ obj-$(CONFIG_USB_G_HID) += g_hid.o
++obj-$(CONFIG_USB_G_DBGP) += g_dbgp.o
+ obj-$(CONFIG_USB_G_MULTI) += g_multi.o
+ obj-$(CONFIG_USB_G_NOKIA) += g_nokia.o
+ obj-$(CONFIG_USB_G_WEBCAM) += g_webcam.o
+--- /dev/null
++++ b/drivers/usb/gadget/dbgp.c
+@@ -0,0 +1,434 @@
++/*
++ * dbgp.c -- EHCI Debug Port device gadget
++ *
++ * Copyright (C) 2010 Stephane Duverger
++ *
++ * Released under the GPLv2.
++ *
++ */
++
++/* verbose messages */
++#include <linux/kernel.h>
++#include <linux/device.h>
++#include <linux/usb/ch9.h>
++#include <linux/usb/gadget.h>
++
++/* See comments in "zero.c" */
++#include "epautoconf.c"
++
++#ifdef CONFIG_USB_G_DBGP_SERIAL
++#include "u_serial.c"
++#endif
++
++#define DRIVER_VENDOR_ID 0x0525 /* NetChip */
++#define DRIVER_PRODUCT_ID 0xc0de /* undefined */
++
++#define USB_DEBUG_MAX_PACKET_SIZE 8
++#define DBGP_REQ_EP0_LEN 128
++#define DBGP_REQ_LEN 512
++
++static struct dbgp {
++ struct usb_gadget *gadget;
++ struct usb_request *req;
++ struct usb_ep *i_ep;
++ struct usb_ep *o_ep;
++#ifdef CONFIG_USB_G_DBGP_SERIAL
++ struct gserial *serial;
++#endif
++} dbgp;
++
++static struct usb_device_descriptor device_desc = {
++ .bLength = sizeof device_desc,
++ .bDescriptorType = USB_DT_DEVICE,
++ .bcdUSB = __constant_cpu_to_le16(0x0200),
++ .bDeviceClass = USB_CLASS_VENDOR_SPEC,
++ .idVendor = __constant_cpu_to_le16(DRIVER_VENDOR_ID),
++ .idProduct = __constant_cpu_to_le16(DRIVER_PRODUCT_ID),
++ .bNumConfigurations = 1,
++};
++
++static struct usb_debug_descriptor dbg_desc = {
++ .bLength = sizeof dbg_desc,
++ .bDescriptorType = USB_DT_DEBUG,
++};
++
++static struct usb_endpoint_descriptor i_desc = {
++ .bLength = USB_DT_ENDPOINT_SIZE,
++ .bDescriptorType = USB_DT_ENDPOINT,
++ .bmAttributes = USB_ENDPOINT_XFER_BULK,
++ .bEndpointAddress = USB_DIR_IN,
++};
++
++static struct usb_endpoint_descriptor o_desc = {
++ .bLength = USB_DT_ENDPOINT_SIZE,
++ .bDescriptorType = USB_DT_ENDPOINT,
++ .bmAttributes = USB_ENDPOINT_XFER_BULK,
++ .bEndpointAddress = USB_DIR_OUT,
++};
++
++#ifdef CONFIG_USB_G_DBGP_PRINTK
++static int dbgp_consume(char *buf, unsigned len)
++{
++ char c;
++
++ if (!len)
++ return 0;
++
++ c = buf[len-1];
++ if (c != 0)
++ buf[len-1] = 0;
++
++ printk(KERN_NOTICE "%s%c", buf, c);
++ return 0;
++}
++
++static void __disable_ep(struct usb_ep *ep)
++{
++ if (ep && ep->driver_data == dbgp.gadget) {
++ usb_ep_disable(ep);
++ ep->driver_data = NULL;
++ }
++}
++
++static void dbgp_disable_ep(void)
++{
++ __disable_ep(dbgp.i_ep);
++ __disable_ep(dbgp.o_ep);
++}
++
++static void dbgp_complete(struct usb_ep *ep, struct usb_request *req)
++{
++ int stp;
++ int err = 0;
++ int status = req->status;
++
++ if (ep == dbgp.i_ep) {
++ stp = 1;
++ goto fail;
++ }
++
++ if (status != 0) {
++ stp = 2;
++ goto release_req;
++ }
++
++ dbgp_consume(req->buf, req->actual);
++
++ req->length = DBGP_REQ_LEN;
++ err = usb_ep_queue(ep, req, GFP_ATOMIC);
++ if (err < 0) {
++ stp = 3;
++ goto release_req;
++ }
++
++ return;
++
++release_req:
++ kfree(req->buf);
++ usb_ep_free_request(dbgp.o_ep, req);
++ dbgp_disable_ep();
++fail:
++ dev_dbg(&dbgp.gadget->dev,
++ "complete: failure (%d:%d) ==> %d\n", stp, err, status);
++}
++
++static int dbgp_enable_ep_req(struct usb_ep *ep)
++{
++ int err, stp;
++ struct usb_request *req;
++
++ req = usb_ep_alloc_request(ep, GFP_KERNEL);
++ if (!req) {
++ err = -ENOMEM;
++ stp = 1;
++ goto fail_1;
++ }
++
++ req->buf = kmalloc(DBGP_REQ_LEN, GFP_KERNEL);
++ if (!req->buf) {
++ err = -ENOMEM;
++ stp = 2;
++ goto fail_2;
++ }
++
++ req->complete = dbgp_complete;
++ req->length = DBGP_REQ_LEN;
++ err = usb_ep_queue(ep, req, GFP_ATOMIC);
++ if (err < 0) {
++ stp = 3;
++ goto fail_3;
++ }
++
++ return 0;
++
++fail_3:
++ kfree(req->buf);
++fail_2:
++ usb_ep_free_request(dbgp.o_ep, req);
++fail_1:
++ dev_dbg(&dbgp.gadget->dev,
++ "enable ep req: failure (%d:%d)\n", stp, err);
++ return err;
++}
++
++static int __enable_ep(struct usb_ep *ep, struct usb_endpoint_descriptor *desc)
++{
++ int err = usb_ep_enable(ep, desc);
++ ep->driver_data = dbgp.gadget;
++ return err;
++}
++
++static int dbgp_enable_ep(void)
++{
++ int err, stp;
++
++ err = __enable_ep(dbgp.i_ep, &i_desc);
++ if (err < 0) {
++ stp = 1;
++ goto fail_1;
++ }
++
++ err = __enable_ep(dbgp.o_ep, &o_desc);
++ if (err < 0) {
++ stp = 2;
++ goto fail_2;
++ }
++
++ err = dbgp_enable_ep_req(dbgp.o_ep);
++ if (err < 0) {
++ stp = 3;
++ goto fail_3;
++ }
++
++ return 0;
++
++fail_3:
++ __disable_ep(dbgp.o_ep);
++fail_2:
++ __disable_ep(dbgp.i_ep);
++fail_1:
++ dev_dbg(&dbgp.gadget->dev, "enable ep: failure (%d:%d)\n", stp, err);
++ return err;
++}
++#endif
++
++static void dbgp_disconnect(struct usb_gadget *gadget)
++{
++#ifdef CONFIG_USB_G_DBGP_PRINTK
++ dbgp_disable_ep();
++#else
++ gserial_disconnect(dbgp.serial);
++#endif
++}
++
++static void dbgp_unbind(struct usb_gadget *gadget)
++{
++#ifdef CONFIG_USB_G_DBGP_SERIAL
++ kfree(dbgp.serial);
++#endif
++ if (dbgp.req) {
++ kfree(dbgp.req->buf);
++ usb_ep_free_request(gadget->ep0, dbgp.req);
++ }
++
++ gadget->ep0->driver_data = NULL;
++}
++
++static int __init dbgp_configure_endpoints(struct usb_gadget *gadget)
++{
++ int stp;
++
++ usb_ep_autoconfig_reset(gadget);
++
++ dbgp.i_ep = usb_ep_autoconfig(gadget, &i_desc);
++ if (!dbgp.i_ep) {
++ stp = 1;
++ goto fail_1;
++ }
++
++ dbgp.i_ep->driver_data = gadget;
++ i_desc.wMaxPacketSize =
++ __constant_cpu_to_le16(USB_DEBUG_MAX_PACKET_SIZE);
++
++ dbgp.o_ep = usb_ep_autoconfig(gadget, &o_desc);
++ if (!dbgp.o_ep) {
++ dbgp.i_ep->driver_data = NULL;
++ stp = 2;
++ goto fail_2;
++ }
++
++ dbgp.o_ep->driver_data = gadget;
++ o_desc.wMaxPacketSize =
++ __constant_cpu_to_le16(USB_DEBUG_MAX_PACKET_SIZE);
++
++ dbg_desc.bDebugInEndpoint = i_desc.bEndpointAddress & 0x7f;
++ dbg_desc.bDebugOutEndpoint = o_desc.bEndpointAddress & 0x7f;
++
++#ifdef CONFIG_USB_G_DBGP_SERIAL
++ dbgp.serial->in = dbgp.i_ep;
++ dbgp.serial->out = dbgp.o_ep;
++
++ dbgp.serial->in_desc = &i_desc;
++ dbgp.serial->out_desc = &o_desc;
++
++ if (gserial_setup(gadget, 1) < 0) {
++ stp = 3;
++ goto fail_3;
++ }
++
++ return 0;
++
++fail_3:
++ dbgp.o_ep->driver_data = NULL;
++#else
++ return 0;
++#endif
++fail_2:
++ dbgp.i_ep->driver_data = NULL;
++fail_1:
++ dev_dbg(&dbgp.gadget->dev, "ep config: failure (%d)\n", stp);
++ return -ENODEV;
++}
++
++static int __init dbgp_bind(struct usb_gadget *gadget)
++{
++ int err, stp;
++
++ dbgp.gadget = gadget;
++
++ dbgp.req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL);
++ if (!dbgp.req) {
++ err = -ENOMEM;
++ stp = 1;
++ goto fail;
++ }
++
++ dbgp.req->buf = kmalloc(DBGP_REQ_EP0_LEN, GFP_KERNEL);
++ if (!dbgp.req->buf) {
++ err = -ENOMEM;
++ stp = 2;
++ goto fail;
++ }
++
++ dbgp.req->length = DBGP_REQ_EP0_LEN;
++ gadget->ep0->driver_data = gadget;
++
++#ifdef CONFIG_USB_G_DBGP_SERIAL
++ dbgp.serial = kzalloc(sizeof(struct gserial), GFP_KERNEL);
++ if (!dbgp.serial) {
++ stp = 3;
++ err = -ENOMEM;
++ goto fail;
++ }
++#endif
++ err = dbgp_configure_endpoints(gadget);
++ if (err < 0) {
++ stp = 4;
++ goto fail;
++ }
++
++ dev_dbg(&dbgp.gadget->dev, "bind: success\n");
++ return 0;
++
++fail:
++ dev_dbg(&gadget->dev, "bind: failure (%d:%d)\n", stp, err);
++ dbgp_unbind(gadget);
++ return err;
++}
++
++static void dbgp_setup_complete(struct usb_ep *ep,
++ struct usb_request *req)
++{
++ dev_dbg(&dbgp.gadget->dev, "setup complete: %d, %d/%d\n",
++ req->status, req->actual, req->length);
++}
++
++static int dbgp_setup(struct usb_gadget *gadget,
++ const struct usb_ctrlrequest *ctrl)
++{
++ struct usb_request *req = dbgp.req;
++ u8 request = ctrl->bRequest;
++ u16 value = le16_to_cpu(ctrl->wValue);
++ u16 length = le16_to_cpu(ctrl->wLength);
++ int err = 0;
++ void *data;
++ u16 len;
++
++ gadget->ep0->driver_data = gadget;
++
++ if (request == USB_REQ_GET_DESCRIPTOR) {
++ switch (value>>8) {
++ case USB_DT_DEVICE:
++ dev_dbg(&dbgp.gadget->dev, "setup: desc device\n");
++ len = sizeof device_desc;
++ data = &device_desc;
++ break;
++ case USB_DT_DEBUG:
++ dev_dbg(&dbgp.gadget->dev, "setup: desc debug\n");
++ len = sizeof dbg_desc;
++ data = &dbg_desc;
++ break;
++ default:
++ goto fail;
++ }
++ } else if (request == USB_REQ_SET_FEATURE &&
++ value == USB_DEVICE_DEBUG_MODE) {
++ len = 0;
++ data = NULL;
++ dev_dbg(&dbgp.gadget->dev, "setup: feat debug\n");
++#ifdef CONFIG_USB_G_DBGP_PRINTK
++ err = dbgp_enable_ep();
++#else
++ err = gserial_connect(dbgp.serial, 0);
++#endif
++ if (err < 0)
++ goto fail;
++ } else
++ goto fail;
++
++ if (len >= 0) {
++ req->length = min(length, len);
++ req->zero = len < req->length;
++ if (data && req->length)
++ memcpy(req->buf, data, req->length);
++
++ req->complete = dbgp_setup_complete;
++ return usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
++ }
++
++fail:
++ dev_dbg(&dbgp.gadget->dev,
++ "setup: failure req %x v %x\n", request, value);
++ return err;
++}
++
++static struct usb_gadget_driver dbgp_driver = {
++ .function = "dbgp",
++ .speed = USB_SPEED_HIGH,
++ .bind = dbgp_bind,
++ .unbind = dbgp_unbind,
++ .setup = dbgp_setup,
++ .disconnect = dbgp_disconnect,
++ .driver = {
++ .owner = THIS_MODULE,
++ .name = "dbgp"
++ },
++};
++
++static int __init dbgp_init(void)
++{
++ return usb_gadget_register_driver(&dbgp_driver);
++}
++
++static void __exit dbgp_exit(void)
++{
++ usb_gadget_unregister_driver(&dbgp_driver);
++#ifdef CONFIG_USB_G_DBGP_SERIAL
++ gserial_cleanup();
++#endif
++}
++
++MODULE_AUTHOR("Stephane Duverger");
++MODULE_LICENSE("GPL");
++module_init(dbgp_init);
++module_exit(dbgp_exit);
diff --git a/usb/usb-gadget-remove-unnecessary-casts-of-private_data.patch b/usb/usb-gadget-remove-unnecessary-casts-of-private_data.patch
new file mode 100644
index 00000000000000..cb1a1534c3d645
--- /dev/null
+++ b/usb/usb-gadget-remove-unnecessary-casts-of-private_data.patch
@@ -0,0 +1,46 @@
+From joe@perches.com Wed Jul 21 12:12:20 2010
+From: Joe Perches <joe@perches.com>
+To: Jiri Kosina <trivial@kernel.org>
+Cc: linux-kernel@vger.kernel.org,
+ David Brownell <dbrownell@users.sourceforge.net>,
+ Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org
+Subject: USB: gadget: Remove unnecessary casts of private_data
+Date: Mon, 12 Jul 2010 13:50:11 -0700
+Message-Id: <2ca088f9b83577f328c67334cc1e2e8470a866cc.1278967121.git.joe@perches.com>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/f_hid.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/gadget/f_hid.c
++++ b/drivers/usb/gadget/f_hid.c
+@@ -142,7 +142,7 @@ static struct usb_descriptor_header *hid
+ static ssize_t f_hidg_read(struct file *file, char __user *buffer,
+ size_t count, loff_t *ptr)
+ {
+- struct f_hidg *hidg = (struct f_hidg *)file->private_data;
++ struct f_hidg *hidg = file->private_data;
+ char *tmp_buff = NULL;
+ unsigned long flags;
+
+@@ -200,7 +200,7 @@ static void f_hidg_req_complete(struct u
+ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
+ size_t count, loff_t *offp)
+ {
+- struct f_hidg *hidg = (struct f_hidg *)file->private_data;
++ struct f_hidg *hidg = file->private_data;
+ ssize_t status = -ENOMEM;
+
+ if (!access_ok(VERIFY_READ, buffer, count))
+@@ -257,7 +257,7 @@ static ssize_t f_hidg_write(struct file
+
+ static unsigned int f_hidg_poll(struct file *file, poll_table *wait)
+ {
+- struct f_hidg *hidg = (struct f_hidg *)file->private_data;
++ struct f_hidg *hidg = file->private_data;
+ unsigned int ret = 0;
+
+ poll_wait(file, &hidg->read_queue, wait);
diff --git a/usb/usb-host-remove-dead-config_arch_karo.patch b/usb/usb-host-remove-dead-config_arch_karo.patch
new file mode 100644
index 00000000000000..2fcd7b42123be7
--- /dev/null
+++ b/usb/usb-host-remove-dead-config_arch_karo.patch
@@ -0,0 +1,61 @@
+From linux-usb-owner@vger.kernel.org Wed Jul 21 12:57:27 2010
+From: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
+To: Ryan Mallon <ryan@bluewatersys.com>
+Cc: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>,
+ Russell King <linux@arm.linux.org.uk>,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Mike Frysinger <vapier@gentoo.org>,
+ Lothar Wassmann <LW@KARO-electronics.de>,
+ Michael Hennerich <michael.hennerich@analog.com>,
+ Bryan Wu <cooloney@kernel.org>,
+ linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,
+ linux-usb@vger.kernel.org, vamos-dev@i4.informatik.uni-erlangen.de
+Subject: USB: host: Remove dead CONFIG_ARCH_KARO
+Date: Tue, 20 Jul 2010 09:08:01 +0200
+Message-ID: <86zkxmk4vi.fsf_-_@peer.zerties.org>
+
+
+CONFIG_ARCH_KARO doesn't exist in Kconfig and is never defined anywhere
+else, therefore removing all references for it from the source code.
+
+Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
+Acked-by: Ryan Mallon <ryan@bluewatersys.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/isp1362.h | 24 +-----------------------
+ 1 file changed, 1 insertion(+), 23 deletions(-)
+
+--- a/drivers/usb/host/isp1362.h
++++ b/drivers/usb/host/isp1362.h
+@@ -8,29 +8,7 @@
+ /*
+ * Platform specific compile time options
+ */
+-#if defined(CONFIG_ARCH_KARO)
+-#include <asm/arch/hardware.h>
+-#include <asm/arch/pxa-regs.h>
+-#include <asm/arch/karo.h>
+-
+-#define USE_32BIT 1
+-
+-
+-/* These options are mutually eclusive */
+-#define USE_PLATFORM_DELAY 1
+-#define USE_NDELAY 0
+-/*
+- * MAX_ROOT_PORTS: Number of downstream ports
+- *
+- * The chip has two USB ports, one of which can be configured as
+- * an USB device port, so the value of this constant is implementation
+- * specific.
+- */
+-#define MAX_ROOT_PORTS 2
+-#define DUMMY_DELAY_ACCESS do {} while (0)
+-
+-/* insert platform specific definitions for other machines here */
+-#elif defined(CONFIG_BLACKFIN)
++#if defined(CONFIG_BLACKFIN)
+
+ #include <linux/io.h>
+ #define USE_32BIT 0
diff --git a/usb/usb-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch b/usb/usb-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch
new file mode 100644
index 00000000000000..3e89fe3b1c6285
--- /dev/null
+++ b/usb/usb-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch
@@ -0,0 +1,32 @@
+From linux-usb-owner@vger.kernel.org Wed Jul 21 13:05:07 2010
+Message-Id: <201007202229.o6KMT82R021811@imap1.linux-foundation.org>
+Subject: USB: io_ti.c: don't return 0 if writing the download record failed
+To: greg@kroah.com
+Cc: linux-usb@vger.kernel.org, akpm@linux-foundation.org,
+ roel.kluin@gmail.com
+From: akpm@linux-foundation.org
+Date: Tue, 20 Jul 2010 15:29:08 -0700
+
+From: Roel Kluin <roel.kluin@gmail.com>
+
+If the write download record failed we shouldn't return 0.
+
+Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/io_ti.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/io_ti.c
++++ b/drivers/usb/serial/io_ti.c
+@@ -1298,7 +1298,7 @@ static int download_fw(struct edgeport_s
+ kfree(header);
+ kfree(rom_desc);
+ kfree(ti_manuf_desc);
+- return status;
++ return -EINVAL;
+ }
+
+ /* verify the write -- must do this in order for
diff --git a/usb/usb-misc-remove-unnecessary-casts-of-private_data.patch b/usb/usb-misc-remove-unnecessary-casts-of-private_data.patch
new file mode 100644
index 00000000000000..473d1e7da4a8ea
--- /dev/null
+++ b/usb/usb-misc-remove-unnecessary-casts-of-private_data.patch
@@ -0,0 +1,195 @@
+From joe@perches.com Wed Jul 21 12:12:06 2010
+From: Joe Perches <joe@perches.com>
+To: Jiri Kosina <trivial@kernel.org>
+Cc: linux-kernel@vger.kernel.org,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Juergen Stuber <starblue@users.sourceforge.net>,
+ Thomas Winischhofer <thomas@winischhofer.net>,
+ linux-usb@vger.kernel.org, legousb-devel@lists.sourceforge.net
+Subject: USB: misc: Remove unnecessary casts of private_data
+Date: Mon, 12 Jul 2010 13:50:12 -0700
+Message-Id: <d777d5bcc287f389dbb6293a67891f41a4457cee.1278967121.git.joe@perches.com>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/misc/ftdi-elan.c | 4 ++--
+ drivers/usb/misc/iowarrior.c | 8 ++++----
+ drivers/usb/misc/legousbtower.c | 6 +++---
+ drivers/usb/misc/sisusbvga/sisusb.c | 10 +++++-----
+ drivers/usb/misc/usblcd.c | 8 ++++----
+ 5 files changed, 18 insertions(+), 18 deletions(-)
+
+--- a/drivers/usb/misc/ftdi-elan.c
++++ b/drivers/usb/misc/ftdi-elan.c
+@@ -650,7 +650,7 @@ static int ftdi_elan_open(struct inode *
+
+ static int ftdi_elan_release(struct inode *inode, struct file *file)
+ {
+- struct usb_ftdi *ftdi = (struct usb_ftdi *)file->private_data;
++ struct usb_ftdi *ftdi = file->private_data;
+ if (ftdi == NULL)
+ return -ENODEV;
+ up(&ftdi->sw_lock); /* decrement the count on our device */
+@@ -673,7 +673,7 @@ static ssize_t ftdi_elan_read(struct fil
+ int bytes_read = 0;
+ int retry_on_empty = 10;
+ int retry_on_timeout = 5;
+- struct usb_ftdi *ftdi = (struct usb_ftdi *)file->private_data;
++ struct usb_ftdi *ftdi = file->private_data;
+ if (ftdi->disconnected > 0) {
+ return -ENODEV;
+ }
+--- a/drivers/usb/misc/iowarrior.c
++++ b/drivers/usb/misc/iowarrior.c
+@@ -283,7 +283,7 @@ static ssize_t iowarrior_read(struct fil
+ int read_idx;
+ int offset;
+
+- dev = (struct iowarrior *)file->private_data;
++ dev = file->private_data;
+
+ /* verify that the device wasn't unplugged */
+ if (dev == NULL || !dev->present)
+@@ -349,7 +349,7 @@ static ssize_t iowarrior_write(struct fi
+ char *buf = NULL; /* for IOW24 and IOW56 we need a buffer */
+ struct urb *int_out_urb = NULL;
+
+- dev = (struct iowarrior *)file->private_data;
++ dev = file->private_data;
+
+ mutex_lock(&dev->mutex);
+ /* verify that the device wasn't unplugged */
+@@ -484,7 +484,7 @@ static long iowarrior_ioctl(struct file
+ int retval;
+ int io_res; /* checks for bytes read/written and copy_to/from_user results */
+
+- dev = (struct iowarrior *)file->private_data;
++ dev = file->private_data;
+ if (dev == NULL) {
+ return -ENODEV;
+ }
+@@ -657,7 +657,7 @@ static int iowarrior_release(struct inod
+ struct iowarrior *dev;
+ int retval = 0;
+
+- dev = (struct iowarrior *)file->private_data;
++ dev = file->private_data;
+ if (dev == NULL) {
+ return -ENODEV;
+ }
+--- a/drivers/usb/misc/legousbtower.c
++++ b/drivers/usb/misc/legousbtower.c
+@@ -448,7 +448,7 @@ static int tower_release (struct inode *
+
+ dbg(2, "%s: enter", __func__);
+
+- dev = (struct lego_usb_tower *)file->private_data;
++ dev = file->private_data;
+
+ if (dev == NULL) {
+ dbg(1, "%s: object is NULL", __func__);
+@@ -597,7 +597,7 @@ static ssize_t tower_read (struct file *
+
+ dbg(2, "%s: enter, count = %Zd", __func__, count);
+
+- dev = (struct lego_usb_tower *)file->private_data;
++ dev = file->private_data;
+
+ /* lock this object */
+ if (mutex_lock_interruptible(&dev->lock)) {
+@@ -686,7 +686,7 @@ static ssize_t tower_write (struct file
+
+ dbg(2, "%s: enter, count = %Zd", __func__, count);
+
+- dev = (struct lego_usb_tower *)file->private_data;
++ dev = file->private_data;
+
+ /* lock this object */
+ if (mutex_lock_interruptible(&dev->lock)) {
+--- a/drivers/usb/misc/sisusbvga/sisusb.c
++++ b/drivers/usb/misc/sisusbvga/sisusb.c
+@@ -2487,7 +2487,7 @@ sisusb_release(struct inode *inode, stru
+ {
+ struct sisusb_usb_data *sisusb;
+
+- if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
++ if (!(sisusb = file->private_data))
+ return -ENODEV;
+
+ mutex_lock(&sisusb->lock);
+@@ -2519,7 +2519,7 @@ sisusb_read(struct file *file, char __us
+ u16 buf16;
+ u32 buf32, address;
+
+- if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
++ if (!(sisusb = file->private_data))
+ return -ENODEV;
+
+ mutex_lock(&sisusb->lock);
+@@ -2661,7 +2661,7 @@ sisusb_write(struct file *file, const ch
+ u16 buf16;
+ u32 buf32, address;
+
+- if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
++ if (!(sisusb = file->private_data))
+ return -ENODEV;
+
+ mutex_lock(&sisusb->lock);
+@@ -2804,7 +2804,7 @@ sisusb_lseek(struct file *file, loff_t o
+ struct sisusb_usb_data *sisusb;
+ loff_t ret;
+
+- if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
++ if (!(sisusb = file->private_data))
+ return -ENODEV;
+
+ mutex_lock(&sisusb->lock);
+@@ -2969,7 +2969,7 @@ sisusb_ioctl(struct file *file, unsigned
+ long retval = 0;
+ u32 __user *argp = (u32 __user *)arg;
+
+- if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
++ if (!(sisusb = file->private_data))
+ return -ENODEV;
+
+ mutex_lock(&sisusb->lock);
+--- a/drivers/usb/misc/usblcd.c
++++ b/drivers/usb/misc/usblcd.c
+@@ -116,7 +116,7 @@ static int lcd_release(struct inode *ino
+ {
+ struct usb_lcd *dev;
+
+- dev = (struct usb_lcd *)file->private_data;
++ dev = file->private_data;
+ if (dev == NULL)
+ return -ENODEV;
+
+@@ -132,7 +132,7 @@ static ssize_t lcd_read(struct file *fil
+ int retval = 0;
+ int bytes_read;
+
+- dev = (struct usb_lcd *)file->private_data;
++ dev = file->private_data;
+
+ /* do a blocking bulk read to get data from the device */
+ retval = usb_bulk_msg(dev->udev,
+@@ -158,7 +158,7 @@ static long lcd_ioctl(struct file *file,
+ u16 bcdDevice;
+ char buf[30];
+
+- dev = (struct usb_lcd *)file->private_data;
++ dev = file->private_data;
+ if (dev == NULL)
+ return -ENODEV;
+
+@@ -217,7 +217,7 @@ static ssize_t lcd_write(struct file *fi
+ struct urb *urb = NULL;
+ char *buf = NULL;
+
+- dev = (struct usb_lcd *)file->private_data;
++ dev = file->private_data;
+
+ /* verify that we actually have some data to write */
+ if (count == 0)
diff --git a/usb/usb-musb-forward-debug-mode-feature-to-gadget.patch b/usb/usb-musb-forward-debug-mode-feature-to-gadget.patch
new file mode 100644
index 00000000000000..3295923549baa3
--- /dev/null
+++ b/usb/usb-musb-forward-debug-mode-feature-to-gadget.patch
@@ -0,0 +1,36 @@
+From linux-usb-owner@vger.kernel.org Wed Jul 21 12:13:24 2010
+Date: Mon, 12 Jul 2010 18:43:47 +0200
+From: stephane duverger <stephane.duverger@gmail.com>
+To: Greg KH <greg@kroah.com>
+Cc: dbrownell@users.sourceforge.net, linux-usb@vger.kernel.org
+Subject: USB: musb: forward debug mode feature to gadget
+Message-ID: <20100712184347.12a4b627@riot.ssi.corp>
+
+This is a patch for the musb usb controller.
+
+It allows forwarding of the debug mode feature to its gadget in order
+to be able to act as an ehci debug device.
+
+This patch has been tested on an IGEPv2 board running a 2.6.35-rc1
+kernel.
+
+Signed-off-by: Stephane Duverger <stephane.duverger@gmail.com>
+Cc: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_gadget_ep0.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/musb/musb_gadget_ep0.c
++++ b/drivers/usb/musb/musb_gadget_ep0.c
+@@ -402,6 +402,9 @@ __acquires(musb->lock)
+ musb->g.a_alt_hnp_support = 1;
+ break;
+ #endif
++ case USB_DEVICE_DEBUG_MODE:
++ handled = 0;
++ break;
+ stall:
+ default:
+ handled = -EINVAL;
diff --git a/usb/usb-otg-ulpi-add-support-for-smsc-usb3319-ulpi-phy.patch b/usb/usb-otg-ulpi-add-support-for-smsc-usb3319-ulpi-phy.patch
new file mode 100644
index 00000000000000..285aeb8d9d31df
--- /dev/null
+++ b/usb/usb-otg-ulpi-add-support-for-smsc-usb3319-ulpi-phy.patch
@@ -0,0 +1,43 @@
+From grinberg@compulab.co.il Wed Jul 21 13:08:31 2010
+From: Igor Grinberg <grinberg@compulab.co.il>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
+ Sascha Hauer <kernel@pengutronix.de>, Daniel Mack <daniel@caiaq.de>,
+ =?UTF-8?q?Eric=20B=E9nard?= <eric@eukrea.com>,
+ Mike Rapoport <mike@compulab.co.il>,
+ Igor Grinberg <grinberg@compulab.co.il>
+Subject: USB: otg/ulpi: add support for SMSC USB3319 ulpi phy
+Date: Thu, 15 Jul 2010 16:00:15 +0300
+Message-Id: <1279198816-30367-3-git-send-email-grinberg@compulab.co.il>
+
+
+Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/otg/Kconfig | 2 --
+ drivers/usb/otg/ulpi.c | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/usb/otg/Kconfig
++++ b/drivers/usb/otg/Kconfig
+@@ -49,8 +49,6 @@ config USB_ULPI
+ Enable this to support ULPI connected USB OTG transceivers which
+ are likely found on embedded boards.
+
+- The only chip currently supported is NXP's ISP1504
+-
+ config TWL4030_USB
+ tristate "TWL4030 USB Transceiver Driver"
+ depends on TWL4030_CORE && REGULATOR_TWL4030
+--- a/drivers/usb/otg/ulpi.c
++++ b/drivers/usb/otg/ulpi.c
+@@ -34,6 +34,7 @@
+ /* ULPI hardcoded IDs, used for probing */
+ static unsigned int ulpi_ids[] = {
+ ULPI_ID(0x04cc, 0x1504), /* NXP ISP1504 */
++ ULPI_ID(0x0424, 0x0006), /* SMSC USB3319 */
+ };
+
+ static int ulpi_set_flags(struct otg_transceiver *otg)
diff --git a/usb/usb-otg-ulpi-extend-the-generic-ulpi-driver.patch b/usb/usb-otg-ulpi-extend-the-generic-ulpi-driver.patch
new file mode 100644
index 00000000000000..558d41bf0ed445
--- /dev/null
+++ b/usb/usb-otg-ulpi-extend-the-generic-ulpi-driver.patch
@@ -0,0 +1,386 @@
+From grinberg@compulab.co.il Wed Jul 21 13:08:45 2010
+From: Igor Grinberg <grinberg@compulab.co.il>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
+ Sascha Hauer <kernel@pengutronix.de>, Daniel Mack <daniel@caiaq.de>,
+ =?UTF-8?q?Eric=20B=E9nard?= <eric@eukrea.com>,
+ Mike Rapoport <mike@compulab.co.il>,
+ Igor Grinberg <grinberg@compulab.co.il>
+Subject: USB: otg/ulpi: extend the generic ulpi driver.
+Date: Thu, 15 Jul 2010 16:00:16 +0300
+Message-Id: <1279198816-30367-4-git-send-email-grinberg@compulab.co.il>
+
+1) Introduce ulpi specific flags for control of the ulpi phy
+2) Extend the generic ulpi driver with support for Function and
+Interface control of upli phy
+3) Update the platforms using the generic ulpi driver with new ulpi
+flags
+4) Remove the otg control flags not in use
+
+Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-mx2/mach-pca100.c | 4
+ arch/arm/mach-mx3/mach-armadillo5x0.c | 4
+ arch/arm/mach-mx3/mach-mx31lilly.c | 4
+ arch/arm/mach-mx3/mach-mx31lite.c | 2
+ arch/arm/mach-mx3/mach-mx31moboard.c | 2
+ arch/arm/mach-mx3/mach-pcm037.c | 4
+ arch/arm/mach-mx3/mach-pcm043.c | 2
+ arch/arm/mach-mx3/mx31moboard-smartbot.c | 2
+ drivers/usb/otg/ulpi.c | 127 ++++++++++++++++++++++++++++---
+ include/linux/usb/otg.h | 7 -
+ include/linux/usb/ulpi.h | 39 +++++++++
+ 11 files changed, 168 insertions(+), 29 deletions(-)
+
+--- a/arch/arm/mach-mx2/mach-pca100.c
++++ b/arch/arm/mach-mx2/mach-pca100.c
+@@ -357,13 +357,13 @@ static void __init pca100_init(void)
+ #if defined(CONFIG_USB_ULPI)
+ if (otg_mode_host) {
+ otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ mxc_register_device(&mxc_otg_host, &otg_pdata);
+ }
+
+ usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ mxc_register_device(&mxc_usbh2, &usbh2_pdata);
+ #endif
+--- a/arch/arm/mach-mx3/mach-armadillo5x0.c
++++ b/arch/arm/mach-mx3/mach-armadillo5x0.c
+@@ -552,9 +552,9 @@ static void __init armadillo5x0_init(voi
+ /* USB */
+ #if defined(CONFIG_USB_ULPI)
+ usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+ usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ mxc_register_device(&mxc_otg_host, &usbotg_pdata);
+ mxc_register_device(&mxc_usbh2, &usbh2_pdata);
+--- a/arch/arm/mach-mx3/mach-mx31lilly.c
++++ b/arch/arm/mach-mx3/mach-mx31lilly.c
+@@ -249,9 +249,9 @@ static struct mxc_usbh_platform_data usb
+ static void lilly1131_usb_init(void)
+ {
+ usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+ usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ mxc_register_device(&mxc_usbh1, &usbh1_pdata);
+ mxc_register_device(&mxc_usbh2, &usbh2_pdata);
+--- a/arch/arm/mach-mx3/mach-mx31lite.c
++++ b/arch/arm/mach-mx3/mach-mx31lite.c
+@@ -261,7 +261,7 @@ static void __init mxc_board_init(void)
+ #if defined(CONFIG_USB_ULPI)
+ /* USB */
+ usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ mxc_register_device(&mxc_usbh2, &usbh2_pdata);
+ #endif
+--- a/arch/arm/mach-mx3/mach-mx31moboard.c
++++ b/arch/arm/mach-mx3/mach-mx31moboard.c
+@@ -405,7 +405,7 @@ static struct mxc_usbh_platform_data usb
+ static int __init moboard_usbh2_init(void)
+ {
+ usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ return mxc_register_device(&mxc_usbh2, &usbh2_pdata);
+ }
+--- a/arch/arm/mach-mx3/mach-pcm037.c
++++ b/arch/arm/mach-mx3/mach-pcm037.c
+@@ -658,13 +658,13 @@ static void __init mxc_board_init(void)
+ #if defined(CONFIG_USB_ULPI)
+ if (otg_mode_host) {
+ otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ mxc_register_device(&mxc_otg_host, &otg_pdata);
+ }
+
+ usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ mxc_register_device(&mxc_usbh2, &usbh2_pdata);
+ #endif
+--- a/arch/arm/mach-mx3/mach-pcm043.c
++++ b/arch/arm/mach-mx3/mach-pcm043.c
+@@ -380,7 +380,7 @@ static void __init mxc_board_init(void)
+ #if defined(CONFIG_USB_ULPI)
+ if (otg_mode_host) {
+ otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ mxc_register_device(&mxc_otg_host, &otg_pdata);
+ }
+--- a/arch/arm/mach-mx3/mx31moboard-smartbot.c
++++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c
+@@ -138,7 +138,7 @@ static struct mxc_usbh_platform_data otg
+ static int __init smartbot_otg_host_init(void)
+ {
+ otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
+- USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
++ ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
+
+ return mxc_register_device(&mxc_otg_host, &otg_host_pdata);
+ }
+--- a/drivers/usb/otg/ulpi.c
++++ b/drivers/usb/otg/ulpi.c
+@@ -37,25 +37,106 @@ static unsigned int ulpi_ids[] = {
+ ULPI_ID(0x0424, 0x0006), /* SMSC USB3319 */
+ };
+
+-static int ulpi_set_flags(struct otg_transceiver *otg)
++static int ulpi_set_otg_flags(struct otg_transceiver *otg)
+ {
+- unsigned int flags = 0;
++ unsigned int flags = ULPI_OTG_CTRL_DP_PULLDOWN |
++ ULPI_OTG_CTRL_DM_PULLDOWN;
+
+- if (otg->flags & USB_OTG_PULLUP_ID)
++ if (otg->flags & ULPI_OTG_ID_PULLUP)
+ flags |= ULPI_OTG_CTRL_ID_PULLUP;
+
+- if (otg->flags & USB_OTG_PULLDOWN_DM)
+- flags |= ULPI_OTG_CTRL_DM_PULLDOWN;
++ /*
++ * ULPI Specification rev.1.1 default
++ * for Dp/DmPulldown is enabled.
++ */
++ if (otg->flags & ULPI_OTG_DP_PULLDOWN_DIS)
++ flags &= ~ULPI_OTG_CTRL_DP_PULLDOWN;
+
+- if (otg->flags & USB_OTG_PULLDOWN_DP)
+- flags |= ULPI_OTG_CTRL_DP_PULLDOWN;
++ if (otg->flags & ULPI_OTG_DM_PULLDOWN_DIS)
++ flags &= ~ULPI_OTG_CTRL_DM_PULLDOWN;
+
+- if (otg->flags & USB_OTG_EXT_VBUS_INDICATOR)
++ if (otg->flags & ULPI_OTG_EXTVBUSIND)
+ flags |= ULPI_OTG_CTRL_EXTVBUSIND;
+
+ return otg_io_write(otg, flags, ULPI_OTG_CTRL);
+ }
+
++static int ulpi_set_fc_flags(struct otg_transceiver *otg)
++{
++ unsigned int flags = 0;
++
++ /*
++ * ULPI Specification rev.1.1 default
++ * for XcvrSelect is Full Speed.
++ */
++ if (otg->flags & ULPI_FC_HS)
++ flags |= ULPI_FUNC_CTRL_HIGH_SPEED;
++ else if (otg->flags & ULPI_FC_LS)
++ flags |= ULPI_FUNC_CTRL_LOW_SPEED;
++ else if (otg->flags & ULPI_FC_FS4LS)
++ flags |= ULPI_FUNC_CTRL_FS4LS;
++ else
++ flags |= ULPI_FUNC_CTRL_FULL_SPEED;
++
++ if (otg->flags & ULPI_FC_TERMSEL)
++ flags |= ULPI_FUNC_CTRL_TERMSELECT;
++
++ /*
++ * ULPI Specification rev.1.1 default
++ * for OpMode is Normal Operation.
++ */
++ if (otg->flags & ULPI_FC_OP_NODRV)
++ flags |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING;
++ else if (otg->flags & ULPI_FC_OP_DIS_NRZI)
++ flags |= ULPI_FUNC_CTRL_OPMODE_DISABLE_NRZI;
++ else if (otg->flags & ULPI_FC_OP_NSYNC_NEOP)
++ flags |= ULPI_FUNC_CTRL_OPMODE_NOSYNC_NOEOP;
++ else
++ flags |= ULPI_FUNC_CTRL_OPMODE_NORMAL;
++
++ /*
++ * ULPI Specification rev.1.1 default
++ * for SuspendM is Powered.
++ */
++ flags |= ULPI_FUNC_CTRL_SUSPENDM;
++
++ return otg_io_write(otg, flags, ULPI_FUNC_CTRL);
++}
++
++static int ulpi_set_ic_flags(struct otg_transceiver *otg)
++{
++ unsigned int flags = 0;
++
++ if (otg->flags & ULPI_IC_AUTORESUME)
++ flags |= ULPI_IFC_CTRL_AUTORESUME;
++
++ if (otg->flags & ULPI_IC_EXTVBUS_INDINV)
++ flags |= ULPI_IFC_CTRL_EXTERNAL_VBUS;
++
++ if (otg->flags & ULPI_IC_IND_PASSTHRU)
++ flags |= ULPI_IFC_CTRL_PASSTHRU;
++
++ if (otg->flags & ULPI_IC_PROTECT_DIS)
++ flags |= ULPI_IFC_CTRL_PROTECT_IFC_DISABLE;
++
++ return otg_io_write(otg, flags, ULPI_IFC_CTRL);
++}
++
++static int ulpi_set_flags(struct otg_transceiver *otg)
++{
++ int ret;
++
++ ret = ulpi_set_otg_flags(otg);
++ if (ret)
++ return ret;
++
++ ret = ulpi_set_ic_flags(otg);
++ if (ret)
++ return ret;
++
++ return ulpi_set_fc_flags(otg);
++}
++
+ static int ulpi_init(struct otg_transceiver *otg)
+ {
+ int i, vid, pid, ret;
+@@ -80,6 +161,31 @@ static int ulpi_init(struct otg_transcei
+ return -ENODEV;
+ }
+
++static int ulpi_set_host(struct otg_transceiver *otg, struct usb_bus *host)
++{
++ unsigned int flags = otg_io_read(otg, ULPI_IFC_CTRL);
++
++ if (!host) {
++ otg->host = NULL;
++ return 0;
++ }
++
++ otg->host = host;
++
++ flags &= ~(ULPI_IFC_CTRL_6_PIN_SERIAL_MODE |
++ ULPI_IFC_CTRL_3_PIN_SERIAL_MODE |
++ ULPI_IFC_CTRL_CARKITMODE);
++
++ if (otg->flags & ULPI_IC_6PIN_SERIAL)
++ flags |= ULPI_IFC_CTRL_6_PIN_SERIAL_MODE;
++ else if (otg->flags & ULPI_IC_3PIN_SERIAL)
++ flags |= ULPI_IFC_CTRL_3_PIN_SERIAL_MODE;
++ else if (otg->flags & ULPI_IC_CARKIT)
++ flags |= ULPI_IFC_CTRL_CARKITMODE;
++
++ return otg_io_write(otg, flags, ULPI_IFC_CTRL);
++}
++
+ static int ulpi_set_vbus(struct otg_transceiver *otg, bool on)
+ {
+ unsigned int flags = otg_io_read(otg, ULPI_OTG_CTRL);
+@@ -87,10 +193,10 @@ static int ulpi_set_vbus(struct otg_tran
+ flags &= ~(ULPI_OTG_CTRL_DRVVBUS | ULPI_OTG_CTRL_DRVVBUS_EXT);
+
+ if (on) {
+- if (otg->flags & USB_OTG_DRV_VBUS)
++ if (otg->flags & ULPI_OTG_DRVVBUS)
+ flags |= ULPI_OTG_CTRL_DRVVBUS;
+
+- if (otg->flags & USB_OTG_DRV_VBUS_EXT)
++ if (otg->flags & ULPI_OTG_DRVVBUS_EXT)
+ flags |= ULPI_OTG_CTRL_DRVVBUS_EXT;
+ }
+
+@@ -111,6 +217,7 @@ otg_ulpi_create(struct otg_io_access_ops
+ otg->flags = flags;
+ otg->io_ops = ops;
+ otg->init = ulpi_init;
++ otg->set_host = ulpi_set_host;
+ otg->set_vbus = ulpi_set_vbus;
+
+ return otg;
+--- a/include/linux/usb/otg.h
++++ b/include/linux/usb/otg.h
+@@ -43,13 +43,6 @@ enum usb_xceiv_events {
+ USB_EVENT_ENUMERATED, /* gadget driver enumerated */
+ };
+
+-#define USB_OTG_PULLUP_ID (1 << 0)
+-#define USB_OTG_PULLDOWN_DP (1 << 1)
+-#define USB_OTG_PULLDOWN_DM (1 << 2)
+-#define USB_OTG_EXT_VBUS_INDICATOR (1 << 3)
+-#define USB_OTG_DRV_VBUS (1 << 4)
+-#define USB_OTG_DRV_VBUS_EXT (1 << 5)
+-
+ struct otg_transceiver;
+
+ /* for transceivers connected thru an ULPI interface, the user must
+--- a/include/linux/usb/ulpi.h
++++ b/include/linux/usb/ulpi.h
+@@ -15,6 +15,41 @@
+ /*-------------------------------------------------------------------------*/
+
+ /*
++ * ULPI Flags
++ */
++#define ULPI_OTG_ID_PULLUP (1 << 0)
++#define ULPI_OTG_DP_PULLDOWN_DIS (1 << 1)
++#define ULPI_OTG_DM_PULLDOWN_DIS (1 << 2)
++#define ULPI_OTG_DISCHRGVBUS (1 << 3)
++#define ULPI_OTG_CHRGVBUS (1 << 4)
++#define ULPI_OTG_DRVVBUS (1 << 5)
++#define ULPI_OTG_DRVVBUS_EXT (1 << 6)
++#define ULPI_OTG_EXTVBUSIND (1 << 7)
++
++#define ULPI_IC_6PIN_SERIAL (1 << 8)
++#define ULPI_IC_3PIN_SERIAL (1 << 9)
++#define ULPI_IC_CARKIT (1 << 10)
++#define ULPI_IC_CLKSUSPM (1 << 11)
++#define ULPI_IC_AUTORESUME (1 << 12)
++#define ULPI_IC_EXTVBUS_INDINV (1 << 13)
++#define ULPI_IC_IND_PASSTHRU (1 << 14)
++#define ULPI_IC_PROTECT_DIS (1 << 15)
++
++#define ULPI_FC_HS (1 << 16)
++#define ULPI_FC_FS (1 << 17)
++#define ULPI_FC_LS (1 << 18)
++#define ULPI_FC_FS4LS (1 << 19)
++#define ULPI_FC_TERMSEL (1 << 20)
++#define ULPI_FC_OP_NORM (1 << 21)
++#define ULPI_FC_OP_NODRV (1 << 22)
++#define ULPI_FC_OP_DIS_NRZI (1 << 23)
++#define ULPI_FC_OP_NSYNC_NEOP (1 << 24)
++#define ULPI_FC_RST (1 << 25)
++#define ULPI_FC_SUSPM (1 << 26)
++
++/*-------------------------------------------------------------------------*/
++
++/*
+ * Macros for Set and Clear
+ * See ULPI 1.1 specification to find the registers with Set and Clear offsets
+ */
+@@ -59,6 +94,10 @@
+
+ /*-------------------------------------------------------------------------*/
+
++/*
++ * Register Bits
++ */
++
+ /* Function Control */
+ #define ULPI_FUNC_CTRL_XCVRSEL (1 << 0)
+ #define ULPI_FUNC_CTRL_XCVRSEL_MASK (3 << 0)
diff --git a/usb/usb-otg-ulpi-remove-unused-macro.patch b/usb/usb-otg-ulpi-remove-unused-macro.patch
new file mode 100644
index 00000000000000..ad2da69524c70d
--- /dev/null
+++ b/usb/usb-otg-ulpi-remove-unused-macro.patch
@@ -0,0 +1,32 @@
+From grinberg@compulab.co.il Wed Jul 21 13:08:19 2010
+From: Igor Grinberg <grinberg@compulab.co.il>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
+ Sascha Hauer <kernel@pengutronix.de>, Daniel Mack <daniel@caiaq.de>,
+ =?UTF-8?q?Eric=20B=E9nard?= <eric@eukrea.com>,
+ Mike Rapoport <mike@compulab.co.il>,
+ Igor Grinberg <grinberg@compulab.co.il>
+Subject: USB: otg/ulpi: remove unused macro
+Date: Thu, 15 Jul 2010 16:00:14 +0300
+Message-Id: <1279198816-30367-2-git-send-email-grinberg@compulab.co.il>
+
+
+Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
+Signed-off-by: Mike Rapoport <mike@compulab.co.il>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/otg/ulpi.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/usb/otg/ulpi.c
++++ b/drivers/usb/otg/ulpi.c
+@@ -31,8 +31,6 @@
+
+ #define ULPI_ID(vendor, product) (((vendor) << 16) | (product))
+
+-#define TR_FLAG(flags, a, b) (((flags) & a) ? b : 0)
+-
+ /* ULPI hardcoded IDs, used for probing */
+ static unsigned int ulpi_ids[] = {
+ ULPI_ID(0x04cc, 0x1504), /* NXP ISP1504 */
diff --git a/usb/usb-otg-ulpi.c-fix-register-write.patch b/usb/usb-otg-ulpi.c-fix-register-write.patch
new file mode 100644
index 00000000000000..1e5974c242e358
--- /dev/null
+++ b/usb/usb-otg-ulpi.c-fix-register-write.patch
@@ -0,0 +1,48 @@
+From eric@eukrea.com Wed Jul 21 13:07:36 2010
+From: =?utf-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
+To: gregkh@suse.de
+Cc: grinberg@compulab.co.il,
+ =?utf-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>,
+ Daniel Mack <daniel@caiaq.de>, linux-usb@vger.kernel.org,
+ linux-arm-kernel@lists.infradead.org,
+ Sascha Hauer <kernel@pengutronix.de>
+Subject: USB: otg/ulpi.c : fix register write
+Date: Thu, 15 Jul 2010 09:20:19 +0200
+Message-Id: <1279178419-3806-1-git-send-email-eric@eukrea.com>
+
+ulpi_set_vbus and ulpi_set_flags are using ULPI_SET(register) to write
+to the PHY's registers, which means we can only set bits in the PHY's
+register and not clear them.
+By directly using the address of the register without any offset, we
+now get the expected behaviour for these functions.
+
+Signed-off-by: Eric Bénard <eric@eukrea.com>
+Cc: Daniel Mack <daniel@caiaq.de>
+Cc: linux-arm-kernel@lists.infradead.org
+Cc: Sascha Hauer <kernel@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/otg/ulpi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/otg/ulpi.c
++++ b/drivers/usb/otg/ulpi.c
+@@ -54,7 +54,7 @@ static int ulpi_set_flags(struct otg_tra
+ if (otg->flags & USB_OTG_EXT_VBUS_INDICATOR)
+ flags |= ULPI_OTG_CTRL_EXTVBUSIND;
+
+- return otg_io_write(otg, flags, ULPI_SET(ULPI_OTG_CTRL));
++ return otg_io_write(otg, flags, ULPI_OTG_CTRL);
+ }
+
+ static int ulpi_init(struct otg_transceiver *otg)
+@@ -95,7 +95,7 @@ static int ulpi_set_vbus(struct otg_tran
+ flags |= ULPI_OTG_CTRL_DRVVBUS_EXT;
+ }
+
+- return otg_io_write(otg, flags, ULPI_SET(ULPI_OTG_CTRL));
++ return otg_io_write(otg, flags, ULPI_OTG_CTRL);
+ }
+
+ struct otg_transceiver *
diff --git a/usb/usb-pxa-fix-incorrect-config_cpu_pxa27x-to-config_pxa27x.patch b/usb/usb-pxa-fix-incorrect-config_cpu_pxa27x-to-config_pxa27x.patch
new file mode 100644
index 00000000000000..63449f2f133a39
--- /dev/null
+++ b/usb/usb-pxa-fix-incorrect-config_cpu_pxa27x-to-config_pxa27x.patch
@@ -0,0 +1,51 @@
+From linux-usb-owner@vger.kernel.org Wed Jul 21 12:56:05 2010
+From: Eric Miao <eric.y.miao@gmail.com>
+Date: Thu, 15 Jul 2010 17:38:36 +0800
+Message-ID: <AANLkTim6SD-dy6iK-QspagJeWQJPAJ-FrE0AW8pAlXTb@mail.gmail.com>
+Subject: usb: pxa: fix incorrect CONFIG_CPU_PXA27x to CONFIG_PXA27x
+To: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
+Cc: Russell King <linux@arm.linux.org.uk>,
+ David Brownell <dbrownell@users.sourceforge.net>,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Robert Jarzmik <robert.jarzmik@free.fr>,
+ H Hartley Sweeten <hsweeten@visionengravers.com>,
+ =?UTF-8?Q?Andr=C3=A9_Goddard_Rosa?= <andre.goddard@gmail.com>,
+ Tejun Heo <tj@kernel.org>,
+ Andrew Morton <akpm@linux-foundation.org>,
+ Mike Rapoport <mike@compulab.co.il>,
+ Alexey Dobriyan <adobriyan@gmail.com>,
+ linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org,
+ linux-kernel@vger.kernel.org,
+ vamos-dev@i4.informatik.uni-erlangen.de
+
+
+Reported-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
+Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
+
+---
+ drivers/usb/gadget/pxa27x_udc.c | 2 +-
+ drivers/usb/host/ohci-pxa27x.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/pxa27x_udc.c
++++ b/drivers/usb/gadget/pxa27x_udc.c
+@@ -2561,7 +2561,7 @@ static void pxa_udc_shutdown(struct plat
+ udc_disable(udc);
+ }
+
+-#ifdef CONFIG_CPU_PXA27x
++#ifdef CONFIG_PXA27x
+ extern void pxa27x_clear_otgph(void);
+ #else
+ #define pxa27x_clear_otgph() do {} while (0)
+--- a/drivers/usb/host/ohci-pxa27x.c
++++ b/drivers/usb/host/ohci-pxa27x.c
+@@ -203,7 +203,7 @@ static inline void pxa27x_reset_hc(struc
+ __raw_writel(uhchr & ~UHCHR_FHR, ohci->mmio_base + UHCHR);
+ }
+
+-#ifdef CONFIG_CPU_PXA27x
++#ifdef CONFIG_PXA27x
+ extern void pxa27x_clear_otgph(void);
+ #else
+ #define pxa27x_clear_otgph() do {} while (0)
diff --git a/usb/usb-serial-enable-async-suspend-for-usb-serial-port-device.patch b/usb/usb-serial-enable-async-suspend-for-usb-serial-port-device.patch
new file mode 100644
index 00000000000000..52efb87b0c605d
--- /dev/null
+++ b/usb/usb-serial-enable-async-suspend-for-usb-serial-port-device.patch
@@ -0,0 +1,32 @@
+From linux-usb-owner@vger.kernel.org Wed Jul 21 12:18:08 2010
+From: tom.leiming@gmail.com
+To: greg@kroah.com, stern@rowland.harvard.edu
+Cc: linux-usb@vger.kernel.org, Ming Lei <tom.leiming@gmail.com>
+Subject: USB: serial: enable async suspend for usb serial port device
+Date: Tue, 13 Jul 2010 23:56:24 +0800
+Message-Id: <1279036584-3709-1-git-send-email-tom.leiming@gmail.com>
+
+From: Ming Lei <tom.leiming@gmail.com>
+
+Usb serial port device is child of its usb interface device, so
+we can enable async suspend of usb serial port device to speedup
+system suspend.
+
+Signed-off-by: Ming Lei <tom.leiming@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/usb-serial.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/usb-serial.c
++++ b/drivers/usb/serial/usb-serial.c
+@@ -1071,6 +1071,8 @@ int usb_serial_probe(struct usb_interfac
+ dev_set_name(&port->dev, "ttyUSB%d", port->number);
+ dbg ("%s - registering %s", __func__, dev_name(&port->dev));
+ port->dev_state = PORT_REGISTERING;
++ device_enable_async_suspend(&port->dev);
++
+ retval = device_add(&port->dev);
+ if (retval) {
+ dev_err(&port->dev, "Error registering port device, "
diff --git a/usb/usb-storage-freecom-fixed-several-coding-style-issues.patch b/usb/usb-storage-freecom-fixed-several-coding-style-issues.patch
new file mode 100644
index 00000000000000..8b6b0c6c010850
--- /dev/null
+++ b/usb/usb-storage-freecom-fixed-several-coding-style-issues.patch
@@ -0,0 +1,76 @@
+From menderleit@gmail.com Wed Jul 21 11:53:35 2010
+From: Martin Enderleit <menderleit@gmail.com>
+To: mdharm-usb@one-eyed-alien.net
+Cc: gregkh@suse.de, linux-usb@vger.kernel.org,
+ usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org,
+ Martin Enderleit <menderleit@gmail.com>
+Subject: usb: storage: freecom: Fixed several coding style issues.
+Date: Sat, 10 Jul 2010 16:50:12 +0200
+Message-Id: <1278773412-21989-1-git-send-email-menderleit@gmail.com>
+
+From: Martin Enderleit <martin@martin-desktop.(none)>
+
+Fixed several coding style issues in freecom.c.
+
+Signed-off-by: Martin Enderleit <menderleit@gmail.com>
+Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
+Cc: Daniel Mack <daniel@caiaq.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/freecom.c | 23 +++++++++++------------
+ 1 file changed, 11 insertions(+), 12 deletions(-)
+
+--- a/drivers/usb/storage/freecom.c
++++ b/drivers/usb/storage/freecom.c
+@@ -269,7 +269,7 @@ static int freecom_transport(struct scsi
+ /* The firmware will time-out commands after 20 seconds. Some commands
+ * can legitimately take longer than this, so we use a different
+ * command that only waits for the interrupt and then sends status,
+- * without having to send a new ATAPI command to the device.
++ * without having to send a new ATAPI command to the device.
+ *
+ * NOTE: There is some indication that a data transfer after a timeout
+ * may not work, but that is a condition that should never happen.
+@@ -324,14 +324,14 @@ static int freecom_transport(struct scsi
+
+ /* Find the length we desire to read. */
+ switch (srb->cmnd[0]) {
+- case INQUIRY:
+- case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */
+- case MODE_SENSE:
+- case MODE_SENSE_10:
+- length = le16_to_cpu(fst->Count);
+- break;
+- default:
+- length = scsi_bufflen(srb);
++ case INQUIRY:
++ case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */
++ case MODE_SENSE:
++ case MODE_SENSE_10:
++ length = le16_to_cpu(fst->Count);
++ break;
++ default:
++ length = scsi_bufflen(srb);
+ }
+
+ /* verify that this amount is legal */
+@@ -414,7 +414,7 @@ static int freecom_transport(struct scsi
+ /* should never hit here -- filtered in usb.c */
+ US_DEBUGP ("freecom unimplemented direction: %d\n",
+ us->srb->sc_data_direction);
+- // Return fail, SCSI seems to handle this better.
++ /* Return fail, SCSI seems to handle this better. */
+ return USB_STOR_TRANSPORT_FAILED;
+ break;
+ }
+@@ -494,8 +494,7 @@ static void pdump (void *ibuffer, int le
+ offset = 0;
+ }
+ offset += sprintf (line+offset, "%08x:", i);
+- }
+- else if ((i & 7) == 0) {
++ } else if ((i & 7) == 0) {
+ offset += sprintf (line+offset, " -");
+ }
+ offset += sprintf (line+offset, " %02x", buffer[i] & 0xff);
diff --git a/usb/usb-usb-skeleton-remove-unnecessary-casts-of-private_data.patch b/usb/usb-usb-skeleton-remove-unnecessary-casts-of-private_data.patch
new file mode 100644
index 00000000000000..d2dd11b8442580
--- /dev/null
+++ b/usb/usb-usb-skeleton-remove-unnecessary-casts-of-private_data.patch
@@ -0,0 +1,54 @@
+From joe@perches.com Wed Jul 21 12:11:43 2010
+From: Joe Perches <joe@perches.com>
+To: Jiri Kosina <trivial@kernel.org>
+Cc: linux-kernel@vger.kernel.org,
+ Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org
+Subject: USB: usb-skeleton: Remove unnecessary casts of private_data
+Date: Mon, 12 Jul 2010 13:50:13 -0700
+Message-Id: <b7b64f6d1d8b19cab0d73960fe9f72b2c40bdc62.1278967121.git.joe@perches.com>
+
+Signed-off-by: Joe Perches <joe@perches.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/usb-skeleton.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/usb-skeleton.c
++++ b/drivers/usb/usb-skeleton.c
+@@ -142,7 +142,7 @@ static int skel_release(struct inode *in
+ {
+ struct usb_skel *dev;
+
+- dev = (struct usb_skel *)file->private_data;
++ dev = file->private_data;
+ if (dev == NULL)
+ return -ENODEV;
+
+@@ -162,7 +162,7 @@ static int skel_flush(struct file *file,
+ struct usb_skel *dev;
+ int res;
+
+- dev = (struct usb_skel *)file->private_data;
++ dev = file->private_data;
+ if (dev == NULL)
+ return -ENODEV;
+
+@@ -246,7 +246,7 @@ static ssize_t skel_read(struct file *fi
+ int rv;
+ bool ongoing_io;
+
+- dev = (struct usb_skel *)file->private_data;
++ dev = file->private_data;
+
+ /* if we cannot read at all, return EOF */
+ if (!dev->bulk_in_urb || !count)
+@@ -401,7 +401,7 @@ static ssize_t skel_write(struct file *f
+ char *buf = NULL;
+ size_t writesize = min(count, (size_t)MAX_TRANSFER);
+
+- dev = (struct usb_skel *)file->private_data;
++ dev = file->private_data;
+
+ /* verify that we actually have some data to write */
+ if (count == 0)
diff --git a/usb/usb-xhci-trivial-use-array_size.patch b/usb/usb-xhci-trivial-use-array_size.patch
index f3596ad17442e7..9eb2bd97fc0d4d 100644
--- a/usb/usb-xhci-trivial-use-array_size.patch
+++ b/usb/usb-xhci-trivial-use-array_size.patch
@@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
-@@ -1587,7 +1587,7 @@ static int xhci_check_trb_in_td_math(str
+@@ -1588,7 +1588,7 @@ static int xhci_check_trb_in_td_math(str
unsigned int num_tests;
int i, ret;
@@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
for (i = 0; i < num_tests; i++) {
ret = xhci_test_trb_in_td(xhci,
xhci->event_ring->first_seg,
-@@ -1600,7 +1600,7 @@ static int xhci_check_trb_in_td_math(str
+@@ -1601,7 +1601,7 @@ static int xhci_check_trb_in_td_math(str
return ret;
}