aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--driver-core.current/firmware_class-fix-typo-in-error-path.patch39
-rw-r--r--driver-core.current/kobject_uevent-fix-typo-in-comments.patch37
-rw-r--r--f1.patch14
-rw-r--r--series31
-rw-r--r--tty.current/68328serial-check-return-value-of-copy_-_user-instead-of-access_ok.patch87
-rw-r--r--tty.current/ip2-remove-unneeded-null-check.patch33
-rw-r--r--tty.current/ip2-return-efault-on-copy_to_user-errors.patch33
-rw-r--r--tty.current/rocket-add-a-mutex_unlock.patch30
-rw-r--r--tty.current/synclink-add-mutex_unlock-on-error-path.patch36
-rw-r--r--usb.current/usb-adutux-fix-misuse-of-return-value-of-copy_to_user.patch33
-rw-r--r--usb.current/usb-cp210x-fix-break-on-off.patch33
-rw-r--r--usb.current/usb-ftdi_sio-add-id-for-ionics-plugcomputer.patch46
-rw-r--r--usb.current/usb-ftdi_sio-fix-endianess-of-max-packet-size.patch34
-rw-r--r--usb.current/usb-gadget-fix-composite-kernel-doc-warnings.patch50
-rw-r--r--usb.current/usb-gadget-return-enomem-on-memory-allocation.patch51
-rw-r--r--usb.current/usb-io_ti-check-firmware-version-before-updating.patch36
-rw-r--r--usb.current/usb-iowarrior-fix-misuse-of-return-value-of-copy_to_user.patch41
-rw-r--r--usb.current/usb-otg-twl4030-fix-wrong-assumption-of-starting-state.patch52
-rw-r--r--usb.current/usb-r8a66597-udc-return-enomem-if-kzalloc-fails.patch26
-rw-r--r--usb.current/usb-serial-export-symbol-usb_serial_generic_disconnect.patch27
-rw-r--r--usb.current/usb-serial-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch32
-rw-r--r--usb.current/usb-ssu100-add-disconnect-function-for-ssu100.patch37
-rw-r--r--usb.current/usb-ssu100-add-locking-for-port-private-data-in-ssu100.patch76
-rw-r--r--usb.current/usb-ssu100-add-register-parameter-to-ssu100_setregister.patch51
-rw-r--r--usb.current/usb-ssu100-refine-process_packet-in-ssu100.patch36
-rw-r--r--usb.current/usb-ssu100-remove-duplicate-defines-in-ssu100.patch194
-rw-r--r--usb.current/usb-ssu100-rework-logic-for-tiocmiwait.patch215
-rw-r--r--usb.current/usb-ssu100-set-tty_flags-in-ssu100_process_packet.patch91
-rw-r--r--usb.current/usb-xhci-remove-buggy-assignment-in-next_trb.patch42
-rw-r--r--usb.current/usb-xhci-update-ring-dequeue-pointer-when-process-missed-tds.patch47
30 files changed, 1574 insertions, 16 deletions
diff --git a/driver-core.current/firmware_class-fix-typo-in-error-path.patch b/driver-core.current/firmware_class-fix-typo-in-error-path.patch
new file mode 100644
index 00000000000000..1a17c3494390eb
--- /dev/null
+++ b/driver-core.current/firmware_class-fix-typo-in-error-path.patch
@@ -0,0 +1,39 @@
+From johannes@sipsolutions.net Thu Aug 19 10:21:34 2010
+Subject: firmware_class: fix typo in error path
+From: Johannes Berg <johannes@sipsolutions.net>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
+ "Guy, Wey-Yi W" <wey-yi.w.guy@intel.com>
+Date: Wed, 18 Aug 2010 17:15:18 +0200
+Message-ID: <1282144518.5249.2.camel@jlt3.sipsolutions.net>
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+In the error path, _request_firmware sets
+firmware_p to NULL rather than *firmware_p,
+which leads to passing a freed firmware
+struct to drivers when the firmware file
+cannot be found. Fix this.
+
+Broken by commit f8a4bd3456b988fc73b2c.
+
+Reported-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/firmware_class.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/base/firmware_class.c
++++ b/drivers/base/firmware_class.c
+@@ -568,7 +568,7 @@ static int _request_firmware(const struc
+ out:
+ if (retval) {
+ release_firmware(firmware);
+- firmware_p = NULL;
++ *firmware_p = NULL;
+ }
+
+ return retval;
diff --git a/driver-core.current/kobject_uevent-fix-typo-in-comments.patch b/driver-core.current/kobject_uevent-fix-typo-in-comments.patch
new file mode 100644
index 00000000000000..0525bbf85ee506
--- /dev/null
+++ b/driver-core.current/kobject_uevent-fix-typo-in-comments.patch
@@ -0,0 +1,37 @@
+From xtfeng@gmail.com Thu Aug 19 10:32:36 2010
+From: Xiaotian Feng <xtfeng@gmail.com>
+To: gregkh@suse.de, akpm@linux-foundation.org
+Cc: linux-kernel@vger.kernel.org, Xiaotian Feng <xtfeng@gmail.com>
+Subject: kobject_uevent: fix typo in comments
+Date: Fri, 13 Aug 2010 18:58:10 +0800
+Message-Id: <1281697090-6694-1-git-send-email-xtfeng@gmail.com>
+
+s/ending/sending, s/kobject_uevent()/kobject_uevent_env() in the comments.
+
+Signed-off-by: Xiaotian Feng <xtfeng@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ lib/kobject_uevent.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/lib/kobject_uevent.c
++++ b/lib/kobject_uevent.c
+@@ -123,7 +123,7 @@ static int kobj_usermode_filter(struct k
+ * @kobj: struct kobject that the action is happening to
+ * @envp_ext: pointer to environmental data
+ *
+- * Returns 0 if kobject_uevent() is completed with success or the
++ * Returns 0 if kobject_uevent_env() is completed with success or the
+ * corresponding error when it fails.
+ */
+ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
+@@ -317,7 +317,7 @@ exit:
+ EXPORT_SYMBOL_GPL(kobject_uevent_env);
+
+ /**
+- * kobject_uevent - notify userspace by ending an uevent
++ * kobject_uevent - notify userspace by sending an uevent
+ *
+ * @action: action that is happening
+ * @kobj: struct kobject that the action is happening to
diff --git a/f1.patch b/f1.patch
deleted file mode 100644
index 9696651f2c9d11..00000000000000
--- a/f1.patch
+++ /dev/null
@@ -1,14 +0,0 @@
----
- drivers/media/video/v4l2-ctrls.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/media/video/v4l2-ctrls.c
-+++ b/drivers/media/video/v4l2-ctrls.c
-@@ -19,6 +19,7 @@
- */
-
- #include <linux/ctype.h>
-+#include <linux/slab.h>
- #include <media/v4l2-ioctl.h>
- #include <media/v4l2-device.h>
- #include <media/v4l2-ctrls.h>
diff --git a/series b/series
index 812488754e33c0..dbdbc09b83ab8e 100644
--- a/series
+++ b/series
@@ -9,11 +9,18 @@ gregkh/gkh-version.patch
# Driver core patches for 2.6.36
#################################
driver-core.current/kobject-break-the-kobject-namespace-defs-into-their-own-header.patch
+driver-core.current/firmware_class-fix-typo-in-error-path.patch
+driver-core.current/kobject_uevent-fix-typo-in-comments.patch
#################################
# TTY patches for 2.6.36
#################################
tty.current/serial-print-early-console-device-address-in-hex.patch
+tty.current/ip2-remove-unneeded-null-check.patch
+tty.current/ip2-return-efault-on-copy_to_user-errors.patch
+tty.current/rocket-add-a-mutex_unlock.patch
+tty.current/synclink-add-mutex_unlock-on-error-path.patch
+tty.current/68328serial-check-return-value-of-copy_-_user-instead-of-access_ok.patch
#################################
# USB patches for 2.6.36
@@ -24,6 +31,28 @@ usb.current/usb-isp1760-use-a-write-barrier-to-ensure-proper-ndelay-timing.patch
usb.current/usb-add-device-ids-for-igotu-to-navman.patch
usb.current/usb-serial-fix-leak-of-usb-serial-module-refrence-count.patch
usb.current/usb-pl2303-new-vendor-and-product-id.patch
+usb.current/usb-cp210x-fix-break-on-off.patch
+usb.current/usb-ftdi_sio-fix-endianess-of-max-packet-size.patch
+usb.current/usb-io_ti-check-firmware-version-before-updating.patch
+usb.current/usb-r8a66597-udc-return-enomem-if-kzalloc-fails.patch
+usb.current/usb-ssu100-add-locking-for-port-private-data-in-ssu100.patch
+usb.current/usb-ssu100-refine-process_packet-in-ssu100.patch
+usb.current/usb-ssu100-remove-duplicate-defines-in-ssu100.patch
+usb.current/usb-ssu100-add-register-parameter-to-ssu100_setregister.patch
+usb.current/usb-ssu100-rework-logic-for-tiocmiwait.patch
+usb.current/usb-serial-export-symbol-usb_serial_generic_disconnect.patch
+usb.current/usb-ssu100-add-disconnect-function-for-ssu100.patch
+usb.current/usb-ssu100-set-tty_flags-in-ssu100_process_packet.patch
+usb.current/usb-gadget-fix-composite-kernel-doc-warnings.patch
+usb.current/usb-gadget-return-enomem-on-memory-allocation.patch
+usb.current/usb-otg-twl4030-fix-wrong-assumption-of-starting-state.patch
+usb.current/usb-serial-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch
+usb.current/usb-ftdi_sio-add-id-for-ionics-plugcomputer.patch
+usb.current/usb-xhci-remove-buggy-assignment-in-next_trb.patch
+usb.current/usb-xhci-update-ring-dequeue-pointer-when-process-missed-tds.patch
+usb.current/usb-iowarrior-fix-misuse-of-return-value-of-copy_to_user.patch
+usb.current/usb-adutux-fix-misuse-of-return-value-of-copy_to_user.patch
+
#################################
# Staging patches for 2.6.36
@@ -59,6 +88,4 @@ staging.current/staging-spectra-removes-unused-functions.patch
# staging stuff for next is now in the staging-next tree on git.kernel.org
-f1.patch
-
diff --git a/tty.current/68328serial-check-return-value-of-copy_-_user-instead-of-access_ok.patch b/tty.current/68328serial-check-return-value-of-copy_-_user-instead-of-access_ok.patch
new file mode 100644
index 00000000000000..66fa8888f7f299
--- /dev/null
+++ b/tty.current/68328serial-check-return-value-of-copy_-_user-instead-of-access_ok.patch
@@ -0,0 +1,87 @@
+From segooon@gmail.com Thu Aug 19 10:41:51 2010
+From: Kulikov Vasiliy <segooon@gmail.com>
+To: kernel-janitors@vger.kernel.org
+Cc: Greg Kroah-Hartman <gregkh@suse.de>,
+ Andrew Morton <akpm@linux-foundation.org>,
+ Greg Ungerer <gerg@uclinux.org>,
+ Christoph Egger <siccegge@cs.fau.de>, Tejun Heo <tj@kernel.org>,
+ linux-kernel@vger.kernel.org
+Subject: 68328serial: check return value of copy_*_user() instead of access_ok()
+Date: Sun, 1 Aug 2010 10:29:06 +0400
+Message-Id: <1280644146-4418-1-git-send-email-segooon@gmail.com>
+
+As copy_*_user() calls access_ok() it should not be called explicitly.
+
+Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/68328serial.c | 29 +++++++++++------------------
+ 1 file changed, 11 insertions(+), 18 deletions(-)
+
+--- a/drivers/serial/68328serial.c
++++ b/drivers/serial/68328serial.c
+@@ -869,7 +869,9 @@ static int get_serial_info(struct m68k_s
+ tmp.close_delay = info->close_delay;
+ tmp.closing_wait = info->closing_wait;
+ tmp.custom_divisor = info->custom_divisor;
+- copy_to_user(retinfo,&tmp,sizeof(*retinfo));
++ if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
++ return -EFAULT;
++
+ return 0;
+ }
+
+@@ -882,7 +884,8 @@ static int set_serial_info(struct m68k_s
+
+ if (!new_info)
+ return -EFAULT;
+- copy_from_user(&new_serial,new_info,sizeof(new_serial));
++ if (copy_from_user(&new_serial, new_info, sizeof(new_serial)))
++ return -EFAULT;
+ old_info = *info;
+
+ if (!capable(CAP_SYS_ADMIN)) {
+@@ -943,8 +946,7 @@ static int get_lsr_info(struct m68k_seri
+ status = 0;
+ #endif
+ local_irq_restore(flags);
+- put_user(status,value);
+- return 0;
++ return put_user(status, value);
+ }
+
+ /*
+@@ -999,27 +1001,18 @@ static int rs_ioctl(struct tty_struct *t
+ send_break(info, arg ? arg*(100) : 250);
+ return 0;
+ case TIOCGSERIAL:
+- if (access_ok(VERIFY_WRITE, (void *) arg,
+- sizeof(struct serial_struct)))
+- return get_serial_info(info,
+- (struct serial_struct *) arg);
+- return -EFAULT;
++ return get_serial_info(info,
++ (struct serial_struct *) arg);
+ case TIOCSSERIAL:
+ return set_serial_info(info,
+ (struct serial_struct *) arg);
+ case TIOCSERGETLSR: /* Get line status register */
+- if (access_ok(VERIFY_WRITE, (void *) arg,
+- sizeof(unsigned int)))
+- return get_lsr_info(info, (unsigned int *) arg);
+- return -EFAULT;
++ return get_lsr_info(info, (unsigned int *) arg);
+ case TIOCSERGSTRUCT:
+- if (!access_ok(VERIFY_WRITE, (void *) arg,
+- sizeof(struct m68k_serial)))
++ if (copy_to_user((struct m68k_serial *) arg,
++ info, sizeof(struct m68k_serial)))
+ return -EFAULT;
+- copy_to_user((struct m68k_serial *) arg,
+- info, sizeof(struct m68k_serial));
+ return 0;
+-
+ default:
+ return -ENOIOCTLCMD;
+ }
diff --git a/tty.current/ip2-remove-unneeded-null-check.patch b/tty.current/ip2-remove-unneeded-null-check.patch
new file mode 100644
index 00000000000000..b56fd60a7a1fa4
--- /dev/null
+++ b/tty.current/ip2-remove-unneeded-null-check.patch
@@ -0,0 +1,33 @@
+From akpm@linux-foundation.org Thu Aug 19 10:33:35 2010
+Message-Id: <201008122048.o7CKmvB4011929@imap1.linux-foundation.org>
+Subject: ip2: remove unneeded NULL check
+To: mm-commits@vger.kernel.org
+Cc: error27@gmail.com, greg@kroah.com, mhw@wittsend.com
+From: Dan Carpenter <error27@gmail.com>
+Date: Thu, 12 Aug 2010 13:48:57 -0700
+
+From: Dan Carpenter <error27@gmail.com>
+
+We don't pass NULL tty pointers to the close function, and anyway we
+already dereferenced it at this point. This check can be removed.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Cc: "Michael H. Warfield" <mhw@wittsend.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/ip2/ip2main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/char/ip2/ip2main.c
++++ b/drivers/char/ip2/ip2main.c
+@@ -1650,7 +1650,7 @@ ip2_close( PTTY tty, struct file *pFile
+ /* disable DSS reporting */
+ i2QueueCommands(PTYPE_INLINE, pCh, 100, 4,
+ CMD_DCD_NREP, CMD_CTS_NREP, CMD_DSR_NREP, CMD_RI_NREP);
+- if ( !tty || (tty->termios->c_cflag & HUPCL) ) {
++ if (tty->termios->c_cflag & HUPCL) {
+ i2QueueCommands(PTYPE_INLINE, pCh, 100, 2, CMD_RTSDN, CMD_DTRDN);
+ pCh->dataSetOut &= ~(I2_DTR | I2_RTS);
+ i2QueueCommands( PTYPE_INLINE, pCh, 100, 1, CMD_PAUSE(25));
diff --git a/tty.current/ip2-return-efault-on-copy_to_user-errors.patch b/tty.current/ip2-return-efault-on-copy_to_user-errors.patch
new file mode 100644
index 00000000000000..5a665e2eb67eed
--- /dev/null
+++ b/tty.current/ip2-return-efault-on-copy_to_user-errors.patch
@@ -0,0 +1,33 @@
+From akpm@linux-foundation.org Thu Aug 19 10:34:11 2010
+Message-Id: <201008122048.o7CKmxm5011932@imap1.linux-foundation.org>
+Subject: ip2: return -EFAULT on copy_to_user errors
+To: mm-commits@vger.kernel.org
+Cc: error27@gmail.com, greg@kroah.com, mhw@wittsend.com
+From: Dan Carpenter <error27@gmail.com>
+Date: Thu, 12 Aug 2010 13:48:59 -0700
+
+From: Dan Carpenter <error27@gmail.com>
+
+copy_to_user() returns the number of bytes remaining but we want to return
+a negative error code on errors.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Cc: "Michael H. Warfield" <mhw@wittsend.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/ip2/ip2main.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/char/ip2/ip2main.c
++++ b/drivers/char/ip2/ip2main.c
+@@ -2930,6 +2930,8 @@ ip2_ipl_ioctl (struct file *pFile, UINT
+ if ( pCh )
+ {
+ rc = copy_to_user(argp, pCh, sizeof(i2ChanStr));
++ if (rc)
++ rc = -EFAULT;
+ } else {
+ rc = -ENODEV;
+ }
diff --git a/tty.current/rocket-add-a-mutex_unlock.patch b/tty.current/rocket-add-a-mutex_unlock.patch
new file mode 100644
index 00000000000000..3194ba254c045b
--- /dev/null
+++ b/tty.current/rocket-add-a-mutex_unlock.patch
@@ -0,0 +1,30 @@
+From error27@gmail.com Thu Aug 19 10:34:47 2010
+Date: Wed, 11 Aug 2010 20:00:09 +0200
+From: Dan Carpenter <error27@gmail.com>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Alan Cox <alan@linux.intel.com>, kernel-janitors@vger.kernel.org
+Subject: rocket: add a mutex_unlock()
+Message-ID: <20100811180009.GA645@bicker>
+Content-Disposition: inline
+
+This path needs a mutex_unlock(). This is stuff from the bkl to mutex
+transition.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Acked-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/rocket.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/char/rocket.c
++++ b/drivers/char/rocket.c
+@@ -1244,6 +1244,7 @@ static int set_config(struct tty_struct
+ }
+ info->flags = ((info->flags & ~ROCKET_USR_MASK) | (new_serial.flags & ROCKET_USR_MASK));
+ configure_r_port(tty, info, NULL);
++ mutex_unlock(&info->port.mutex);
+ return 0;
+ }
+
diff --git a/tty.current/synclink-add-mutex_unlock-on-error-path.patch b/tty.current/synclink-add-mutex_unlock-on-error-path.patch
new file mode 100644
index 00000000000000..6236e23a34a495
--- /dev/null
+++ b/tty.current/synclink-add-mutex_unlock-on-error-path.patch
@@ -0,0 +1,36 @@
+From error27@gmail.com Thu Aug 19 10:34:59 2010
+Date: Wed, 11 Aug 2010 20:01:46 +0200
+From: Dan Carpenter <error27@gmail.com>
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Paul Fulghum <paulkf@microgate.com>,
+ Alan Cox <alan@linux.intel.com>,
+ Stephen Hemminger <shemminger@vyatta.com>,
+ kernel-janitors@vger.kernel.org
+Subject: synclink: add mutex_unlock() on error path
+Message-ID: <20100811180146.GB645@bicker>
+Content-Disposition: inline
+
+There is a path which still holds its mutex here.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Acked-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/synclink_gt.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/char/synclink_gt.c
++++ b/drivers/char/synclink_gt.c
+@@ -691,8 +691,10 @@ static int open(struct tty_struct *tty,
+ if (info->port.count == 1) {
+ /* 1st open on this device, init hardware */
+ retval = startup(info);
+- if (retval < 0)
++ if (retval < 0) {
++ mutex_unlock(&info->port.mutex);
+ goto cleanup;
++ }
+ }
+ mutex_unlock(&info->port.mutex);
+ retval = block_til_ready(tty, filp, info);
diff --git a/usb.current/usb-adutux-fix-misuse-of-return-value-of-copy_to_user.patch b/usb.current/usb-adutux-fix-misuse-of-return-value-of-copy_to_user.patch
new file mode 100644
index 00000000000000..2fdb280e396a53
--- /dev/null
+++ b/usb.current/usb-adutux-fix-misuse-of-return-value-of-copy_to_user.patch
@@ -0,0 +1,33 @@
+From segooon@gmail.com Thu Aug 19 10:41:24 2010
+From: Kulikov Vasiliy <segooon@gmail.com>
+To: kernel-janitors@vger.kernel.org
+Cc: Greg Kroah-Hartman <gregkh@suse.de>,
+ Oliver Neukum <oliver@neukum.org>,
+ Mauro Carvalho Chehab <mchehab@redhat.com>,
+ Joe Perches <joe@perches.com>,
+ =?UTF-8?q?N=C3=A9meth=20M=C3=A1rton?= <nm127@freemail.hu>,
+ linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
+Subject: USB: adutux: fix misuse of return value of copy_to_user()
+Date: Sat, 31 Jul 2010 21:40:07 +0400
+Message-Id: <1280598008-8605-1-git-send-email-segooon@gmail.com>
+
+copy_to_user() returns number of not copied bytes, not error code.
+
+Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/misc/adutux.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/misc/adutux.c
++++ b/drivers/usb/misc/adutux.c
+@@ -439,7 +439,7 @@ static ssize_t adu_read(struct file *fil
+ /* drain secondary buffer */
+ int amount = bytes_to_read < data_in_secondary ? bytes_to_read : data_in_secondary;
+ i = copy_to_user(buffer, dev->read_buffer_secondary+dev->secondary_head, amount);
+- if (i < 0) {
++ if (i) {
+ retval = -EFAULT;
+ goto exit;
+ }
diff --git a/usb.current/usb-cp210x-fix-break-on-off.patch b/usb.current/usb-cp210x-fix-break-on-off.patch
new file mode 100644
index 00000000000000..2b0e5581ca28eb
--- /dev/null
+++ b/usb.current/usb-cp210x-fix-break-on-off.patch
@@ -0,0 +1,33 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:20:48 2010
+To: greg@kroah.com
+Cc: linux-usb@vger.kernel.org
+Message-Id: <1282167311631939627@teratron>
+From: Craig Shelley <craig@microtron.org.uk>
+Date: Wed, 18 Aug 2010 22:13:39 +0100
+Subject: USB: CP210x Fix Break On/Off
+
+The definitions for BREAK_ON and BREAK_OFF are inverted, causing break
+requests to fail. This patch sets BREAK_ON and BREAK_OFF to the correct
+values.
+
+Signed-off-by: Craig Shelley <craig@microtron.org.uk>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/cp210x.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/serial/cp210x.c
++++ b/drivers/usb/serial/cp210x.c
+@@ -222,8 +222,8 @@ static struct usb_serial_driver cp210x_d
+ #define BITS_STOP_2 0x0002
+
+ /* CP210X_SET_BREAK */
+-#define BREAK_ON 0x0000
+-#define BREAK_OFF 0x0001
++#define BREAK_ON 0x0001
++#define BREAK_OFF 0x0000
+
+ /* CP210X_(SET_MHS|GET_MDMSTS) */
+ #define CONTROL_DTR 0x0001
diff --git a/usb.current/usb-ftdi_sio-add-id-for-ionics-plugcomputer.patch b/usb.current/usb-ftdi_sio-add-id-for-ionics-plugcomputer.patch
new file mode 100644
index 00000000000000..1899e99ea082ad
--- /dev/null
+++ b/usb.current/usb-ftdi_sio-add-id-for-ionics-plugcomputer.patch
@@ -0,0 +1,46 @@
+From tbm@cyrius.com Thu Aug 19 10:37:49 2010
+Date: Tue, 10 Aug 2010 20:31:21 +0100
+From: Martin Michlmayr <tbm@cyrius.com>
+To: Greg Kroah-Hartman <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org
+Subject: USB: ftdi_sio: Add ID for Ionics PlugComputer
+Message-ID: <20100810193120.GA2950@jirafa.cyrius.com>
+Content-Disposition: inline
+
+Add the ID for the Ionics PlugComputer (<http://ionicsplug.com/>).
+
+Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 2 ++
+ drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
+ 2 files changed, 8 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -750,6 +750,8 @@ 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(IONICS_VID, IONICS_PLUGCOMPUTER_PID),
++ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+ { }, /* Optional parameter entry */
+ { } /* Terminating entry */
+ };
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -989,6 +989,12 @@
+ #define ALTI2_N3_PID 0x6001 /* Neptune 3 */
+
+ /*
++ * Ionics PlugComputer
++ */
++#define IONICS_VID 0x1c0c
++#define IONICS_PLUGCOMPUTER_PID 0x0102
++
++/*
+ * Dresden Elektronik Sensor Terminal Board
+ */
+ #define DE_VID 0x1cf1 /* Vendor ID */
diff --git a/usb.current/usb-ftdi_sio-fix-endianess-of-max-packet-size.patch b/usb.current/usb-ftdi_sio-fix-endianess-of-max-packet-size.patch
new file mode 100644
index 00000000000000..e79eeff6fe0533
--- /dev/null
+++ b/usb.current/usb-ftdi_sio-fix-endianess-of-max-packet-size.patch
@@ -0,0 +1,34 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:22:04 2010
+Message-ID: <281434.37339.qm@web65616.mail.ac4.yahoo.com>
+Date: Wed, 18 Aug 2010 07:14:37 -0700 (PDT)
+From: Michael Wileczka <mikewileczka@yahoo.com>
+Subject: USB: ftdi_sio: fix endianess of max packet size
+To: linux-usb@vger.kernel.org
+Cc: linux-kernel@vger.kernel.org
+
+From: Michael Wileczka <mikewileczka@yahoo.com>
+
+The USB max packet size (always little-endian) was not being byte
+swapped on big-endian systems.
+
+Applicable since [USB: ftdi_sio: fix hi-speed device packet size calculation] approx 2.6.31
+
+Signed-off-by: Michael Wileczka <mikewileczka@yahoo.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -1376,7 +1376,7 @@ static void ftdi_set_max_packet_size(str
+ }
+
+ /* set max packet size based on descriptor */
+- priv->max_packet_size = ep_desc->wMaxPacketSize;
++ priv->max_packet_size = le16_to_cpu(ep_desc->wMaxPacketSize);
+
+ dev_info(&udev->dev, "Setting MaxPacketSize %d\n", priv->max_packet_size);
+ }
diff --git a/usb.current/usb-gadget-fix-composite-kernel-doc-warnings.patch b/usb.current/usb-gadget-fix-composite-kernel-doc-warnings.patch
new file mode 100644
index 00000000000000..4dfc3b2e7db7fc
--- /dev/null
+++ b/usb.current/usb-gadget-fix-composite-kernel-doc-warnings.patch
@@ -0,0 +1,50 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:35:17 2010
+Date: Wed, 11 Aug 2010 12:07:13 -0700
+From: Randy Dunlap <randy.dunlap@oracle.com>
+To: lud <linux-usb@vger.kernel.org>
+Cc: gregkh@suse.de, David Brownell <dbrownell@users.sourceforge.net>
+Subject: USB: gadget: fix composite kernel-doc warnings
+Message-Id: <20100811120713.1e47b6a6.randy.dunlap@oracle.com>
+
+From: Randy Dunlap <randy.dunlap@oracle.com>
+
+Warning(include/linux/usb/composite.h:284): No description found for parameter 'disconnect'
+Warning(drivers/usb/gadget/composite.c:744): No description found for parameter 'c'
+Warning(drivers/usb/gadget/composite.c:744): Excess function parameter 'cdev' description in 'usb_string_ids_n'
+
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/composite.c | 4 ++--
+ include/linux/usb/composite.h | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/gadget/composite.c
++++ b/drivers/usb/gadget/composite.c
+@@ -723,12 +723,12 @@ int usb_string_ids_tab(struct usb_compos
+
+ /**
+ * usb_string_ids_n() - allocate unused string IDs in batch
+- * @cdev: the device whose string descriptor IDs are being allocated
++ * @c: the device whose string descriptor IDs are being allocated
+ * @n: number of string IDs to allocate
+ * Context: single threaded during gadget setup
+ *
+ * Returns the first requested ID. This ID and next @n-1 IDs are now
+- * valid IDs. At least providind that @n is non zore because if it
++ * valid IDs. At least provided that @n is non-zero because if it
+ * is, returns last requested ID which is now very useful information.
+ *
+ * @usb_string_ids_n() is called from bind() callbacks to allocate
+--- a/include/linux/usb/composite.h
++++ b/include/linux/usb/composite.h
+@@ -247,6 +247,7 @@ int usb_add_config(struct usb_composite_
+ * value; it should return zero on successful initialization.
+ * @unbind: Reverses @bind(); called as a side effect of unregistering
+ * this driver.
++ * @disconnect: optional driver disconnect method
+ * @suspend: Notifies when the host stops sending USB traffic,
+ * after function notifications
+ * @resume: Notifies configuration when the host restarts USB traffic,
diff --git a/usb.current/usb-gadget-return-enomem-on-memory-allocation.patch b/usb.current/usb-gadget-return-enomem-on-memory-allocation.patch
new file mode 100644
index 00000000000000..0218b8451daf3d
--- /dev/null
+++ b/usb.current/usb-gadget-return-enomem-on-memory-allocation.patch
@@ -0,0 +1,51 @@
+From julia@diku.dk Thu Aug 19 10:35:40 2010
+Date: Wed, 11 Aug 2010 12:10:48 +0200 (CEST)
+From: Julia Lawall <julia@diku.dk>
+To: David Brownell <dbrownell@users.sourceforge.net>,
+ Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org,
+ linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
+Subject: USB: gadget: Return -ENOMEM on memory allocation
+ failure
+Message-ID: <Pine.LNX.4.64.1008111210291.8669@ask.diku.dk>
+
+From: Julia Lawall <julia@diku.dk>
+
+In this code, 0 is returned on memory allocation failure, even though other
+failures return -ENOMEM or other similar values.
+
+A simplified version of the semantic match that finds this problem is as
+follows: (http://coccinelle.lip6.fr/)
+
+// <smpl>
+@@
+expression ret;
+expression x,e1,e2,e3;
+@@
+
+ret = 0
+... when != ret = e1
+*x = \(kmalloc\|kcalloc\|kzalloc\)(...)
+... when != ret = e2
+if (x == NULL) { ... when != ret = e3
+ return ret;
+}
+// </smpl>
+
+Signed-off-by: Julia Lawall <julia@diku.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/gadget/m66592-udc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/gadget/m66592-udc.c
++++ b/drivers/usb/gadget/m66592-udc.c
+@@ -1609,6 +1609,7 @@ static int __init m66592_probe(struct pl
+ /* initialize ucd */
+ m66592 = kzalloc(sizeof(struct m66592), GFP_KERNEL);
+ if (m66592 == NULL) {
++ ret = -ENOMEM;
+ pr_err("kzalloc error\n");
+ goto clean_up;
+ }
diff --git a/usb.current/usb-io_ti-check-firmware-version-before-updating.patch b/usb.current/usb-io_ti-check-firmware-version-before-updating.patch
new file mode 100644
index 00000000000000..0191edc545628a
--- /dev/null
+++ b/usb.current/usb-io_ti-check-firmware-version-before-updating.patch
@@ -0,0 +1,36 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:22:58 2010
+Date: Tue, 17 Aug 2010 15:15:37 -0700
+From: Greg Kroah-Hartman <gregkh@suse.de>
+To: Alan Stern <stern@rowland.harvard.edu>
+Cc: Chris Beauchamp <chris@chillibean.tv>
+Subject: USB: io_ti: check firmware version before updating
+Message-ID: <20100817221537.GA20178@kroah.com>
+
+If we can't read the firmware for a device from the disk, and yet the
+device already has a valid firmware image in it, we don't want to
+replace the firmware with something invalid. So check the version
+number to be less than the current one to verify this is the correct
+thing to do.
+
+
+Reported-by: Chris Beauchamp <chris@chillibean.tv>
+Tested-by: Chris Beauchamp <chris@chillibean.tv>
+Cc: Alan Stern <stern@rowland.harvard.edu>
+Cc: stable <stable@kernel.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
+@@ -1151,7 +1151,7 @@ static int download_fw(struct edgeport_s
+
+ /* Check if we have an old version in the I2C and
+ update if necessary */
+- if (download_cur_ver != download_new_ver) {
++ if (download_cur_ver < download_new_ver) {
+ dbg("%s - Update I2C dld from %d.%d to %d.%d",
+ __func__,
+ firmware_version->Ver_Major,
diff --git a/usb.current/usb-iowarrior-fix-misuse-of-return-value-of-copy_to_user.patch b/usb.current/usb-iowarrior-fix-misuse-of-return-value-of-copy_to_user.patch
new file mode 100644
index 00000000000000..6d39e4aee50dc1
--- /dev/null
+++ b/usb.current/usb-iowarrior-fix-misuse-of-return-value-of-copy_to_user.patch
@@ -0,0 +1,41 @@
+From segooon@gmail.com Thu Aug 19 10:41:10 2010
+From: Kulikov Vasiliy <segooon@gmail.com>
+To: kernel-janitors@vger.kernel.org
+Cc: Greg Kroah-Hartman <gregkh@suse.de>,
+ Oliver Neukum <oliver@neukum.org>,
+ Mauro Carvalho Chehab <mchehab@redhat.com>,
+ Daniel Mack <daniel@caiaq.de>, Kay Sievers <kay.sievers@vrfy.org>,
+ linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
+Subject: USB: iowarrior: fix misuse of return value of copy_to_user()
+Date: Sat, 31 Jul 2010 21:39:46 +0400
+Message-Id: <1280597987-8565-1-git-send-email-segooon@gmail.com>
+
+copy_to_user() returns number of not copied bytes, not error code.
+
+Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/misc/iowarrior.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/misc/iowarrior.c
++++ b/drivers/usb/misc/iowarrior.c
+@@ -542,7 +542,7 @@ static long iowarrior_ioctl(struct file
+ retval = io_res;
+ else {
+ io_res = copy_to_user(user_buffer, buffer, dev->report_size);
+- if (io_res < 0)
++ if (io_res)
+ retval = -EFAULT;
+ }
+ break;
+@@ -574,7 +574,7 @@ static long iowarrior_ioctl(struct file
+ }
+ io_res = copy_to_user((struct iowarrior_info __user *)arg, &info,
+ sizeof(struct iowarrior_info));
+- if (io_res < 0)
++ if (io_res)
+ retval = -EFAULT;
+ break;
+ }
diff --git a/usb.current/usb-otg-twl4030-fix-wrong-assumption-of-starting-state.patch b/usb.current/usb-otg-twl4030-fix-wrong-assumption-of-starting-state.patch
new file mode 100644
index 00000000000000..34471a1b82dbd8
--- /dev/null
+++ b/usb.current/usb-otg-twl4030-fix-wrong-assumption-of-starting-state.patch
@@ -0,0 +1,52 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:36:21 2010
+From: Felipe Balbi <felipe.balbi@nokia.com>
+To: Greg KH <greg@kroah.com>
+Cc: Tony Lindgren <tony@atomide.com>,
+ David Brownell <david-b@pacbell.net>,
+ Felipe Balbi <felipe.balbi@nokia.com>
+Subject: USB: otg: twl4030: fix wrong assumption of starting state
+Date: Wed, 11 Aug 2010 13:02:32 +0300
+Message-Id: <1281520952-27981-1-git-send-email-felipe.balbi@nokia.com>
+
+From: Felipe Balbi <felipe.balbi@nokia.com>
+
+The reset state of twl4030-usb is not sleeping, it starts
+up awaken and we need to disable it if we have booted
+with a disconnected cable to avoid over consumption on
+the default state.
+
+To avoid problems later, we read the current state of the
+transceiver from the PHY_PWR_CTRL register. The bootloader
+can, anyways, put the device to sleep before us.
+
+Tested on a custom OMAP board.
+
+Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/otg/twl4030-usb.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/otg/twl4030-usb.c
++++ b/drivers/usb/otg/twl4030-usb.c
+@@ -550,6 +550,7 @@ static int __devinit twl4030_usb_probe(s
+ struct twl4030_usb_data *pdata = pdev->dev.platform_data;
+ struct twl4030_usb *twl;
+ int status, err;
++ u8 pwr;
+
+ if (!pdata) {
+ dev_dbg(&pdev->dev, "platform_data not available\n");
+@@ -568,7 +569,10 @@ static int __devinit twl4030_usb_probe(s
+ twl->otg.set_peripheral = twl4030_set_peripheral;
+ twl->otg.set_suspend = twl4030_set_suspend;
+ twl->usb_mode = pdata->usb_mode;
+- twl->asleep = 1;
++
++ pwr = twl4030_usb_read(twl, PHY_PWR_CTRL);
++
++ twl->asleep = (pwr & PHY_PWR_PHYPWD);
+
+ /* init spinlock for workqueue */
+ spin_lock_init(&twl->lock);
diff --git a/usb.current/usb-r8a66597-udc-return-enomem-if-kzalloc-fails.patch b/usb.current/usb-r8a66597-udc-return-enomem-if-kzalloc-fails.patch
new file mode 100644
index 00000000000000..f1963042b8692b
--- /dev/null
+++ b/usb.current/usb-r8a66597-udc-return-enomem-if-kzalloc-fails.patch
@@ -0,0 +1,26 @@
+From axel.lin@gmail.com Thu Aug 19 10:26:44 2010
+Subject: USB: r8a66597-udc: return -ENOMEM if kzalloc() fails
+From: Axel Lin <axel.lin@gmail.com>
+Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
+ Greg Kroah-Hartman <gregkh@suse.de>,
+ Paul Mundt <lethal@linux-sh.org>, linux-usb@vger.kernel.org
+Date: Tue, 17 Aug 2010 09:41:29 +0800
+Message-Id: <1282009289.18724.0.camel@mola>
+
+Signed-off-by: Axel Lin <axel.lin@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/r8a66597-udc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/gadget/r8a66597-udc.c
++++ b/drivers/usb/gadget/r8a66597-udc.c
+@@ -1557,6 +1557,7 @@ static int __init r8a66597_probe(struct
+ /* initialize ucd */
+ r8a66597 = kzalloc(sizeof(struct r8a66597), GFP_KERNEL);
+ if (r8a66597 == NULL) {
++ ret = -ENOMEM;
+ printk(KERN_ERR "kzalloc error\n");
+ goto clean_up;
+ }
diff --git a/usb.current/usb-serial-export-symbol-usb_serial_generic_disconnect.patch b/usb.current/usb-serial-export-symbol-usb_serial_generic_disconnect.patch
new file mode 100644
index 00000000000000..f5275a79669342
--- /dev/null
+++ b/usb.current/usb-serial-export-symbol-usb_serial_generic_disconnect.patch
@@ -0,0 +1,27 @@
+From wfp5p@viridian.itc.virginia.edu Thu Aug 19 10:31:10 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com
+Subject: USB: serial: export symbol usb_serial_generic_disconnect
+Date: Thu, 5 Aug 2010 17:01:10 -0400
+Message-Id: <1281042071-11829-7-git-send-email-wfp5p@virginia.edu>
+
+This is needed by the ssu100 driver to use this function.
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/generic.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/generic.c
++++ b/drivers/usb/serial/generic.c
+@@ -518,6 +518,7 @@ void usb_serial_generic_disconnect(struc
+ for (i = 0; i < serial->num_ports; ++i)
+ generic_cleanup(serial->port[i]);
+ }
++EXPORT_SYMBOL_GPL(usb_serial_generic_disconnect);
+
+ void usb_serial_generic_release(struct usb_serial *serial)
+ {
diff --git a/usb.current/usb-serial-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch b/usb.current/usb-serial-io_ti.c-don-t-return-0-if-writing-the-download-record-failed.patch
new file mode 100644
index 00000000000000..ea044370807b77
--- /dev/null
+++ b/usb.current/usb-serial-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 Thu Aug 19 10:37:00 2010
+Message-Id: <201008102129.o7ALTJ3b017160@imap1.linux-foundation.org>
+Subject: USB: serial: 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: Roel Kluin <roel.kluin@gmail.com>
+Date: Tue, 10 Aug 2010 14:29:19 -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
+@@ -1284,7 +1284,7 @@ static int download_fw(struct edgeport_s
+ kfree(header);
+ kfree(rom_desc);
+ kfree(ti_manuf_desc);
+- return status;
++ return -EINVAL;
+ }
+
+ /* Update I2C with type 0xf2 record with correct
diff --git a/usb.current/usb-ssu100-add-disconnect-function-for-ssu100.patch b/usb.current/usb-ssu100-add-disconnect-function-for-ssu100.patch
new file mode 100644
index 00000000000000..ac18d4846e7b7e
--- /dev/null
+++ b/usb.current/usb-ssu100-add-disconnect-function-for-ssu100.patch
@@ -0,0 +1,37 @@
+From wfp5p@viridian.itc.virginia.edu Thu Aug 19 10:31:34 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com
+Subject: USB: ssu100: add disconnect function for ssu100
+Date: Thu, 5 Aug 2010 17:01:11 -0400
+Message-Id: <1281042071-11829-8-git-send-email-wfp5p@virginia.edu>
+
+Add a disconnect function to the functions of this device. The
+disconnect is a call to usb_serial_generic_disconnect() so it requires
+that symbol to be exported from generic.c.
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -687,7 +687,6 @@ static void ssu100_process_read_urb(stru
+ tty_kref_put(tty);
+ }
+
+-
+ static struct usb_serial_driver ssu100_device = {
+ .driver = {
+ .owner = THIS_MODULE,
+@@ -709,6 +708,7 @@ static struct usb_serial_driver ssu100_d
+ .tiocmset = ssu100_tiocmset,
+ .ioctl = ssu100_ioctl,
+ .set_termios = ssu100_set_termios,
++ .disconnect = usb_serial_generic_disconnect,
+ };
+
+ static int __init ssu100_init(void)
diff --git a/usb.current/usb-ssu100-add-locking-for-port-private-data-in-ssu100.patch b/usb.current/usb-ssu100-add-locking-for-port-private-data-in-ssu100.patch
new file mode 100644
index 00000000000000..8411ec492cbc07
--- /dev/null
+++ b/usb.current/usb-ssu100-add-locking-for-port-private-data-in-ssu100.patch
@@ -0,0 +1,76 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:30:04 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com
+Subject: USB: ssu100: add locking for port private data in ssu100
+Date: Thu, 5 Aug 2010 17:01:05 -0400
+Message-Id: <1281042071-11829-2-git-send-email-wfp5p@virginia.edu>
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -99,6 +99,7 @@ static struct usb_driver ssu100_driver =
+ };
+
+ struct ssu100_port_private {
++ spinlock_t status_lock;
+ u8 shadowLSR;
+ u8 shadowMSR;
+ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
+@@ -333,6 +334,7 @@ static int ssu100_open(struct tty_struct
+ struct ssu100_port_private *priv = usb_get_serial_port_data(port);
+ u8 *data;
+ int result;
++ unsigned long flags;
+
+ dbg("%s - port %d", __func__, port->number);
+
+@@ -350,11 +352,13 @@ static int ssu100_open(struct tty_struct
+ return result;
+ }
+
++ spin_lock_irqsave(&priv->status_lock, flags);
+ priv->shadowLSR = data[0] & (SERIAL_LSR_OE | SERIAL_LSR_PE |
+ SERIAL_LSR_FE | SERIAL_LSR_BI);
+
+ priv->shadowMSR = data[1] & (SERIAL_MSR_CTS | SERIAL_MSR_DSR |
+ SERIAL_MSR_RI | SERIAL_MSR_CD);
++ spin_unlock_irqrestore(&priv->status_lock, flags);
+
+ kfree(data);
+
+@@ -455,6 +459,7 @@ static void ssu100_set_max_packet_size(s
+
+ unsigned num_endpoints;
+ int i;
++ unsigned long flags;
+
+ num_endpoints = interface->cur_altsetting->desc.bNumEndpoints;
+ dev_info(&udev->dev, "Number of endpoints %d\n", num_endpoints);
+@@ -466,7 +471,9 @@ static void ssu100_set_max_packet_size(s
+ }
+
+ /* set max packet size based on descriptor */
++ spin_lock_irqsave(&priv->status_lock, flags);
+ priv->max_packet_size = ep_desc->wMaxPacketSize;
++ spin_unlock_irqrestore(&priv->status_lock, flags);
+
+ dev_info(&udev->dev, "Setting MaxPacketSize %d\n", priv->max_packet_size);
+ }
+@@ -485,9 +492,9 @@ static int ssu100_attach(struct usb_seri
+ return -ENOMEM;
+ }
+
++ spin_lock_init(&priv->status_lock);
+ init_waitqueue_head(&priv->delta_msr_wait);
+ usb_set_serial_port_data(port, priv);
+-
+ ssu100_set_max_packet_size(port);
+
+ return ssu100_initdevice(serial->dev);
diff --git a/usb.current/usb-ssu100-add-register-parameter-to-ssu100_setregister.patch b/usb.current/usb-ssu100-add-register-parameter-to-ssu100_setregister.patch
new file mode 100644
index 00000000000000..60daa6a915a4df
--- /dev/null
+++ b/usb.current/usb-ssu100-add-register-parameter-to-ssu100_setregister.patch
@@ -0,0 +1,51 @@
+From wfp5p@viridian.itc.virginia.edu Thu Aug 19 10:30:46 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com
+Subject: USB: ssu100: add register parameter to ssu100_setregister
+Date: Thu, 5 Aug 2010 17:01:08 -0400
+Message-Id: <1281042071-11829-5-git-send-email-wfp5p@virginia.edu>
+
+The function ssu100_setregister was hard coded to only set the MCR
+register. Add a register parameter so that other registers can be
+set.
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -127,9 +127,10 @@ static inline int ssu100_getregister(str
+
+ static inline int ssu100_setregister(struct usb_device *dev,
+ unsigned short uart,
++ unsigned short reg,
+ u16 data)
+ {
+- u16 value = (data << 8) | UART_MCR;
++ u16 value = (data << 8) | reg;
+
+ return usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ QT_SET_GET_REGISTER, 0x40, value, uart,
+@@ -159,7 +160,7 @@ static inline int update_mctrl(struct us
+ if (set & TIOCM_RTS)
+ urb_value |= UART_MCR_RTS;
+
+- result = ssu100_setregister(dev, 0, urb_value);
++ result = ssu100_setregister(dev, 0, UART_MCR, urb_value);
+ if (result < 0)
+ dbg("%s Error from MODEM_CTRL urb", __func__);
+
+@@ -529,7 +530,7 @@ static void ssu100_dtr_rts(struct usb_se
+ if (!port->serial->disconnected) {
+ /* Disable flow control */
+ if (!on &&
+- ssu100_setregister(dev, 0, 0) < 0)
++ ssu100_setregister(dev, 0, UART_MCR, 0) < 0)
+ dev_err(&port->dev, "error from flowcontrol urb\n");
+ /* drop RTS and DTR */
+ if (on)
diff --git a/usb.current/usb-ssu100-refine-process_packet-in-ssu100.patch b/usb.current/usb-ssu100-refine-process_packet-in-ssu100.patch
new file mode 100644
index 00000000000000..2a1cf78364eb58
--- /dev/null
+++ b/usb.current/usb-ssu100-refine-process_packet-in-ssu100.patch
@@ -0,0 +1,36 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:30:17 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com
+Subject: USB: ssu100: refine process_packet in ssu100
+Date: Thu, 5 Aug 2010 17:01:06 -0400
+Message-Id: <1281042071-11829-3-git-send-email-wfp5p@virginia.edu>
+
+The status information does not appear at the start of each incoming
+packet so the check for len < 4 at the start of ssu100_process_packet
+is wrong. Remove it.
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -575,12 +575,8 @@ static int ssu100_process_packet(struct
+
+ dbg("%s - port %d", __func__, port->number);
+
+- if (len < 4) {
+- dbg("%s - malformed packet", __func__);
+- return 0;
+- }
+-
+- if ((packet[0] == 0x1b) && (packet[1] == 0x1b) &&
++ if ((len >= 4) &&
++ (packet[0] == 0x1b) && (packet[1] == 0x1b) &&
+ ((packet[2] == 0x00) || (packet[2] == 0x01))) {
+ if (packet[2] == 0x00)
+ priv->shadowLSR = packet[3] & (SERIAL_LSR_OE |
diff --git a/usb.current/usb-ssu100-remove-duplicate-defines-in-ssu100.patch b/usb.current/usb-ssu100-remove-duplicate-defines-in-ssu100.patch
new file mode 100644
index 00000000000000..3980f2792d0c27
--- /dev/null
+++ b/usb.current/usb-ssu100-remove-duplicate-defines-in-ssu100.patch
@@ -0,0 +1,194 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:30:28 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com
+Subject: USB: ssu100: remove duplicate #defines in ssu100
+Date: Thu, 5 Aug 2010 17:01:07 -0400
+Message-Id: <1281042071-11829-4-git-send-email-wfp5p@virginia.edu>
+
+The ssu100 uses a TI16C550C UART so the SERIAL_ defines in this code
+are duplicates of those found in serial_reg.h. Remove the defines in
+ssu100.c and use the ones in the header file.
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 86 +++++++++++++++-----------------------------
+ 1 file changed, 31 insertions(+), 55 deletions(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -15,6 +15,7 @@
+ #include <linux/serial.h>
+ #include <linux/usb.h>
+ #include <linux/usb/serial.h>
++#include <linux/serial_reg.h>
+ #include <linux/uaccess.h>
+
+ #define QT_OPEN_CLOSE_CHANNEL 0xca
+@@ -27,36 +28,11 @@
+ #define QT_HW_FLOW_CONTROL_MASK 0xc5
+ #define QT_SW_FLOW_CONTROL_MASK 0xc6
+
+-#define MODEM_CTL_REGISTER 0x04
+-#define MODEM_STATUS_REGISTER 0x06
+-
+-
+-#define SERIAL_LSR_OE 0x02
+-#define SERIAL_LSR_PE 0x04
+-#define SERIAL_LSR_FE 0x08
+-#define SERIAL_LSR_BI 0x10
+-
+-#define SERIAL_LSR_TEMT 0x40
+-
+-#define SERIAL_MCR_DTR 0x01
+-#define SERIAL_MCR_RTS 0x02
+-#define SERIAL_MCR_LOOP 0x10
+-
+-#define SERIAL_MSR_CTS 0x10
+-#define SERIAL_MSR_CD 0x80
+-#define SERIAL_MSR_RI 0x40
+-#define SERIAL_MSR_DSR 0x20
+ #define SERIAL_MSR_MASK 0xf0
+
+-#define SERIAL_CRTSCTS ((SERIAL_MCR_RTS << 8) | SERIAL_MSR_CTS)
+-
+-#define SERIAL_8_DATA 0x03
+-#define SERIAL_7_DATA 0x02
+-#define SERIAL_6_DATA 0x01
+-#define SERIAL_5_DATA 0x00
++#define SERIAL_CRTSCTS ((UART_MCR_RTS << 8) | UART_MSR_CTS)
+
+-#define SERIAL_ODD_PARITY 0X08
+-#define SERIAL_EVEN_PARITY 0X18
++#define SERIAL_EVEN_PARITY (UART_LCR_PARITY | UART_LCR_EPAR)
+
+ #define MAX_BAUD_RATE 460800
+
+@@ -153,7 +129,7 @@ static inline int ssu100_setregister(str
+ unsigned short uart,
+ u16 data)
+ {
+- u16 value = (data << 8) | MODEM_CTL_REGISTER;
++ u16 value = (data << 8) | UART_MCR;
+
+ return usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+ QT_SET_GET_REGISTER, 0x40, value, uart,
+@@ -179,9 +155,9 @@ static inline int update_mctrl(struct us
+ clear &= ~set; /* 'set' takes precedence over 'clear' */
+ urb_value = 0;
+ if (set & TIOCM_DTR)
+- urb_value |= SERIAL_MCR_DTR;
++ urb_value |= UART_MCR_DTR;
+ if (set & TIOCM_RTS)
+- urb_value |= SERIAL_MCR_RTS;
++ urb_value |= UART_MCR_RTS;
+
+ result = ssu100_setregister(dev, 0, urb_value);
+ if (result < 0)
+@@ -265,24 +241,24 @@ static void ssu100_set_termios(struct tt
+
+ if (cflag & PARENB) {
+ if (cflag & PARODD)
+- urb_value |= SERIAL_ODD_PARITY;
++ urb_value |= UART_LCR_PARITY;
+ else
+ urb_value |= SERIAL_EVEN_PARITY;
+ }
+
+ switch (cflag & CSIZE) {
+ case CS5:
+- urb_value |= SERIAL_5_DATA;
++ urb_value |= UART_LCR_WLEN5;
+ break;
+ case CS6:
+- urb_value |= SERIAL_6_DATA;
++ urb_value |= UART_LCR_WLEN6;
+ break;
+ case CS7:
+- urb_value |= SERIAL_7_DATA;
++ urb_value |= UART_LCR_WLEN7;
+ break;
+ default:
+ case CS8:
+- urb_value |= SERIAL_8_DATA;
++ urb_value |= UART_LCR_WLEN8;
+ break;
+ }
+
+@@ -353,11 +329,11 @@ static int ssu100_open(struct tty_struct
+ }
+
+ spin_lock_irqsave(&priv->status_lock, flags);
+- priv->shadowLSR = data[0] & (SERIAL_LSR_OE | SERIAL_LSR_PE |
+- SERIAL_LSR_FE | SERIAL_LSR_BI);
++ priv->shadowLSR = data[0] & (UART_LSR_OE | UART_LSR_PE |
++ UART_LSR_FE | UART_LSR_BI);
+
+- priv->shadowMSR = data[1] & (SERIAL_MSR_CTS | SERIAL_MSR_DSR |
+- SERIAL_MSR_RI | SERIAL_MSR_CD);
++ priv->shadowMSR = data[1] & (UART_MSR_CTS | UART_MSR_DSR |
++ UART_MSR_RI | UART_MSR_DCD);
+ spin_unlock_irqrestore(&priv->status_lock, flags);
+
+ kfree(data);
+@@ -430,10 +406,10 @@ static int ssu100_ioctl(struct tty_struc
+ /* Return 0 if caller wanted to know about
+ these bits */
+
+- if (((arg & TIOCM_RNG) && (diff & SERIAL_MSR_RI)) ||
+- ((arg & TIOCM_DSR) && (diff & SERIAL_MSR_DSR)) ||
+- ((arg & TIOCM_CD) && (diff & SERIAL_MSR_CD)) ||
+- ((arg & TIOCM_CTS) && (diff & SERIAL_MSR_CTS)))
++ if (((arg & TIOCM_RNG) && (diff & UART_MSR_RI)) ||
++ ((arg & TIOCM_DSR) && (diff & UART_MSR_DSR)) ||
++ ((arg & TIOCM_CD) && (diff & UART_MSR_DCD)) ||
++ ((arg & TIOCM_CTS) && (diff & UART_MSR_CTS)))
+ return 0;
+ }
+ }
+@@ -513,20 +489,20 @@ static int ssu100_tiocmget(struct tty_st
+ if (!d)
+ return -ENOMEM;
+
+- r = ssu100_getregister(dev, 0, MODEM_CTL_REGISTER, d);
++ r = ssu100_getregister(dev, 0, UART_MCR, d);
+ if (r < 0)
+ goto mget_out;
+
+- r = ssu100_getregister(dev, 0, MODEM_STATUS_REGISTER, d+1);
++ r = ssu100_getregister(dev, 0, UART_MSR, d+1);
+ if (r < 0)
+ goto mget_out;
+
+- r = (d[0] & SERIAL_MCR_DTR ? TIOCM_DTR : 0) |
+- (d[0] & SERIAL_MCR_RTS ? TIOCM_RTS : 0) |
+- (d[1] & SERIAL_MSR_CTS ? TIOCM_CTS : 0) |
+- (d[1] & SERIAL_MSR_CD ? TIOCM_CAR : 0) |
+- (d[1] & SERIAL_MSR_RI ? TIOCM_RI : 0) |
+- (d[1] & SERIAL_MSR_DSR ? TIOCM_DSR : 0);
++ r = (d[0] & UART_MCR_DTR ? TIOCM_DTR : 0) |
++ (d[0] & UART_MCR_RTS ? TIOCM_RTS : 0) |
++ (d[1] & UART_MSR_CTS ? TIOCM_CTS : 0) |
++ (d[1] & UART_MSR_DCD ? TIOCM_CAR : 0) |
++ (d[1] & UART_MSR_RI ? TIOCM_RI : 0) |
++ (d[1] & UART_MSR_DSR ? TIOCM_DSR : 0);
+
+ mget_out:
+ kfree(d);
+@@ -579,10 +555,10 @@ static int ssu100_process_packet(struct
+ (packet[0] == 0x1b) && (packet[1] == 0x1b) &&
+ ((packet[2] == 0x00) || (packet[2] == 0x01))) {
+ if (packet[2] == 0x00)
+- priv->shadowLSR = packet[3] & (SERIAL_LSR_OE |
+- SERIAL_LSR_PE |
+- SERIAL_LSR_FE |
+- SERIAL_LSR_BI);
++ priv->shadowLSR = packet[3] & (UART_LSR_OE |
++ UART_LSR_PE |
++ UART_LSR_FE |
++ UART_LSR_BI);
+
+ if (packet[2] == 0x01) {
+ priv->shadowMSR = packet[3];
diff --git a/usb.current/usb-ssu100-rework-logic-for-tiocmiwait.patch b/usb.current/usb-ssu100-rework-logic-for-tiocmiwait.patch
new file mode 100644
index 00000000000000..f3db18fa8d941b
--- /dev/null
+++ b/usb.current/usb-ssu100-rework-logic-for-tiocmiwait.patch
@@ -0,0 +1,215 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:30:59 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com
+Subject: USB: ssu100: rework logic for TIOCMIWAIT
+Date: Thu, 5 Aug 2010 17:01:09 -0400
+Message-Id: <1281042071-11829-6-git-send-email-wfp5p@virginia.edu>
+
+Rework the logic for TIOCMIWAIT to use wait_event_interruptible.
+
+This also adds support for TIOCGICOUNT.
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 146 +++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 111 insertions(+), 35 deletions(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -80,6 +80,7 @@ struct ssu100_port_private {
+ u8 shadowMSR;
+ wait_queue_head_t delta_msr_wait; /* Used for TIOCMIWAIT */
+ unsigned short max_packet_size;
++ struct async_icount icount;
+ };
+
+ static void ssu100_release(struct usb_serial *serial)
+@@ -330,11 +331,8 @@ static int ssu100_open(struct tty_struct
+ }
+
+ spin_lock_irqsave(&priv->status_lock, flags);
+- priv->shadowLSR = data[0] & (UART_LSR_OE | UART_LSR_PE |
+- UART_LSR_FE | UART_LSR_BI);
+-
+- priv->shadowMSR = data[1] & (UART_MSR_CTS | UART_MSR_DSR |
+- UART_MSR_RI | UART_MSR_DCD);
++ priv->shadowLSR = data[0];
++ priv->shadowMSR = data[1];
+ spin_unlock_irqrestore(&priv->status_lock, flags);
+
+ kfree(data);
+@@ -379,11 +377,51 @@ static int get_serial_info(struct usb_se
+ return 0;
+ }
+
++static int wait_modem_info(struct usb_serial_port *port, unsigned int arg)
++{
++ struct ssu100_port_private *priv = usb_get_serial_port_data(port);
++ struct async_icount prev, cur;
++ unsigned long flags;
++
++ spin_lock_irqsave(&priv->status_lock, flags);
++ prev = priv->icount;
++ spin_unlock_irqrestore(&priv->status_lock, flags);
++
++ while (1) {
++ wait_event_interruptible(priv->delta_msr_wait,
++ ((priv->icount.rng != prev.rng) ||
++ (priv->icount.dsr != prev.dsr) ||
++ (priv->icount.dcd != prev.dcd) ||
++ (priv->icount.cts != prev.cts)));
++
++ if (signal_pending(current))
++ return -ERESTARTSYS;
++
++ spin_lock_irqsave(&priv->status_lock, flags);
++ cur = priv->icount;
++ spin_unlock_irqrestore(&priv->status_lock, flags);
++
++ if ((prev.rng == cur.rng) &&
++ (prev.dsr == cur.dsr) &&
++ (prev.dcd == cur.dcd) &&
++ (prev.cts == cur.cts))
++ return -EIO;
++
++ if ((arg & TIOCM_RNG && (prev.rng != cur.rng)) ||
++ (arg & TIOCM_DSR && (prev.dsr != cur.dsr)) ||
++ (arg & TIOCM_CD && (prev.dcd != cur.dcd)) ||
++ (arg & TIOCM_CTS && (prev.cts != cur.cts)))
++ return 0;
++ }
++ return 0;
++}
++
+ static int ssu100_ioctl(struct tty_struct *tty, struct file *file,
+ unsigned int cmd, unsigned long arg)
+ {
+ struct usb_serial_port *port = tty->driver_data;
+ struct ssu100_port_private *priv = usb_get_serial_port_data(port);
++ void __user *user_arg = (void __user *)arg;
+
+ dbg("%s cmd 0x%04x", __func__, cmd);
+
+@@ -393,28 +431,28 @@ static int ssu100_ioctl(struct tty_struc
+ (struct serial_struct __user *) arg);
+
+ case TIOCMIWAIT:
+- while (priv != NULL) {
+- u8 prevMSR = priv->shadowMSR & SERIAL_MSR_MASK;
+- interruptible_sleep_on(&priv->delta_msr_wait);
+- /* see if a signal did it */
+- if (signal_pending(current))
+- return -ERESTARTSYS;
+- else {
+- u8 diff = (priv->shadowMSR & SERIAL_MSR_MASK) ^ prevMSR;
+- if (!diff)
+- return -EIO; /* no change => error */
+-
+- /* Return 0 if caller wanted to know about
+- these bits */
+-
+- if (((arg & TIOCM_RNG) && (diff & UART_MSR_RI)) ||
+- ((arg & TIOCM_DSR) && (diff & UART_MSR_DSR)) ||
+- ((arg & TIOCM_CD) && (diff & UART_MSR_DCD)) ||
+- ((arg & TIOCM_CTS) && (diff & UART_MSR_CTS)))
+- return 0;
+- }
+- }
++ return wait_modem_info(port, arg);
++
++ case TIOCGICOUNT:
++ {
++ struct serial_icounter_struct icount;
++ struct async_icount cnow = priv->icount;
++ memset(&icount, 0, sizeof(icount));
++ icount.cts = cnow.cts;
++ icount.dsr = cnow.dsr;
++ icount.rng = cnow.rng;
++ icount.dcd = cnow.dcd;
++ icount.rx = cnow.rx;
++ icount.tx = cnow.tx;
++ icount.frame = cnow.frame;
++ icount.overrun = cnow.overrun;
++ icount.parity = cnow.parity;
++ icount.brk = cnow.brk;
++ icount.buf_overrun = cnow.buf_overrun;
++ if (copy_to_user(user_arg, &icount, sizeof(icount)))
++ return -EFAULT;
+ return 0;
++ }
+
+ default:
+ break;
+@@ -541,6 +579,50 @@ static void ssu100_dtr_rts(struct usb_se
+ mutex_unlock(&port->serial->disc_mutex);
+ }
+
++static void ssu100_update_msr(struct usb_serial_port *port, u8 msr)
++{
++ struct ssu100_port_private *priv = usb_get_serial_port_data(port);
++ unsigned long flags;
++
++ spin_lock_irqsave(&priv->status_lock, flags);
++ priv->shadowMSR = msr;
++ spin_unlock_irqrestore(&priv->status_lock, flags);
++
++ if (msr & UART_MSR_ANY_DELTA) {
++ /* update input line counters */
++ if (msr & UART_MSR_DCTS)
++ priv->icount.cts++;
++ if (msr & UART_MSR_DDSR)
++ priv->icount.dsr++;
++ if (msr & UART_MSR_DDCD)
++ priv->icount.dcd++;
++ if (msr & UART_MSR_TERI)
++ priv->icount.rng++;
++ wake_up_interruptible(&priv->delta_msr_wait);
++ }
++}
++
++static void ssu100_update_lsr(struct usb_serial_port *port, u8 lsr)
++{
++ struct ssu100_port_private *priv = usb_get_serial_port_data(port);
++ unsigned long flags;
++
++ spin_lock_irqsave(&priv->status_lock, flags);
++ priv->shadowLSR = lsr;
++ spin_unlock_irqrestore(&priv->status_lock, flags);
++
++ if (lsr & UART_LSR_BRK_ERROR_BITS) {
++ if (lsr & UART_LSR_BI)
++ priv->icount.brk++;
++ if (lsr & UART_LSR_FE)
++ priv->icount.frame++;
++ if (lsr & UART_LSR_PE)
++ priv->icount.parity++;
++ if (lsr & UART_LSR_OE)
++ priv->icount.overrun++;
++ }
++}
++
+ static int ssu100_process_packet(struct tty_struct *tty,
+ struct usb_serial_port *port,
+ struct ssu100_port_private *priv,
+@@ -556,15 +638,9 @@ static int ssu100_process_packet(struct
+ (packet[0] == 0x1b) && (packet[1] == 0x1b) &&
+ ((packet[2] == 0x00) || (packet[2] == 0x01))) {
+ if (packet[2] == 0x00)
+- priv->shadowLSR = packet[3] & (UART_LSR_OE |
+- UART_LSR_PE |
+- UART_LSR_FE |
+- UART_LSR_BI);
+-
+- if (packet[2] == 0x01) {
+- priv->shadowMSR = packet[3];
+- wake_up_interruptible(&priv->delta_msr_wait);
+- }
++ ssu100_update_lsr(port, packet[3]);
++ if (packet[2] == 0x01)
++ ssu100_update_msr(port, packet[3]);
+
+ len -= 4;
+ ch = packet + 4;
diff --git a/usb.current/usb-ssu100-set-tty_flags-in-ssu100_process_packet.patch b/usb.current/usb-ssu100-set-tty_flags-in-ssu100_process_packet.patch
new file mode 100644
index 00000000000000..8a595fe8a43ed7
--- /dev/null
+++ b/usb.current/usb-ssu100-set-tty_flags-in-ssu100_process_packet.patch
@@ -0,0 +1,91 @@
+From wfp5p@viridian.itc.virginia.edu Thu Aug 19 10:28:29 2010
+From: Bill Pemberton <wfp5p@virginia.edu>
+To: linux-usb@vger.kernel.org
+Cc: greg@kroah.com
+Subject: USB: ssu100: set tty_flags in ssu100_process_packet
+Date: Fri, 13 Aug 2010 09:59:31 -0400
+Message-Id: <1281707971-22238-1-git-send-email-wfp5p@virginia.edu>
+
+flag was never set in ssu100_process_packet. Add logic to set it
+before calling tty_insert_flip_*
+
+Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ssu100.c | 38 +++++++++++++++++++++++++++++---------
+ 1 file changed, 29 insertions(+), 9 deletions(-)
+
+--- a/drivers/usb/serial/ssu100.c
++++ b/drivers/usb/serial/ssu100.c
+@@ -602,7 +602,8 @@ static void ssu100_update_msr(struct usb
+ }
+ }
+
+-static void ssu100_update_lsr(struct usb_serial_port *port, u8 lsr)
++static void ssu100_update_lsr(struct usb_serial_port *port, u8 lsr,
++ char *tty_flag)
+ {
+ struct ssu100_port_private *priv = usb_get_serial_port_data(port);
+ unsigned long flags;
+@@ -611,16 +612,32 @@ static void ssu100_update_lsr(struct usb
+ priv->shadowLSR = lsr;
+ spin_unlock_irqrestore(&priv->status_lock, flags);
+
++ *tty_flag = TTY_NORMAL;
+ if (lsr & UART_LSR_BRK_ERROR_BITS) {
+- if (lsr & UART_LSR_BI)
++ /* we always want to update icount, but we only want to
++ * update tty_flag for one case */
++ if (lsr & UART_LSR_BI) {
+ priv->icount.brk++;
+- if (lsr & UART_LSR_FE)
+- priv->icount.frame++;
+- if (lsr & UART_LSR_PE)
++ *tty_flag = TTY_BREAK;
++ usb_serial_handle_break(port);
++ }
++ if (lsr & UART_LSR_PE) {
+ priv->icount.parity++;
+- if (lsr & UART_LSR_OE)
++ if (*tty_flag == TTY_NORMAL)
++ *tty_flag = TTY_PARITY;
++ }
++ if (lsr & UART_LSR_FE) {
++ priv->icount.frame++;
++ if (*tty_flag == TTY_NORMAL)
++ *tty_flag = TTY_FRAME;
++ }
++ if (lsr & UART_LSR_OE){
+ priv->icount.overrun++;
++ if (*tty_flag == TTY_NORMAL)
++ *tty_flag = TTY_OVERRUN;
++ }
+ }
++
+ }
+
+ static int ssu100_process_packet(struct tty_struct *tty,
+@@ -629,7 +646,7 @@ static int ssu100_process_packet(struct
+ char *packet, int len)
+ {
+ int i;
+- char flag;
++ char flag = TTY_NORMAL;
+ char *ch;
+
+ dbg("%s - port %d", __func__, port->number);
+@@ -637,8 +654,11 @@ static int ssu100_process_packet(struct
+ if ((len >= 4) &&
+ (packet[0] == 0x1b) && (packet[1] == 0x1b) &&
+ ((packet[2] == 0x00) || (packet[2] == 0x01))) {
+- if (packet[2] == 0x00)
+- ssu100_update_lsr(port, packet[3]);
++ if (packet[2] == 0x00) {
++ ssu100_update_lsr(port, packet[3], &flag);
++ if (flag == TTY_OVERRUN)
++ tty_insert_flip_char(tty, 0, TTY_OVERRUN);
++ }
+ if (packet[2] == 0x01)
+ ssu100_update_msr(port, packet[3]);
+
diff --git a/usb.current/usb-xhci-remove-buggy-assignment-in-next_trb.patch b/usb.current/usb-xhci-remove-buggy-assignment-in-next_trb.patch
new file mode 100644
index 00000000000000..e461bf1396f904
--- /dev/null
+++ b/usb.current/usb-xhci-remove-buggy-assignment-in-next_trb.patch
@@ -0,0 +1,42 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:39:00 2010
+Date: Mon, 9 Aug 2010 13:56:11 -0700
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+To: Greg KH <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org, John Youn <johnyoun@synopsys.com>,
+ stable@kernel.org
+Subject: USB: xhci: Remove buggy assignment in next_trb()
+Message-ID: <20100809205555.GA2344@xanatos>
+Content-Disposition: inline
+
+From: John Youn <John.Youn@synopsys.com>
+
+The code to increment the TRB pointer has a slight ambiguity that could
+lead to a bug on different compilers. The ANSI C specification does not
+specify the precedence of the assignment operator over the postfix
+operator. gcc 4.4 produced the correct code (increment the pointer and
+assign the value), but a MIPS compiler that one of John's clients used
+assigned the old (unincremented) value.
+
+Remove the unnecessary assignment to make all compilers produce the
+correct assembly.
+
+Signed-off-by: John Youn <johnyoun@synopsys.com>
+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-ring.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-ring.c
++++ b/drivers/usb/host/xhci-ring.c
+@@ -131,7 +131,7 @@ static void next_trb(struct xhci_hcd *xh
+ *seg = (*seg)->next;
+ *trb = ((*seg)->trbs);
+ } else {
+- *trb = (*trb)++;
++ (*trb)++;
+ }
+ }
+
diff --git a/usb.current/usb-xhci-update-ring-dequeue-pointer-when-process-missed-tds.patch b/usb.current/usb-xhci-update-ring-dequeue-pointer-when-process-missed-tds.patch
new file mode 100644
index 00000000000000..3eb90ecb6ea85b
--- /dev/null
+++ b/usb.current/usb-xhci-update-ring-dequeue-pointer-when-process-missed-tds.patch
@@ -0,0 +1,47 @@
+From linux-usb-owner@vger.kernel.org Thu Aug 19 10:39:27 2010
+Date: Mon, 9 Aug 2010 13:56:15 -0700
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+To: Greg KH <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org,
+ Sander Eikelenboom <linux@eikelenboom.it>,
+ Andiry Xu <andiry.xu@amd.com>
+Subject: USB: xHCI: update ring dequeue pointer when process missed tds
+Message-ID: <20100809205615.GA2515@xanatos>
+Content-Disposition: inline
+
+From: Andiry Xu <andiry.xu@amd.com>
+
+This patch fixes a isoc transfer bug reported by Sander Eikelenboom.
+When ep->skip is set, endpoint ring dequeue pointer should be updated
+when processed every missed td. Although ring dequeue pointer will also
+be updated when ep->skip is clear, leave it intact during missed tds
+processing may cause two issues:
+
+1). If the very next valid transfer following missed tds is a short
+transfer, its actual_length will be miscalculated;
+2). If there are too many missed tds during transfer, new inserted tds
+may found the transfer ring full and urb enqueue fails.
+
+Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
+Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
+Signed-off-by: Andiry Xu <andiry.xu@amd.com>
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci-ring.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/host/xhci-ring.c
++++ b/drivers/usb/host/xhci-ring.c
+@@ -1551,6 +1551,10 @@ static int process_isoc_td(struct xhci_h
+ /* calc actual length */
+ if (ep->skip) {
+ td->urb->iso_frame_desc[idx].actual_length = 0;
++ /* Update ring dequeue pointer */
++ while (ep_ring->dequeue != td->last_trb)
++ inc_deq(xhci, ep_ring, false);
++ inc_deq(xhci, ep_ring, false);
+ return finish_td(xhci, td, event_trb, event, ep, status, true);
+ }
+