aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-10-09 11:27:55 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-10-09 11:27:55 -0700
commit18ae79f72ba0aee00036ac3b579dd5a1e753ab98 (patch)
tree4880842cfa3eed60471f38514115ce7aa8749201
parent39803ce38476b33a7dc4d04f0f00da2c9bdaa363 (diff)
downloadpatches-18ae79f72ba0aee00036ac3b579dd5a1e753ab98.tar.gz
usb patches
-rw-r--r--driver-core.current/sysfs-allow-sysfs_notify_dirent-to-be-called-from-interrupt-context.patch100
-rw-r--r--series24
-rw-r--r--staging.current/staging-p9auth-a-few-fixes.patch109
-rw-r--r--staging/staging-line6-driver.c-factorize-code-and-cleanups.patch223
-rw-r--r--usb.current/usb-gadget-imx_udc-use-resource-size.patch50
-rw-r--r--usb.current/usb-isp1362-fix-build-warnings-on-64-bit-systems.patch114
-rw-r--r--usb.current/usb-musb-make-have_clk-support-optional.patch79
-rw-r--r--usb.current/usb-option-patch-for-huawei-mobile-broadband-e270-modem.patch34
-rw-r--r--usb.current/usb-option-toshiba-g450-device-id.patch35
-rw-r--r--usb.current/usb-serial-don-t-call-release-without-attach.patch65
-rw-r--r--usb.current/usb-serial-sierra-driver-version-change-to-1.3.8.patch33
-rw-r--r--usb.current/usb-storage-iriver-p7-unusual_dev-patch.patch33
-rw-r--r--usb.current/usb-usblcd-fix-memory-leak.patch33
-rw-r--r--usb.current/usb-usbtmc-fix-timeout-increase.patch32
-rw-r--r--usb.current/usb-xhci-don-t-wait-for-a-disable-slot-cmd-when-hc-dies.patch47
-rw-r--r--usb.current/usb-xhci-fix-dropping-endpoints-from-the-xhc-schedule.patch31
-rw-r--r--usb.current/usb-xhci-handle-canceled-urbs-when-hc-dies.patch55
-rw-r--r--usb.current/usb-xhci-stop-debugging-polling-loop-when-hc-dies.patch35
-rw-r--r--usb/usb-add-support-for-xilinx-usb-host-controller.patch393
-rw-r--r--usb/usb-convert-a-dev_info-to-a-dev_dbg.patch33
-rw-r--r--usb/usb-ehci-hub-remove-redundant-ehci-debug-check.patch30
-rw-r--r--usb/usb-storage-make-driver-less-chatty-when-it-finds-a-new-device.patch67
-rw-r--r--usb/usb-usb-storage-associate-the-name-of-the-interface-with-the-scsi-host.patch56
23 files changed, 1711 insertions, 0 deletions
diff --git a/driver-core.current/sysfs-allow-sysfs_notify_dirent-to-be-called-from-interrupt-context.patch b/driver-core.current/sysfs-allow-sysfs_notify_dirent-to-be-called-from-interrupt-context.patch
new file mode 100644
index 00000000000000..fc6dbdb9edaafb
--- /dev/null
+++ b/driver-core.current/sysfs-allow-sysfs_notify_dirent-to-be-called-from-interrupt-context.patch
@@ -0,0 +1,100 @@
+From dan.j.williams@intel.com Fri Oct 9 10:36:08 2009
+From: Neil Brown <neilb@suse.de>
+Date: Tue, 15 Sep 2009 16:05:51 -0700
+Subject: sysfs: Allow sysfs_notify_dirent to be called from interrupt context.
+To: Greg KH <gregkh@suse.de>
+Cc: Neil Brown <neilb@suse.de>, Dave Jones <davej@redhat.com>, Hans de Goede <hdegoede@redhat.com>
+Message-ID: <1253055951.20787.6.camel@dwillia2-linux.ch.intel.com>
+
+
+From: Neil Brown <neilb@suse.de>
+
+sysfs_notify_dirent is a simple atomic operation that can be used to
+alert user-space that new data can be read from a sysfs attribute.
+
+Unfortunately it cannot currently be called from non-process context
+because of its use of spin_lock which is sometimes taken with
+interrupts enabled.
+
+So change all lockers of sysfs_open_dirent_lock to disable interrupts,
+thus making sysfs_notify_dirent safe to be called from non-process
+context (as drivers/md does in md_safemode_timeout).
+
+sysfs_get_open_dirent is (documented as being) only called from
+process context, so it uses spin_lock_irq. Other places
+use spin_lock_irqsave.
+
+The usage for sysfs_notify_dirent in md_safemode_timeout was
+introduced in 2.6.28, so this patch is suitable for that and more
+recent kernels.
+
+Reported-by: Joel Andres Granados <jgranado@redhat.com>
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Dan Williams <dan.j.williams@intel.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/sysfs/file.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/fs/sysfs/file.c
++++ b/fs/sysfs/file.c
+@@ -268,7 +268,7 @@ static int sysfs_get_open_dirent(struct
+ struct sysfs_open_dirent *od, *new_od = NULL;
+
+ retry:
+- spin_lock(&sysfs_open_dirent_lock);
++ spin_lock_irq(&sysfs_open_dirent_lock);
+
+ if (!sd->s_attr.open && new_od) {
+ sd->s_attr.open = new_od;
+@@ -281,7 +281,7 @@ static int sysfs_get_open_dirent(struct
+ list_add_tail(&buffer->list, &od->buffers);
+ }
+
+- spin_unlock(&sysfs_open_dirent_lock);
++ spin_unlock_irq(&sysfs_open_dirent_lock);
+
+ if (od) {
+ kfree(new_od);
+@@ -315,8 +315,9 @@ static void sysfs_put_open_dirent(struct
+ struct sysfs_buffer *buffer)
+ {
+ struct sysfs_open_dirent *od = sd->s_attr.open;
++ unsigned long flags;
+
+- spin_lock(&sysfs_open_dirent_lock);
++ spin_lock_irqsave(&sysfs_open_dirent_lock, flags);
+
+ list_del(&buffer->list);
+ if (atomic_dec_and_test(&od->refcnt))
+@@ -324,7 +325,7 @@ static void sysfs_put_open_dirent(struct
+ else
+ od = NULL;
+
+- spin_unlock(&sysfs_open_dirent_lock);
++ spin_unlock_irqrestore(&sysfs_open_dirent_lock, flags);
+
+ kfree(od);
+ }
+@@ -456,8 +457,9 @@ static unsigned int sysfs_poll(struct fi
+ void sysfs_notify_dirent(struct sysfs_dirent *sd)
+ {
+ struct sysfs_open_dirent *od;
++ unsigned long flags;
+
+- spin_lock(&sysfs_open_dirent_lock);
++ spin_lock_irqsave(&sysfs_open_dirent_lock, flags);
+
+ od = sd->s_attr.open;
+ if (od) {
+@@ -465,7 +467,7 @@ void sysfs_notify_dirent(struct sysfs_di
+ wake_up_interruptible(&od->poll);
+ }
+
+- spin_unlock(&sysfs_open_dirent_lock);
++ spin_unlock_irqrestore(&sysfs_open_dirent_lock, flags);
+ }
+ EXPORT_SYMBOL_GPL(sysfs_notify_dirent);
+
diff --git a/series b/series
index eba9413b4fc2e9..dff49825982447 100644
--- a/series
+++ b/series
@@ -10,6 +10,7 @@ gregkh/gkh-version.patch
# Driver core patches for 2.6.32
#################################
driver-core.current/sysfs-allow-sysfs_move_dir-again.patch
+driver-core.current/sysfs-allow-sysfs_notify_dirent-to-be-called-from-interrupt-context.patch
#################################
# TTY patches for 2.6.32
@@ -26,6 +27,21 @@ usb.current/usb-ftdi_sio-clean-up-read-completion-handler.patch
usb.current/usb-ftdi_sio-re-implement-read-processing.patch
usb.current/usb-pl2303-fix-error-characters-not-being-reported-to-ldisc.patch
usb.current/usb-digi_acceleport-fix-broken-unthrottle.patch
+usb.current/usb-serial-don-t-call-release-without-attach.patch
+usb.current/usb-serial-sierra-driver-version-change-to-1.3.8.patch
+usb.current/usb-usblcd-fix-memory-leak.patch
+usb.current/usb-option-toshiba-g450-device-id.patch
+usb.current/usb-option-patch-for-huawei-mobile-broadband-e270-modem.patch
+usb.current/usb-usbtmc-fix-timeout-increase.patch
+usb.current/usb-xhci-stop-debugging-polling-loop-when-hc-dies.patch
+usb.current/usb-xhci-handle-canceled-urbs-when-hc-dies.patch
+usb.current/usb-xhci-don-t-wait-for-a-disable-slot-cmd-when-hc-dies.patch
+usb.current/usb-xhci-fix-dropping-endpoints-from-the-xhc-schedule.patch
+usb.current/usb-musb-make-have_clk-support-optional.patch
+usb.current/usb-storage-iriver-p7-unusual_dev-patch.patch
+usb.current/usb-gadget-imx_udc-use-resource-size.patch
+usb.current/usb-isp1362-fix-build-warnings-on-64-bit-systems.patch
+
#################################
# Staging patches for 2.6.32
@@ -39,6 +55,7 @@ staging.current/staging-w35und-fix-beacon_int-breakage.patch
staging.current/staging-winbond-implement-prepare_multicast-and-fix-api-usage.patch
staging.current/staging-iio-don-t-build-on-s390.patch
staging.current/staging-rtl8192e-add-include-linux-vmalloc.h.patch
+staging.current/staging-p9auth-a-few-fixes.patch
staging.current/staging-comedi-8253-fix-coding-style-error.patch
staging.current/staging-comedi-8255-fix-coding-style-error.patch
@@ -105,6 +122,11 @@ tty/jsm-removing-the-field-jsm_board-intr_count.patch
# USB stuff (after 2.6.32 is out)
#################################
usb/usb-serial-ftdi_sio-add-space-mark-parity.patch
+usb/usb-ehci-hub-remove-redundant-ehci-debug-check.patch
+usb/usb-convert-a-dev_info-to-a-dev_dbg.patch
+usb/usb-usb-storage-associate-the-name-of-the-interface-with-the-scsi-host.patch
+usb/usb-storage-make-driver-less-chatty-when-it-finds-a-new-device.patch
+usb/usb-add-support-for-xilinx-usb-host-controller.patch
#################################
# Staging stuff
@@ -120,6 +142,7 @@ staging/staging-rt2860-add-rt3090-chipset-support.patch
staging/staging-remove-no-longer-needed-rt3090-driver.patch
staging/staging-b3dfg-remove-check-for-pci-bus-master.patch
+staging/staging-line6-driver.c-factorize-code-and-cleanups.patch
staging/staging-xvmalloc-memory-allocator.patch
@@ -127,6 +150,7 @@ staging/staging-virtual-block-device-driver.patch
staging/staging-ramzswap-documentation.patch
staging/staging-ramzswap-add-todo-file.patch
+
# drivers to delete for .33
staging/staging-android-delete-android-drivers.patch
diff --git a/staging.current/staging-p9auth-a-few-fixes.patch b/staging.current/staging-p9auth-a-few-fixes.patch
new file mode 100644
index 00000000000000..114cd75d671220
--- /dev/null
+++ b/staging.current/staging-p9auth-a-few-fixes.patch
@@ -0,0 +1,109 @@
+From serue@us.ibm.com Fri Oct 9 10:37:17 2009
+From: "Serge E. Hallyn" <serue@us.ibm.com>
+Date: Wed, 16 Sep 2009 16:27:41 -0500
+Subject: Staging: p9auth: a few fixes
+To: Ashwin Ganti <ashwin.ganti@gmail.com>, Greg Kroah-Hartman <gregkh@suse.de>
+Cc: lkml <linux-kernel@vger.kernel.org>
+Message-ID: <20090916212741.GA19295@us.ibm.com>
+Content-Disposition: inline
+
+
+1. The memory into which we copy 'u1@u2' needs space for u1, @,
+ u2, and a final \0 which strcat copies in.
+2. Strsep changes the value of its first argument. So use a
+ temporary variable to pass to it, so we pass the original
+ value to kfree!
+3. Allocate an extra char to user_buf, because we need a trailing \0
+ since we later kstrdup it.
+
+I am about to send out an LTP testcase for this driver, but
+in addition the correctness of the hashing can be verified as
+follows:
+
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+
+int main(int argc, char *argv[])
+{
+ char in[41], out[20];
+ unsigned int v;
+ int i, ret;
+
+ ret = read(STDIN_FILENO, in, 40);
+ if (ret != 40)
+ exit(1);
+ in[40] = '\0';
+ for (i = 0; i < 20; i++) {
+ sscanf(&in[2*i], "%02x", &v);
+ out[i] = v;
+ }
+ write(STDOUT_FILENO, out, 20);
+}
+
+as root, to test userid 501 switching to uid 0, choosing
+'random' string 'ab':
+
+echo -n "501@0" > plain
+openssl sha1 -hmac 'ab' plain |awk '{ print $2 '} > dgst
+./unhex < dgst > dgst.u
+mknod /dev/caphash 504 0
+mknod /dev/capuse 504 1
+chmod ugo+w /dev/capuse
+cat dgst.u > /dev/caphash
+
+as uid 501,
+echo "501@0@ab" > /dev/capuse
+id -u # should now show 0.
+
+Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/p9auth/p9auth.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- a/drivers/staging/p9auth/p9auth.c
++++ b/drivers/staging/p9auth/p9auth.c
+@@ -183,7 +183,7 @@ static ssize_t cap_write(struct file *fi
+ user_buf_running = NULL;
+ hash_str = NULL;
+ node_ptr = kmalloc(sizeof(struct cap_node), GFP_KERNEL);
+- user_buf = kzalloc(count, GFP_KERNEL);
++ user_buf = kzalloc(count+1, GFP_KERNEL);
+ if (!node_ptr || !user_buf)
+ goto out;
+
+@@ -207,6 +207,7 @@ static ssize_t cap_write(struct file *fi
+ list_add(&(node_ptr->list), &(dev->head->list));
+ node_ptr = NULL;
+ } else {
++ char *tmpu;
+ if (!cap_devices[0].head ||
+ list_empty(&(cap_devices[0].head->list))) {
+ retval = -EINVAL;
+@@ -218,10 +219,10 @@ static ssize_t cap_write(struct file *fi
+ * need to split it and hash 'user1@user2' using 'randomstring'
+ * as the key.
+ */
+- user_buf_running = kstrdup(user_buf, GFP_KERNEL);
+- source_user = strsep(&user_buf_running, "@");
+- target_user = strsep(&user_buf_running, "@");
+- rand_str = strsep(&user_buf_running, "@");
++ tmpu = user_buf_running = kstrdup(user_buf, GFP_KERNEL);
++ source_user = strsep(&tmpu, "@");
++ target_user = strsep(&tmpu, "@");
++ rand_str = tmpu;
+ if (!source_user || !target_user || !rand_str) {
+ retval = -EINVAL;
+ goto out;
+@@ -229,7 +230,8 @@ static ssize_t cap_write(struct file *fi
+
+ /* hash the string user1@user2 with rand_str as the key */
+ len = strlen(source_user) + strlen(target_user) + 1;
+- hash_str = kzalloc(len, GFP_KERNEL);
++ /* src, @, len, \0 */
++ hash_str = kzalloc(len+1, GFP_KERNEL);
+ strcat(hash_str, source_user);
+ strcat(hash_str, "@");
+ strcat(hash_str, target_user);
diff --git a/staging/staging-line6-driver.c-factorize-code-and-cleanups.patch b/staging/staging-line6-driver.c-factorize-code-and-cleanups.patch
new file mode 100644
index 00000000000000..5a6604f01dacd7
--- /dev/null
+++ b/staging/staging-line6-driver.c-factorize-code-and-cleanups.patch
@@ -0,0 +1,223 @@
+From frederik.deweerdt@xprog.eu Fri Oct 9 10:46:22 2009
+From: Frederik Deweerdt <frederik.deweerdt@xprog.eu>
+Date: Tue, 15 Sep 2009 09:29:43 +0000
+Subject: Staging: line6 driver.c: factorize code and cleanups
+To: Greg KH <greg@kroah.com>
+Cc: Frederik Deweerdt <frederik.deweerdt@xprog.eu>
+Message-ID: <20090915092943.GA12117@gambetta>
+Content-Disposition: inline
+
+- Factorize the code from line6_send_raw_message and line6_send_program into line6_send
+- Minor style cleanups
+
+Signed-off-by: Frederik Deweerdt <frederik.deweerdt@xprog.eu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/line6/driver.c | 103 +++++++++++++++++++++--------------------
+ 1 file changed, 54 insertions(+), 49 deletions(-)
+
+--- a/drivers/staging/line6/driver.c
++++ b/drivers/staging/line6/driver.c
+@@ -168,19 +168,19 @@ static void line6_dump_urb(struct urb *u
+ #endif
+
+ /*
+- Send raw message in pieces of wMaxPacketSize bytes.
++ Send raw message in pieces of max_packet_size bytes.
+ */
+ int line6_send_raw_message(struct usb_line6 *line6, const char *buffer,
+ int size)
+ {
+ int i, done = 0;
++ int actual_size;
+
+ #if DO_DUMP_URB_SEND
+ line6_write_hexdump(line6, 'S', buffer, size);
+ #endif
+
+- for (i = 0; i < size; i += line6->max_packet_size) {
+- int partial;
++ for (i = 0; i < size; i += actual_size) {
+ const char *frag_buf = buffer + i;
+ int frag_size = min(line6->max_packet_size, size - i);
+ int retval;
+@@ -189,7 +189,7 @@ int line6_send_raw_message(struct usb_li
+ usb_sndintpipe(line6->usbdev,
+ line6->ep_control_write),
+ (char *)frag_buf, frag_size,
+- &partial, LINE6_TIMEOUT * HZ);
++ &actual_size, LINE6_TIMEOUT * HZ);
+
+ if (retval) {
+ dev_err(line6->ifcdev,
+@@ -197,7 +197,7 @@ int line6_send_raw_message(struct usb_li
+ break;
+ }
+
+- done += frag_size;
++ done += actual_size;
+ }
+
+ return done;
+@@ -395,17 +395,44 @@ static void line6_data_received(struct u
+ line6_start_listen(line6);
+ }
+
++static int line6_send(struct usb_line6 *line6, unsigned char *buf, size_t len)
++{
++ int retval;
++ unsigned int partial;
++
++#if DO_DUMP_URB_SEND
++ line6_write_hexdump(line6, 'S', buf, len);
++#endif
++
++ retval = usb_interrupt_msg(line6->usbdev,
++ usb_sndintpipe(line6->usbdev,
++ line6->ep_control_write),
++ buf, len, &partial,
++ LINE6_TIMEOUT * HZ);
++
++ if (retval) {
++ dev_err(line6->ifcdev,
++ "usb_interrupt_msg failed (%d)\n", retval);
++ }
++
++ if (partial != len) {
++ dev_err(line6->ifcdev,
++ "usb_interrupt_msg sent partial message (%d)\n",
++ retval);
++ }
++
++ return retval;
++}
++
+ /*
+ Send channel number (i.e., switch to a different sound).
+ */
+ int line6_send_program(struct usb_line6 *line6, int value)
+ {
+- int retval;
+ unsigned char *buffer;
+- unsigned int partial;
+-
+- buffer = kmalloc(2, GFP_KERNEL);
++ size_t len = 2;
+
++ buffer = kmalloc(len, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(line6->ifcdev, "out of memory\n");
+ return -ENOMEM;
+@@ -414,20 +441,7 @@ int line6_send_program(struct usb_line6
+ buffer[0] = LINE6_PROGRAM_CHANGE | LINE6_CHANNEL_HOST;
+ buffer[1] = value;
+
+-#if DO_DUMP_URB_SEND
+- line6_write_hexdump(line6, 'S', buffer, 2);
+-#endif
+-
+- retval = usb_interrupt_msg(line6->usbdev,
+- usb_sndintpipe(line6->usbdev,
+- line6->ep_control_write),
+- buffer, 2, &partial, LINE6_TIMEOUT * HZ);
+-
+- if (retval)
+- dev_err(line6->ifcdev, "usb_interrupt_msg failed (%d)\n", retval);
+-
+- kfree(buffer);
+- return retval;
++ return line6_send(line6, buffer, len);
+ }
+
+ /*
+@@ -435,12 +449,10 @@ int line6_send_program(struct usb_line6
+ */
+ int line6_transmit_parameter(struct usb_line6 *line6, int param, int value)
+ {
+- int retval;
+ unsigned char *buffer;
+- unsigned int partial;
+-
+- buffer = kmalloc(3, GFP_KERNEL);
++ size_t len = 3;
+
++ buffer = kmalloc(len, GFP_KERNEL);
+ if (!buffer) {
+ dev_err(line6->ifcdev, "out of memory\n");
+ return -ENOMEM;
+@@ -450,19 +462,7 @@ int line6_transmit_parameter(struct usb_
+ buffer[1] = param;
+ buffer[2] = value;
+
+-#if DO_DUMP_URB_SEND
+- line6_write_hexdump(line6, 'S', buffer, 3);
+-#endif
+-
+- retval = usb_interrupt_msg(line6->usbdev,
+- usb_sndintpipe(line6->usbdev, line6->ep_control_write),
+- buffer, 3, &partial, LINE6_TIMEOUT * HZ);
+-
+- if (retval)
+- dev_err(line6->ifcdev, "usb_interrupt_msg failed (%d)\n", retval);
+-
+- kfree(buffer);
+- return retval;
++ return line6_send(line6, buffer, len);
+ }
+
+ /*
+@@ -476,8 +476,10 @@ int line6_read_data(struct usb_line6 *li
+
+ /* query the serial number: */
+ ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0), 0x67,
+- USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
+- (datalen << 8) | 0x21, address, NULL, 0, LINE6_TIMEOUT * HZ);
++ USB_TYPE_VENDOR | USB_RECIP_DEVICE
++ | USB_DIR_OUT,
++ (datalen << 8) | 0x21, address,
++ NULL, 0, LINE6_TIMEOUT * HZ);
+
+ if (ret < 0) {
+ dev_err(line6->ifcdev, "read request failed (error %d)\n", ret);
+@@ -496,9 +498,7 @@ int line6_read_data(struct usb_line6 *li
+ "receive length failed (error %d)\n", ret);
+ return ret;
+ }
+- }
+- while (len == 0xff)
+- ;
++ } while (len == 0xff);
+
+ if (len != datalen) {
+ /* should be equal or something went wrong */
+@@ -682,10 +682,14 @@ static int line6_probe(struct usb_interf
+ return -ENODEV;
+
+ /* check vendor and product id */
+- for (devtype = ARRAY_SIZE(line6_id_table) - 1; devtype--;)
+- if ((le16_to_cpu(usbdev->descriptor.idVendor) == line6_id_table[devtype].idVendor) &&
+- (le16_to_cpu(usbdev->descriptor.idProduct) == line6_id_table[devtype].idProduct))
++ for (devtype = ARRAY_SIZE(line6_id_table) - 1; devtype--;) {
++ u16 vendor = le16_to_cpu(usbdev->descriptor.idVendor);
++ u16 product = le16_to_cpu(usbdev->descriptor.idProduct);
++
++ if (vendor == line6_id_table[devtype].idVendor
++ && product == line6_id_table[devtype].idProduct)
+ break;
++ }
+
+ if (devtype < 0)
+ return -ENODEV;
+@@ -1036,9 +1040,10 @@ static void line6_disconnect(struct usb_
+
+ dev_info(&interface->dev, "Line6 %s now disconnected\n", line6->properties->name);
+
+- for (i = LINE6_MAX_DEVICES; i--;)
++ for (i = LINE6_MAX_DEVICES; i--;) {
+ if (line6_devices[i] == line6)
+ line6_devices[i] = NULL;
++ }
+ }
+
+ line6_destruct(interface);
diff --git a/usb.current/usb-gadget-imx_udc-use-resource-size.patch b/usb.current/usb-gadget-imx_udc-use-resource-size.patch
new file mode 100644
index 00000000000000..aa8d43daead98f
--- /dev/null
+++ b/usb.current/usb-gadget-imx_udc-use-resource-size.patch
@@ -0,0 +1,50 @@
+From tklauser@distanz.ch Fri Oct 9 11:01:57 2009
+From: Tobias Klauser <tklauser@distanz.ch>
+Date: Fri, 18 Sep 2009 09:14:46 +0200
+Subject: USB: gadget: imx_udc: Use resource size
+To: David Brownell <dbrownell@users.sourceforge.net>, Greg Kroah-Hartman <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org, Tobias Klauser <tklauser@distanz.ch>
+Message-ID: <1253258086-7953-1-git-send-email-tklauser@distanz.ch>
+
+
+Use the resource_size function instead of manually calculating the
+resource size. This reduces the chance of introducing off-by-one errors.
+
+Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/imx_udc.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/gadget/imx_udc.c
++++ b/drivers/usb/gadget/imx_udc.c
+@@ -1402,7 +1402,8 @@ static int __init imx_udc_probe(struct p
+ struct clk *clk;
+ void __iomem *base;
+ int ret = 0;
+- int i, res_size;
++ int i;
++ resource_size_t res_size;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+@@ -1416,7 +1417,7 @@ static int __init imx_udc_probe(struct p
+ return -ENODEV;
+ }
+
+- res_size = res->end - res->start + 1;
++ res_size = resource_size(res);
+ if (!request_mem_region(res->start, res_size, res->name)) {
+ dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n",
+ res_size, res->start);
+@@ -1527,8 +1528,7 @@ static int __exit imx_udc_remove(struct
+ clk_disable(imx_usb->clk);
+ iounmap(imx_usb->base);
+
+- release_mem_region(imx_usb->res->start,
+- imx_usb->res->end - imx_usb->res->start + 1);
++ release_mem_region(imx_usb->res->start, resource_size(imx_usb->res));
+
+ if (pdata->exit)
+ pdata->exit(&pdev->dev);
diff --git a/usb.current/usb-isp1362-fix-build-warnings-on-64-bit-systems.patch b/usb.current/usb-isp1362-fix-build-warnings-on-64-bit-systems.patch
new file mode 100644
index 00000000000000..1ebf1b9b56923e
--- /dev/null
+++ b/usb.current/usb-isp1362-fix-build-warnings-on-64-bit-systems.patch
@@ -0,0 +1,114 @@
+From vapier@gentoo.org Fri Oct 9 11:23:19 2009
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 7 Oct 2009 04:29:31 -0400
+Subject: USB: isp1362: fix build warnings on 64-bit systems
+To: linux-usb@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>
+Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Lothar Wassmann <LW@karo-electronics.de>, Stephen Rothwell <sfr@canb.auug.org.au>
+Message-ID: <1254904171-5093-1-git-send-email-vapier@gentoo.org>
+
+
+A bunch of places assumed pointers were 32-bits in size (bit checking and
+debug output), but none of these affected runtime functionality.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/isp1362-hcd.c | 18 +++++++++---------
+ drivers/usb/host/isp1362.h | 12 ++++++------
+ 2 files changed, 15 insertions(+), 15 deletions(-)
+
+--- a/drivers/usb/host/isp1362.h
++++ b/drivers/usb/host/isp1362.h
+@@ -580,7 +580,7 @@ static inline const char *ISP1362_INT_NA
+
+ static inline void ALIGNSTAT(struct isp1362_hcd *isp1362_hcd, void *ptr)
+ {
+- unsigned p = (unsigned)ptr;
++ unsigned long p = (unsigned long)ptr;
+ if (!(p & 0xf))
+ isp1362_hcd->stat16++;
+ else if (!(p & 0x7))
+@@ -770,7 +770,7 @@ static void isp1362_write_fifo(struct is
+ if (!len)
+ return;
+
+- if ((unsigned)dp & 0x1) {
++ if ((unsigned long)dp & 0x1) {
+ /* not aligned */
+ for (; len > 1; len -= 2) {
+ data = *dp++;
+@@ -962,8 +962,8 @@ static void isp1362_read_buffer(struct i
+
+ isp1362_write_diraddr(isp1362_hcd, offset, len);
+
+- DBG(3, "%s: Reading %d byte from buffer @%04x to memory @ %08x\n", __func__,
+- len, offset, (u32)buf);
++ DBG(3, "%s: Reading %d byte from buffer @%04x to memory @ %p\n",
++ __func__, len, offset, buf);
+
+ isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT);
+ _WARN_ON((isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_EOT));
+@@ -982,8 +982,8 @@ static void isp1362_write_buffer(struct
+
+ isp1362_write_diraddr(isp1362_hcd, offset, len);
+
+- DBG(3, "%s: Writing %d byte to buffer @%04x from memory @ %08x\n", __func__,
+- len, offset, (u32)buf);
++ DBG(3, "%s: Writing %d byte to buffer @%04x from memory @ %p\n",
++ __func__, len, offset, buf);
+
+ isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_EOT);
+ _WARN_ON((isp1362_read_reg16(isp1362_hcd, HCuPINT) & HCuPINT_EOT));
+--- a/drivers/usb/host/isp1362-hcd.c
++++ b/drivers/usb/host/isp1362-hcd.c
+@@ -2284,10 +2284,10 @@ static int isp1362_mem_config(struct usb
+ dev_info(hcd->self.controller, "ISP1362 Memory usage:\n");
+ dev_info(hcd->self.controller, " ISTL: 2 * %4d: %4d @ $%04x:$%04x\n",
+ istl_size / 2, istl_size, 0, istl_size / 2);
+- dev_info(hcd->self.controller, " INTL: %4d * (%3u+8): %4d @ $%04x\n",
++ dev_info(hcd->self.controller, " INTL: %4d * (%3lu+8): %4d @ $%04x\n",
+ ISP1362_INTL_BUFFERS, intl_blksize - PTD_HEADER_SIZE,
+ intl_size, istl_size);
+- dev_info(hcd->self.controller, " ATL : %4d * (%3u+8): %4d @ $%04x\n",
++ dev_info(hcd->self.controller, " ATL : %4d * (%3lu+8): %4d @ $%04x\n",
+ atl_buffers, atl_blksize - PTD_HEADER_SIZE,
+ atl_size, istl_size + intl_size);
+ dev_info(hcd->self.controller, " USED/FREE: %4d %4d\n", total,
+@@ -2677,12 +2677,12 @@ static int __devexit isp1362_remove(stru
+ DBG(0, "%s: Removing HCD\n", __func__);
+ usb_remove_hcd(hcd);
+
+- DBG(0, "%s: Unmapping data_reg @ %08x\n", __func__,
+- (u32)isp1362_hcd->data_reg);
++ DBG(0, "%s: Unmapping data_reg @ %p\n", __func__,
++ isp1362_hcd->data_reg);
+ iounmap(isp1362_hcd->data_reg);
+
+- DBG(0, "%s: Unmapping addr_reg @ %08x\n", __func__,
+- (u32)isp1362_hcd->addr_reg);
++ DBG(0, "%s: Unmapping addr_reg @ %p\n", __func__,
++ isp1362_hcd->addr_reg);
+ iounmap(isp1362_hcd->addr_reg);
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+@@ -2810,16 +2810,16 @@ static int __init isp1362_probe(struct p
+ return 0;
+
+ err6:
+- DBG(0, "%s: Freeing dev %08x\n", __func__, (u32)isp1362_hcd);
++ DBG(0, "%s: Freeing dev %p\n", __func__, isp1362_hcd);
+ usb_put_hcd(hcd);
+ err5:
+- DBG(0, "%s: Unmapping data_reg @ %08x\n", __func__, (u32)data_reg);
++ DBG(0, "%s: Unmapping data_reg @ %p\n", __func__, data_reg);
+ iounmap(data_reg);
+ err4:
+ DBG(0, "%s: Releasing mem region %08lx\n", __func__, (long unsigned int)data->start);
+ release_mem_region(data->start, resource_len(data));
+ err3:
+- DBG(0, "%s: Unmapping addr_reg @ %08x\n", __func__, (u32)addr_reg);
++ DBG(0, "%s: Unmapping addr_reg @ %p\n", __func__, addr_reg);
+ iounmap(addr_reg);
+ err2:
+ DBG(0, "%s: Releasing mem region %08lx\n", __func__, (long unsigned int)addr->start);
diff --git a/usb.current/usb-musb-make-have_clk-support-optional.patch b/usb.current/usb-musb-make-have_clk-support-optional.patch
new file mode 100644
index 00000000000000..2ffa823ef6068f
--- /dev/null
+++ b/usb.current/usb-musb-make-have_clk-support-optional.patch
@@ -0,0 +1,79 @@
+From vapier@gentoo.org Fri Oct 9 10:44:44 2009
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Wed, 16 Sep 2009 21:10:53 -0400
+Subject: USB: musb: make HAVE_CLK support optional
+To: linux-usb@vger.kernel.org, Felipe Balbi <felipe.balbi@nokia.com>
+Cc: uclinux-dist-devel@blackfin.uclinux.org, linux-kernel@vger.kernel.org, Bryan Wu <cooloney@kernel.org>
+Message-ID: <1253149853-11395-1-git-send-email-vapier@gentoo.org>
+
+
+The Blackfin port doesn't support HAVE_CLK and the musb driver works fine
+with support stubbed out, so take the existing Blackfin clk stubs and move
+them to common musb code so we can drop the Kconfig dependency.
+
+Signed-off-by: Bryan Wu <cooloney@kernel.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/Kconfig | 2 +-
+ drivers/usb/musb/blackfin.c | 1 -
+ drivers/usb/musb/musb_core.h | 7 +++++++
+ drivers/usb/musb/musb_regs.h | 9 ---------
+ 4 files changed, 8 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/musb/blackfin.c
++++ b/drivers/usb/musb/blackfin.c
+@@ -14,7 +14,6 @@
+ #include <linux/slab.h>
+ #include <linux/init.h>
+ #include <linux/list.h>
+-#include <linux/clk.h>
+ #include <linux/gpio.h>
+ #include <linux/io.h>
+
+--- a/drivers/usb/musb/Kconfig
++++ b/drivers/usb/musb/Kconfig
+@@ -8,7 +8,7 @@ comment "Enable Host or Gadget support t
+
+ # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
+ config USB_MUSB_HDRC
+- depends on (USB || USB_GADGET) && HAVE_CLK
++ depends on (USB || USB_GADGET)
+ depends on !SUPERH
+ select NOP_USB_XCEIV if ARCH_DAVINCI
+ select TWL4030_USB if MACH_OMAP_3430SDP
+--- a/drivers/usb/musb/musb_core.h
++++ b/drivers/usb/musb/musb_core.h
+@@ -95,6 +95,13 @@ struct musb_ep;
+ #endif
+ #endif /* need MUSB gadget selection */
+
++#ifndef CONFIG_HAVE_CLK
++/* Dummy stub for clk framework */
++#define clk_get(dev, id) NULL
++#define clk_put(clock) do {} while (0)
++#define clk_enable(clock) do {} while (0)
++#define clk_disable(clock) do {} while (0)
++#endif
+
+ #ifdef CONFIG_PROC_FS
+ #include <linux/fs.h>
+--- a/drivers/usb/musb/musb_regs.h
++++ b/drivers/usb/musb/musb_regs.h
+@@ -439,15 +439,6 @@ static inline void musb_write_txhubport
+ /* Not implemented - HW has seperate Tx/Rx FIFO */
+ #define MUSB_TXCSR_MODE 0x0000
+
+-/*
+- * Dummy stub for clk framework, it will be removed
+- * until Blackfin supports clk framework
+- */
+-#define clk_get(dev, id) NULL
+-#define clk_put(clock) do {} while (0)
+-#define clk_enable(clock) do {} while (0)
+-#define clk_disable(clock) do {} while (0)
+-
+ static inline void musb_write_txfifosz(void __iomem *mbase, u8 c_size)
+ {
+ }
diff --git a/usb.current/usb-option-patch-for-huawei-mobile-broadband-e270-modem.patch b/usb.current/usb-option-patch-for-huawei-mobile-broadband-e270-modem.patch
new file mode 100644
index 00000000000000..568ed61f819629
--- /dev/null
+++ b/usb.current/usb-option-patch-for-huawei-mobile-broadband-e270-modem.patch
@@ -0,0 +1,34 @@
+From rofu7@hotmail.com Fri Oct 9 10:59:05 2009
+From: Ronnie Furuskog <rofu7@hotmail.com>
+Date: Mon, 21 Sep 2009 21:20:55 +0200
+Subject: USB: option: Patch for Huawei Mobile Broadband E270+ Modem
+To: <greg@kroah.com>
+Message-ID: <BAY131-W11E86978BB7AC1D49B271CF6DD0@phx.gbl>
+
+
+From: Ronnie Furuskog <rofu7@hotmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/serial/option.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -165,6 +165,7 @@ static int option_resume(struct usb_ser
+ #define HUAWEI_PRODUCT_E143D 0x143D
+ #define HUAWEI_PRODUCT_E143E 0x143E
+ #define HUAWEI_PRODUCT_E143F 0x143F
++#define HUAWEI_PRODUCT_E14AC 0x14AC
+
+ #define QUANTA_VENDOR_ID 0x0408
+ #define QUANTA_PRODUCT_Q101 0xEA02
+@@ -425,6 +426,7 @@ static struct usb_device_id option_ids[]
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) },
++ { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC) },
+ { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) },
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */
diff --git a/usb.current/usb-option-toshiba-g450-device-id.patch b/usb.current/usb-option-toshiba-g450-device-id.patch
new file mode 100644
index 00000000000000..ba8fccdf25d52f
--- /dev/null
+++ b/usb.current/usb-option-toshiba-g450-device-id.patch
@@ -0,0 +1,35 @@
+From peter@magdina.sk Fri Oct 9 10:26:04 2009
+From: Peter Magdina <peter@magdina.sk>
+Date: Wed, 7 Oct 2009 16:22:17 +0200
+Subject: USB: option: Toshiba G450 device id
+To: Alan Stern <stern@rowland.harvard.edu>
+Cc: Josua Dietze <digidietze@draisberghof.de>, Greg KH <greg@kroah.com>, Phil Dibowitz <phil@ipom.com>, Matthew Dharm <mdharm-usb@one-eyed-alien.net>
+Message-ID: <200910071622.17336.peter@magdina.sk>
+
+
+Signed-off-by: Peter Magdina <peter@magdina.sk>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/option.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -318,6 +318,7 @@ static int option_resume(struct usb_ser
+ /* TOSHIBA PRODUCTS */
+ #define TOSHIBA_VENDOR_ID 0x0930
+ #define TOSHIBA_PRODUCT_HSDPA_MINICARD 0x1302
++#define TOSHIBA_PRODUCT_G450 0x0d45
+
+ #define ALINK_VENDOR_ID 0x1e0e
+ #define ALINK_PRODUCT_3GU 0x9200
+@@ -581,6 +582,7 @@ static struct usb_device_id option_ids[]
+ { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H21_4523) },
+ { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4515) },
+ { USB_DEVICE(QISDA_VENDOR_ID, QISDA_PRODUCT_H20_4519) },
++ { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_G450) },
+ { USB_DEVICE(TOSHIBA_VENDOR_ID, TOSHIBA_PRODUCT_HSDPA_MINICARD ) }, /* Toshiba 3G HSDPA == Novatel Expedite EU870D MiniCard */
+ { USB_DEVICE(ALINK_VENDOR_ID, 0x9000) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },
diff --git a/usb.current/usb-serial-don-t-call-release-without-attach.patch b/usb.current/usb-serial-don-t-call-release-without-attach.patch
new file mode 100644
index 00000000000000..719d0e35a0276b
--- /dev/null
+++ b/usb.current/usb-serial-don-t-call-release-without-attach.patch
@@ -0,0 +1,65 @@
+From stern@rowland.harvard.edu Fri Oct 9 10:24:31 2009
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Fri, 9 Oct 2009 12:43:12 -0400 (EDT)
+Subject: USB: serial: don't call release without attach
+To: Greg KH <greg@kroah.com>
+Message-ID: <Pine.LNX.4.44L0.0910091242120.3007-100000@iolanthe.rowland.org>
+
+
+This patch (as1295) fixes a recently-added bug in the USB serial core.
+If certain kinds of errors occur during probing, the core may call a
+serial driver's release method without previously calling the attach
+method. This causes some drivers (io_ti in particular) to perform an
+invalid memory access.
+
+The patch adds a new flag to keep track of whether or not attach has
+been called.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Jean-Denis Girard <jd.girard@sysnux.pf>
+CC: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/usb-serial.c | 6 +++++-
+ include/linux/usb/serial.h | 1 +
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/usb-serial.c
++++ b/drivers/usb/serial/usb-serial.c
+@@ -156,7 +156,8 @@ static void destroy_serial(struct kref *
+ if (serial->minor != SERIAL_TTY_NO_MINOR)
+ return_serial(serial);
+
+- serial->type->release(serial);
++ if (serial->attached)
++ serial->type->release(serial);
+
+ /* Now that nothing is using the ports, they can be freed */
+ for (i = 0; i < serial->num_port_pointers; ++i) {
+@@ -1059,12 +1060,15 @@ int usb_serial_probe(struct usb_interfac
+ module_put(type->driver.owner);
+ if (retval < 0)
+ goto probe_error;
++ serial->attached = 1;
+ if (retval > 0) {
+ /* quietly accept this device, but don't bind to a
+ serial port as it's about to disappear */
+ serial->num_ports = 0;
+ goto exit;
+ }
++ } else {
++ serial->attached = 1;
+ }
+
+ if (get_free_serial(serial, num_ports, &minor) == NULL) {
+--- a/include/linux/usb/serial.h
++++ b/include/linux/usb/serial.h
+@@ -150,6 +150,7 @@ struct usb_serial {
+ struct usb_interface *interface;
+ unsigned char disconnected:1;
+ unsigned char suspending:1;
++ unsigned char attached:1;
+ unsigned char minor;
+ unsigned char num_ports;
+ unsigned char num_port_pointers;
diff --git a/usb.current/usb-serial-sierra-driver-version-change-to-1.3.8.patch b/usb.current/usb-serial-sierra-driver-version-change-to-1.3.8.patch
new file mode 100644
index 00000000000000..353bcfe0d04fc1
--- /dev/null
+++ b/usb.current/usb-serial-sierra-driver-version-change-to-1.3.8.patch
@@ -0,0 +1,33 @@
+From epasheva@sierrawireless.com Fri Oct 9 11:01:26 2009
+From: Elina Pasheva <epasheva@sierrawireless.com>
+Date: Thu, 17 Sep 2009 15:26:20 -0700
+Subject: USB: serial: sierra driver version change to 1.3.8
+To: "gregkh@suse.de" <gregkh@suse.de>
+Cc: <epasheva@sierrawireless.com>, <rfiler@sierrawireless.com>, Oliver Neukum <oliver@neukum.org>
+Message-ID: <1253226380.23934.4.camel@Linuxdev3>
+
+
+Subject: [PATCH 001/001] USB: serial: sierra driver version change to 1.3.8
+From: Elina Pasheva <epasheva@sierrawireless.com>
+
+Updated sierra driver version from 1.3.7 to 1.3.8 now that the autosuspend
+capabilities were added to the driver.
+
+Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/sierra.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/sierra.c
++++ b/drivers/usb/serial/sierra.c
+@@ -17,7 +17,7 @@
+ Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
+ */
+
+-#define DRIVER_VERSION "v.1.3.7"
++#define DRIVER_VERSION "v.1.3.8"
+ #define DRIVER_AUTHOR "Kevin Lloyd, Elina Pasheva, Matthew Safar, Rory Filer"
+ #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"
+
diff --git a/usb.current/usb-storage-iriver-p7-unusual_dev-patch.patch b/usb.current/usb-storage-iriver-p7-unusual_dev-patch.patch
new file mode 100644
index 00000000000000..75b51340002146
--- /dev/null
+++ b/usb.current/usb-storage-iriver-p7-unusual_dev-patch.patch
@@ -0,0 +1,33 @@
+From dfo@antex.ru Fri Oct 9 11:00:36 2009
+From: Sergey Pinaev <dfo@antex.ru>
+Date: Thu, 17 Sep 2009 17:26:50 +0400
+Subject: USB: storage: iRiver P7 UNUSUAL_DEV patch
+To: Phil Dibowitz <phil@ipom.com>
+Cc: linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net
+Message-ID: <20090917172650.125b356f.dfo@antex.ru>
+
+
+From: Sergey Pinaev <dfo@antex.ru>
+Signed-off-by: Phil Dibowitz <phil@ipom.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/unusual_devs.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -1823,6 +1823,13 @@ UNUSUAL_DEV( 0x4102, 0x1020, 0x0100, 0
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_IGNORE_RESIDUE ),
+
++/* Reported by Sergey Pinaev <dfo@antex.ru> */
++UNUSUAL_DEV( 0x4102, 0x1059, 0x0000, 0x0000,
++ "iRiver",
++ "P7K",
++ US_SC_DEVICE, US_PR_DEVICE, NULL,
++ US_FL_MAX_SECTORS_64 ),
++
+ /*
+ * David Härdeman <david@2gen.com>
+ * The key makes the SCSI stack print confusing (but harmless) messages
diff --git a/usb.current/usb-usblcd-fix-memory-leak.patch b/usb.current/usb-usblcd-fix-memory-leak.patch
new file mode 100644
index 00000000000000..564117394d2328
--- /dev/null
+++ b/usb.current/usb-usblcd-fix-memory-leak.patch
@@ -0,0 +1,33 @@
+From jirislaby@gmail.com Fri Oct 9 10:25:05 2009
+From: Jiri Slaby <jirislaby@gmail.com>
+Date: Wed, 23 Sep 2009 16:09:56 +0200
+Subject: USB: usblcd, fix memory leak
+To: gregkh@suse.de
+Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>
+Message-ID: <1253714996-6495-1-git-send-email-jirislaby@gmail.com>
+
+
+Stanse found a memory leak in lcd_probe. Instead of returning without
+releasing the memory, jump to the error label which frees it.
+
+http://stanse.fi.muni.cz/
+
+Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/misc/usblcd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/misc/usblcd.c
++++ b/drivers/usb/misc/usblcd.c
+@@ -313,7 +313,8 @@ static int lcd_probe(struct usb_interfac
+
+ if (le16_to_cpu(dev->udev->descriptor.idProduct) != 0x0001) {
+ dev_warn(&interface->dev, "USBLCD model not supported.\n");
+- return -ENODEV;
++ retval = -ENODEV;
++ goto error;
+ }
+
+ /* set up the endpoint information */
diff --git a/usb.current/usb-usbtmc-fix-timeout-increase.patch b/usb.current/usb-usbtmc-fix-timeout-increase.patch
new file mode 100644
index 00000000000000..f4db4a21a2a320
--- /dev/null
+++ b/usb.current/usb-usbtmc-fix-timeout-increase.patch
@@ -0,0 +1,32 @@
+From imrehg@gmail.com Fri Oct 9 10:32:19 2009
+From: Gergely Imreh <imrehg@gmail.com>
+Date: Tue, 15 Sep 2009 16:03:31 +0800
+Subject: USB: usbtmc: fix timeout increase
+To: Greg KH <greg@kroah.com>
+Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
+Message-ID: <371b60070909150103t2e2058f5ua819ab3300d47144@mail.gmail.com>
+
+From: Gergely Imreh <imrehg@gmail.com>
+
+The current 10ms timeout is too short for some normal USBTMC device
+operation, increase it to a value which was tested with previously
+affected Tektronix oscilloscopes.
+
+Signed-off-by: Gergely Imreh <imrehg@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/class/usbtmc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/class/usbtmc.c
++++ b/drivers/usb/class/usbtmc.c
+@@ -39,7 +39,7 @@
+ #define USBTMC_SIZE_IOBUFFER 2048
+
+ /* Default USB timeout (in milliseconds) */
+-#define USBTMC_TIMEOUT 10
++#define USBTMC_TIMEOUT 5000
+
+ /*
+ * Maximum number of read cycles to empty bulk in endpoint during CLEAR and
diff --git a/usb.current/usb-xhci-don-t-wait-for-a-disable-slot-cmd-when-hc-dies.patch b/usb.current/usb-xhci-don-t-wait-for-a-disable-slot-cmd-when-hc-dies.patch
new file mode 100644
index 00000000000000..2300ea4238cace
--- /dev/null
+++ b/usb.current/usb-xhci-don-t-wait-for-a-disable-slot-cmd-when-hc-dies.patch
@@ -0,0 +1,47 @@
+From sarah.a.sharp@linux.intel.com Fri Oct 9 10:38:51 2009
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Wed, 16 Sep 2009 16:42:39 -0700
+Subject: USB: xhci: Don't wait for a disable slot cmd when HC dies.
+To: Greg KH <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org
+Message-ID: <20090916234239.GA16810@xanatos>
+Content-Disposition: inline
+
+
+When the host controller dies or is removed while a device is plugged in,
+the USB core will attempt to deallocate the struct usb_device. That will
+call into xhci_free_dev(). This function used to attempt to submit a
+disable slot command to the host controller and clean up the device
+structures when that command returned. Change xhci_free_dev() to skip the
+command submission and just free the memory if the host controller died.
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci-hcd.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/usb/host/xhci-hcd.c
++++ b/drivers/usb/host/xhci-hcd.c
+@@ -1428,11 +1428,20 @@ void xhci_free_dev(struct usb_hcd *hcd,
+ {
+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+ unsigned long flags;
++ u32 state;
+
+ if (udev->slot_id == 0)
+ return;
+
+ spin_lock_irqsave(&xhci->lock, flags);
++ /* Don't disable the slot if the host controller is dead. */
++ state = xhci_readl(xhci, &xhci->op_regs->status);
++ if (state == 0xffffffff) {
++ xhci_free_virt_device(xhci, udev->slot_id);
++ spin_unlock_irqrestore(&xhci->lock, flags);
++ return;
++ }
++
+ if (xhci_queue_slot_control(xhci, TRB_DISABLE_SLOT, udev->slot_id)) {
+ spin_unlock_irqrestore(&xhci->lock, flags);
+ xhci_dbg(xhci, "FIXME: allocate a command ring segment\n");
diff --git a/usb.current/usb-xhci-fix-dropping-endpoints-from-the-xhc-schedule.patch b/usb.current/usb-xhci-fix-dropping-endpoints-from-the-xhc-schedule.patch
new file mode 100644
index 00000000000000..f58d1b7b2419b5
--- /dev/null
+++ b/usb.current/usb-xhci-fix-dropping-endpoints-from-the-xhc-schedule.patch
@@ -0,0 +1,31 @@
+From sarah.a.sharp@linux.intel.com Fri Oct 9 10:39:12 2009
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Fri, 18 Sep 2009 08:55:12 -0700
+Subject: USB: xhci: Fix dropping endpoints from the xHC schedule.
+To: Greg KH <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org
+Message-ID: <20090918155512.GA3876@xanatos>
+Content-Disposition: inline
+
+
+When an endpoint is to be dropped from the hardware bandwidth schedule, we
+want to clear its add flag.
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci-hcd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-hcd.c
++++ b/drivers/usb/host/xhci-hcd.c
+@@ -895,7 +895,7 @@ int xhci_drop_endpoint(struct usb_hcd *h
+ ctrl_ctx->drop_flags |= drop_flag;
+ new_drop_flags = ctrl_ctx->drop_flags;
+
+- ctrl_ctx->add_flags = ~drop_flag;
++ ctrl_ctx->add_flags &= ~drop_flag;
+ new_add_flags = ctrl_ctx->add_flags;
+
+ last_ctx = xhci_last_valid_endpoint(ctrl_ctx->add_flags);
diff --git a/usb.current/usb-xhci-handle-canceled-urbs-when-hc-dies.patch b/usb.current/usb-xhci-handle-canceled-urbs-when-hc-dies.patch
new file mode 100644
index 00000000000000..5c5dc35ca58453
--- /dev/null
+++ b/usb.current/usb-xhci-handle-canceled-urbs-when-hc-dies.patch
@@ -0,0 +1,55 @@
+From sarah.a.sharp@linux.intel.com Fri Oct 9 10:38:36 2009
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Mon, 28 Sep 2009 17:21:37 -0700
+Subject: USB: xhci: Handle canceled URBs when HC dies.
+To: Greg KH <gregkh@suse.de>
+Cc: Oliver Neukum <oliver@neukum.org>, linux-usb@vger.kernel.org
+Message-ID: <20090929002137.GA7755@gamba.jf.intel.com>
+Content-Disposition: inline
+
+
+When the host controller dies (e.g. it is removed from a PCI card slot),
+the xHCI driver cannot expect commands to complete. The buggy code this
+patch fixes would mark an URB as canceled and then expect the URB to be
+completed when the stop endpoint command completed. That would never
+happen if the host controller was dead, so the USB core would just hang in
+the disconnect code.
+
+If the host controller died, and the driver asks to cancel an URB, free
+any structures associated with that URB and immediately give it back.
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci-hcd.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/drivers/usb/host/xhci-hcd.c
++++ b/drivers/usb/host/xhci-hcd.c
+@@ -782,6 +782,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd
+ {
+ unsigned long flags;
+ int ret;
++ u32 temp;
+ struct xhci_hcd *xhci;
+ struct xhci_td *td;
+ unsigned int ep_index;
+@@ -794,6 +795,17 @@ int xhci_urb_dequeue(struct usb_hcd *hcd
+ ret = usb_hcd_check_unlink_urb(hcd, urb, status);
+ if (ret || !urb->hcpriv)
+ goto done;
++ temp = xhci_readl(xhci, &xhci->op_regs->status);
++ if (temp == 0xffffffff) {
++ xhci_dbg(xhci, "HW died, freeing TD.\n");
++ td = (struct xhci_td *) urb->hcpriv;
++
++ usb_hcd_unlink_urb_from_ep(hcd, urb);
++ spin_unlock_irqrestore(&xhci->lock, flags);
++ usb_hcd_giveback_urb(xhci_to_hcd(xhci), urb, -ESHUTDOWN);
++ kfree(td);
++ return ret;
++ }
+
+ xhci_dbg(xhci, "Cancel URB %p\n", urb);
+ xhci_dbg(xhci, "Event ring:\n");
diff --git a/usb.current/usb-xhci-stop-debugging-polling-loop-when-hc-dies.patch b/usb.current/usb-xhci-stop-debugging-polling-loop-when-hc-dies.patch
new file mode 100644
index 00000000000000..1de437043a8856
--- /dev/null
+++ b/usb.current/usb-xhci-stop-debugging-polling-loop-when-hc-dies.patch
@@ -0,0 +1,35 @@
+From sarah.a.sharp@linux.intel.com Fri Oct 9 10:38:18 2009
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Wed, 16 Sep 2009 16:42:30 -0700
+Subject: USB: xhci: Stop debugging polling loop when HC dies.
+To: Greg KH <gregkh@suse.de>
+Cc: linux-usb@vger.kernel.org
+Message-ID: <20090916234230.GA16784@xanatos>
+Content-Disposition: inline
+
+
+If the host controller card is removed from the system, stop the timer
+function to debug the xHCI rings.
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci-hcd.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/usb/host/xhci-hcd.c
++++ b/drivers/usb/host/xhci-hcd.c
+@@ -335,6 +335,12 @@ void xhci_event_ring_work(unsigned long
+ spin_lock_irqsave(&xhci->lock, flags);
+ temp = xhci_readl(xhci, &xhci->op_regs->status);
+ xhci_dbg(xhci, "op reg status = 0x%x\n", temp);
++ if (temp == 0xffffffff) {
++ xhci_dbg(xhci, "HW died, polling stopped.\n");
++ spin_unlock_irqrestore(&xhci->lock, flags);
++ return;
++ }
++
+ temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
+ xhci_dbg(xhci, "ir_set 0 pending = 0x%x\n", temp);
+ xhci_dbg(xhci, "No-op commands handled = %d\n", xhci->noops_handled);
diff --git a/usb/usb-add-support-for-xilinx-usb-host-controller.patch b/usb/usb-add-support-for-xilinx-usb-host-controller.patch
new file mode 100644
index 00000000000000..4a4e8b920058b2
--- /dev/null
+++ b/usb/usb-add-support-for-xilinx-usb-host-controller.patch
@@ -0,0 +1,393 @@
+From julie.zhu@xilinx.com Fri Oct 9 10:35:19 2009
+From: Julie Zhu <julie.zhu@xilinx.com>
+Date: Mon, 21 Sep 2009 16:08:19 -0600
+Subject: USB: Add support for Xilinx USB host controller
+To: john.linn@xilinx.com, jwboyer@linux.vnet.ibm.com, greg@kroah.com, linuxppc-dev@ozlabs.org, linux-usb@vger.kernel.org, grant.likely@secretlab.ca, benh@kernel.crashing.org
+Cc: Julie Zhu <julie.zhu@xilinx.com>
+Message-ID: <20090921220815.D63D854004B@mail96-sin.bigfish.com>
+
+
+Add bus glue driver for Xilinx USB host controller. The controller can be
+configured as HS only or HS/FS hybrid. The driver uses the device tree file
+to configure the driver according to the setting in the hardware system.
+
+This driver has been tested with usbtest using the NET2280 PCI card.
+
+Signed-off-by: Julie Zhu <julie.zhu@xilinx.com>
+Signed-off-by: John Linn <john.linn@xilinx.com>
+Acked-by: Grant Likely <grant.likely@secretlab.ca>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ Documentation/powerpc/dts-bindings/xilinx.txt | 11
+ drivers/usb/host/Kconfig | 15 +
+ drivers/usb/host/ehci-hcd.c | 5
+ drivers/usb/host/ehci-xilinx-of.c | 300 ++++++++++++++++++++++++++
+ 4 files changed, 329 insertions(+), 2 deletions(-)
+
+--- a/Documentation/powerpc/dts-bindings/xilinx.txt
++++ b/Documentation/powerpc/dts-bindings/xilinx.txt
+@@ -292,4 +292,15 @@
+ - reg-offset : A value of 3 is required
+ - reg-shift : A value of 2 is required
+
++ vii) Xilinx USB Host controller
++
++ The Xilinx USB host controller is EHCI compatible but with a different
++ base address for the EHCI registers, and it is always a big-endian
++ USB Host controller. The hardware can be configured as high speed only,
++ or high speed/full speed hybrid.
++
++ Required properties:
++ - xlnx,support-usb-fs: A value 0 means the core is built as high speed
++ only. A value 1 means the core also supports
++ full speed devices.
+
+--- a/drivers/usb/host/ehci-hcd.c
++++ b/drivers/usb/host/ehci-hcd.c
+@@ -1118,6 +1118,11 @@ MODULE_LICENSE ("GPL");
+ #define OF_PLATFORM_DRIVER ehci_hcd_ppc_of_driver
+ #endif
+
++#ifdef CONFIG_XPS_USB_HCD_XILINX
++#include "ehci-xilinx-of.c"
++#define OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver
++#endif
++
+ #ifdef CONFIG_PLAT_ORION
+ #include "ehci-orion.c"
+ #define PLATFORM_DRIVER ehci_orion_driver
+--- /dev/null
++++ b/drivers/usb/host/ehci-xilinx-of.c
+@@ -0,0 +1,300 @@
++/*
++ * EHCI HCD (Host Controller Driver) for USB.
++ *
++ * Bus Glue for Xilinx EHCI core on the of_platform bus
++ *
++ * Copyright (c) 2009 Xilinx, Inc.
++ *
++ * Based on "ehci-ppc-of.c" by Valentine Barshak <vbarshak@ru.mvista.com>
++ * and "ehci-ppc-soc.c" by Stefan Roese <sr@denx.de>
++ * and "ohci-ppc-of.c" by Sylvain Munaut <tnt@246tNt.com>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software Foundation,
++ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#include <linux/signal.h>
++
++#include <linux/of.h>
++#include <linux/of_platform.h>
++
++/**
++ * ehci_xilinx_of_setup - Initialize the device for ehci_reset()
++ * @hcd: Pointer to the usb_hcd device to which the host controller bound
++ *
++ * called during probe() after chip reset completes.
++ */
++static int ehci_xilinx_of_setup(struct usb_hcd *hcd)
++{
++ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
++ int retval;
++
++ retval = ehci_halt(ehci);
++ if (retval)
++ return retval;
++
++ retval = ehci_init(hcd);
++ if (retval)
++ return retval;
++
++ ehci->sbrn = 0x20;
++
++ return ehci_reset(ehci);
++}
++
++/**
++ * ehci_xilinx_port_handed_over - hand the port out if failed to enable it
++ * @hcd: Pointer to the usb_hcd device to which the host controller bound
++ * @portnum:Port number to which the device is attached.
++ *
++ * This function is used as a place to tell the user that the Xilinx USB host
++ * controller does support LS devices. And in an HS only configuration, it
++ * does not support FS devices either. It is hoped that this can help a
++ * confused user.
++ *
++ * There are cases when the host controller fails to enable the port due to,
++ * for example, insufficient power that can be supplied to the device from
++ * the USB bus. In those cases, the messages printed here are not helpful.
++ */
++static int ehci_xilinx_port_handed_over(struct usb_hcd *hcd, int portnum)
++{
++ dev_warn(hcd->self.controller, "port %d cannot be enabled\n", portnum);
++ if (hcd->has_tt) {
++ dev_warn(hcd->self.controller,
++ "Maybe you have connected a low speed device?\n");
++
++ dev_warn(hcd->self.controller,
++ "We do not support low speed devices\n");
++ } else {
++ dev_warn(hcd->self.controller,
++ "Maybe your device is not a high speed device?\n");
++ dev_warn(hcd->self.controller,
++ "The USB host controller does not support full speed "
++ "nor low speed devices\n");
++ dev_warn(hcd->self.controller,
++ "You can reconfigure the host controller to have "
++ "full speed support\n");
++ }
++
++ return 0;
++}
++
++
++static const struct hc_driver ehci_xilinx_of_hc_driver = {
++ .description = hcd_name,
++ .product_desc = "OF EHCI",
++ .hcd_priv_size = sizeof(struct ehci_hcd),
++
++ /*
++ * generic hardware linkage
++ */
++ .irq = ehci_irq,
++ .flags = HCD_MEMORY | HCD_USB2,
++
++ /*
++ * basic lifecycle operations
++ */
++ .reset = ehci_xilinx_of_setup,
++ .start = ehci_run,
++ .stop = ehci_stop,
++ .shutdown = ehci_shutdown,
++
++ /*
++ * managing i/o requests and associated device resources
++ */
++ .urb_enqueue = ehci_urb_enqueue,
++ .urb_dequeue = ehci_urb_dequeue,
++ .endpoint_disable = ehci_endpoint_disable,
++
++ /*
++ * scheduling support
++ */
++ .get_frame_number = ehci_get_frame,
++
++ /*
++ * root hub support
++ */
++ .hub_status_data = ehci_hub_status_data,
++ .hub_control = ehci_hub_control,
++#ifdef CONFIG_PM
++ .bus_suspend = ehci_bus_suspend,
++ .bus_resume = ehci_bus_resume,
++#endif
++ .relinquish_port = NULL,
++ .port_handed_over = ehci_xilinx_port_handed_over,
++
++ .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
++};
++
++/**
++ * ehci_hcd_xilinx_of_probe - Probe method for the USB host controller
++ * @op: pointer to the of_device to which the host controller bound
++ * @match: pointer to of_device_id structure, not used
++ *
++ * This function requests resources and sets up appropriate properties for the
++ * host controller. Because the Xilinx USB host controller can be configured
++ * as HS only or HS/FS only, it checks the configuration in the device tree
++ * entry, and sets an appropriate value for hcd->has_tt.
++ */
++static int __devinit
++ehci_hcd_xilinx_of_probe(struct of_device *op, const struct of_device_id *match)
++{
++ struct device_node *dn = op->node;
++ struct usb_hcd *hcd;
++ struct ehci_hcd *ehci;
++ struct resource res;
++ int irq;
++ int rv;
++ int *value;
++
++ if (usb_disabled())
++ return -ENODEV;
++
++ dev_dbg(&op->dev, "initializing XILINX-OF USB Controller\n");
++
++ rv = of_address_to_resource(dn, 0, &res);
++ if (rv)
++ return rv;
++
++ hcd = usb_create_hcd(&ehci_xilinx_of_hc_driver, &op->dev,
++ "XILINX-OF USB");
++ if (!hcd)
++ return -ENOMEM;
++
++ hcd->rsrc_start = res.start;
++ hcd->rsrc_len = res.end - res.start + 1;
++
++ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
++ printk(KERN_ERR __FILE__ ": request_mem_region failed\n");
++ rv = -EBUSY;
++ goto err_rmr;
++ }
++
++ irq = irq_of_parse_and_map(dn, 0);
++ if (irq == NO_IRQ) {
++ printk(KERN_ERR __FILE__ ": irq_of_parse_and_map failed\n");
++ rv = -EBUSY;
++ goto err_irq;
++ }
++
++ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
++ if (!hcd->regs) {
++ printk(KERN_ERR __FILE__ ": ioremap failed\n");
++ rv = -ENOMEM;
++ goto err_ioremap;
++ }
++
++ ehci = hcd_to_ehci(hcd);
++
++ /* This core always has big-endian register interface and uses
++ * big-endian memory descriptors.
++ */
++ ehci->big_endian_mmio = 1;
++ ehci->big_endian_desc = 1;
++
++ /* Check whether the FS support option is selected in the hardware.
++ */
++ value = (int *)of_get_property(dn, "xlnx,support-usb-fs", NULL);
++ if (value && (*value == 1)) {
++ ehci_dbg(ehci, "USB host controller supports FS devices\n");
++ hcd->has_tt = 1;
++ } else {
++ ehci_dbg(ehci,
++ "USB host controller is HS only\n");
++ hcd->has_tt = 0;
++ }
++
++ /* Debug registers are at the first 0x100 region
++ */
++ ehci->caps = hcd->regs + 0x100;
++ ehci->regs = hcd->regs + 0x100 +
++ HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
++
++ /* cache this readonly data; minimize chip reads */
++ ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
++
++ rv = usb_add_hcd(hcd, irq, 0);
++ if (rv == 0)
++ return 0;
++
++ iounmap(hcd->regs);
++
++err_ioremap:
++err_irq:
++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
++err_rmr:
++ usb_put_hcd(hcd);
++
++ return rv;
++}
++
++/**
++ * ehci_hcd_xilinx_of_remove - shutdown hcd and release resources
++ * @op: pointer to of_device structure that is to be removed
++ *
++ * Remove the hcd structure, and release resources that has been requested
++ * during probe.
++ */
++static int ehci_hcd_xilinx_of_remove(struct of_device *op)
++{
++ struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
++ dev_set_drvdata(&op->dev, NULL);
++
++ dev_dbg(&op->dev, "stopping XILINX-OF USB Controller\n");
++
++ usb_remove_hcd(hcd);
++
++ iounmap(hcd->regs);
++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
++
++ usb_put_hcd(hcd);
++
++ return 0;
++}
++
++/**
++ * ehci_hcd_xilinx_of_shutdown - shutdown the hcd
++ * @op: pointer to of_device structure that is to be removed
++ *
++ * Properly shutdown the hcd, call driver's shutdown routine.
++ */
++static int ehci_hcd_xilinx_of_shutdown(struct of_device *op)
++{
++ struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
++
++ if (hcd->driver->shutdown)
++ hcd->driver->shutdown(hcd);
++
++ return 0;
++}
++
++
++static struct of_device_id ehci_hcd_xilinx_of_match[] = {
++ {.compatible = "xlnx,xps-usb-host-1.00.a",},
++ {},
++};
++MODULE_DEVICE_TABLE(of, ehci_hcd_xilinx_of_match);
++
++static struct of_platform_driver ehci_hcd_xilinx_of_driver = {
++ .name = "xilinx-of-ehci",
++ .match_table = ehci_hcd_xilinx_of_match,
++ .probe = ehci_hcd_xilinx_of_probe,
++ .remove = ehci_hcd_xilinx_of_remove,
++ .shutdown = ehci_hcd_xilinx_of_shutdown,
++ .driver = {
++ .name = "xilinx-of-ehci",
++ .owner = THIS_MODULE,
++ },
++};
+--- a/drivers/usb/host/Kconfig
++++ b/drivers/usb/host/Kconfig
+@@ -90,14 +90,25 @@ config USB_EHCI_TT_NEWSCHED
+
+ config USB_EHCI_BIG_ENDIAN_MMIO
+ bool
+- depends on USB_EHCI_HCD && (PPC_CELLEB || PPC_PS3 || 440EPX || ARCH_IXP4XX)
++ depends on USB_EHCI_HCD && (PPC_CELLEB || PPC_PS3 || 440EPX || ARCH_IXP4XX || XPS_USB_HCD_XILINX)
+ default y
+
+ config USB_EHCI_BIG_ENDIAN_DESC
+ bool
+- depends on USB_EHCI_HCD && (440EPX || ARCH_IXP4XX)
++ depends on USB_EHCI_HCD && (440EPX || ARCH_IXP4XX || XPS_USB_HCD_XILINX)
+ default y
+
++config XPS_USB_HCD_XILINX
++ bool "Use Xilinx usb host EHCI controller core"
++ depends on USB_EHCI_HCD && (PPC32 || MICROBLAZE)
++ select USB_EHCI_BIG_ENDIAN_DESC
++ select USB_EHCI_BIG_ENDIAN_MMIO
++ ---help---
++ Xilinx xps USB host controller core is EHCI compilant and has
++ transaction translator built-in. It can be configured to either
++ support both high speed and full speed devices, or high speed
++ devices only.
++
+ config USB_EHCI_FSL
+ bool "Support for Freescale on-chip EHCI USB controller"
+ depends on USB_EHCI_HCD && FSL_SOC
diff --git a/usb/usb-convert-a-dev_info-to-a-dev_dbg.patch b/usb/usb-convert-a-dev_info-to-a-dev_dbg.patch
new file mode 100644
index 00000000000000..45da7687138510
--- /dev/null
+++ b/usb/usb-convert-a-dev_info-to-a-dev_dbg.patch
@@ -0,0 +1,33 @@
+From matthew@wil.cx Fri Oct 9 10:52:24 2009
+From: Matthew Wilcox <matthew@wil.cx>
+Date: Thu, 24 Sep 2009 16:18:27 -0600
+Subject: USB: Convert a dev_info to a dev_dbg
+To: Alan Stern <stern@rowland.harvard.edu>
+Cc: linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org
+Message-ID: <20090924221827.GB7943@parisc-linux.org>
+Content-Disposition: inline
+
+
+From: Matthew Wilcox <willy@linux.intel.com>
+
+Knowing which configuration was chosen is a debugging aid more than it
+is informational.
+
+Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/generic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/core/generic.c
++++ b/drivers/usb/core/generic.c
+@@ -139,7 +139,7 @@ int usb_choose_configuration(struct usb_
+
+ if (best) {
+ i = best->desc.bConfigurationValue;
+- dev_info(&udev->dev,
++ dev_dbg(&udev->dev,
+ "configuration #%d chosen from %d choice%s\n",
+ i, num_configs, plural(num_configs));
+ } else {
diff --git a/usb/usb-ehci-hub-remove-redundant-ehci-debug-check.patch b/usb/usb-ehci-hub-remove-redundant-ehci-debug-check.patch
new file mode 100644
index 00000000000000..234087c3f50881
--- /dev/null
+++ b/usb/usb-ehci-hub-remove-redundant-ehci-debug-check.patch
@@ -0,0 +1,30 @@
+From jason.wessel@windriver.com Fri Oct 9 10:49:56 2009
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Wed, 23 Sep 2009 18:32:44 -0500
+Subject: USB: ehci-hub: Remove redundant ehci->debug check
+To: gregkh@suse.de
+Cc: linux-usb@vger.kernel.org, stern@rowland.harvard.edu, Jason Wessel <jason.wessel@windriver.com>
+Message-ID: <1253748764-12317-2-git-send-email-jason.wessel@windriver.com>
+
+
+No need to check ehci->debug twice.
+
+Found-by: Sergei Shtylyov sshtylyov@ru.mvista.com
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-hub.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/ehci-hub.c
++++ b/drivers/usb/host/ehci-hub.c
+@@ -236,7 +236,7 @@ static int ehci_bus_resume (struct usb_h
+ }
+
+ if (unlikely(ehci->debug)) {
+- if (ehci->debug && !dbgp_reset_prep())
++ if (!dbgp_reset_prep())
+ ehci->debug = NULL;
+ else
+ dbgp_external_startup();
diff --git a/usb/usb-storage-make-driver-less-chatty-when-it-finds-a-new-device.patch b/usb/usb-storage-make-driver-less-chatty-when-it-finds-a-new-device.patch
new file mode 100644
index 00000000000000..0a5f79b3b25113
--- /dev/null
+++ b/usb/usb-storage-make-driver-less-chatty-when-it-finds-a-new-device.patch
@@ -0,0 +1,67 @@
+From matthew@wil.cx Fri Oct 9 10:53:22 2009
+From: Matthew Wilcox <matthew@wil.cx>
+Date: Thu, 24 Sep 2009 16:19:49 -0600
+Subject: USB Storage: Make driver less chatty when it finds a new device
+To: Alan Stern <stern@rowland.harvard.edu>
+Cc: linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org
+Message-ID: <20090924221949.GD7943@parisc-linux.org>
+Content-Disposition: inline
+
+
+From: Matthew Wilcox <willy@linux.intel.com>
+
+Use dev_dbg() instead of an unconditional printk(KERN_DEBUG). This has
+two benefits; one is that it identifies the USB device which the messages
+related to, and the other is that the messages won't be produced unless
+debug is turned on.
+
+Enable the debug messages when CONFIG_USB_STORAGE_DEBUG is set.
+
+Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/usb.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/storage/usb.c
++++ b/drivers/usb/storage/usb.c
+@@ -45,6 +45,10 @@
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
++#ifdef CONFIG_USB_STORAGE_DEBUG
++#define DEBUG
++#endif
++
+ #include <linux/sched.h>
+ #include <linux/errno.h>
+ #include <linux/freezer.h>
+@@ -808,14 +812,13 @@ static int usb_stor_scan_thread(void * _
+ {
+ struct us_data *us = (struct us_data *)__us;
+
+- printk(KERN_DEBUG
+- "usb-storage: device found at %d\n", us->pusb_dev->devnum);
++ dev_dbg(&us->pusb_intf->dev, "device found\n");
+
+ set_freezable();
+ /* Wait for the timeout to expire or for a disconnect */
+ if (delay_use > 0) {
+- printk(KERN_DEBUG "usb-storage: waiting for device "
+- "to settle before scanning\n");
++ dev_dbg(&us->pusb_intf->dev, "waiting for device to settle "
++ "before scanning\n");
+ wait_event_freezable_timeout(us->delay_wait,
+ test_bit(US_FLIDX_DONT_SCAN, &us->dflags),
+ delay_use * HZ);
+@@ -832,7 +835,7 @@ static int usb_stor_scan_thread(void * _
+ mutex_unlock(&us->dev_mutex);
+ }
+ scsi_scan_host(us_to_host(us));
+- printk(KERN_DEBUG "usb-storage: device scan complete\n");
++ dev_dbg(&us->pusb_intf->dev, "scan complete\n");
+
+ /* Should we unbind if no devices were detected? */
+ }
diff --git a/usb/usb-usb-storage-associate-the-name-of-the-interface-with-the-scsi-host.patch b/usb/usb-usb-storage-associate-the-name-of-the-interface-with-the-scsi-host.patch
new file mode 100644
index 00000000000000..1eae7fc4c9ec0a
--- /dev/null
+++ b/usb/usb-usb-storage-associate-the-name-of-the-interface-with-the-scsi-host.patch
@@ -0,0 +1,56 @@
+From matthew@wil.cx Fri Oct 9 10:52:49 2009
+From: Matthew Wilcox <matthew@wil.cx>
+Date: Thu, 24 Sep 2009 16:19:11 -0600
+Subject: USB: usb-storage: Associate the name of the interface with the scsi host
+To: Alan Stern <stern@rowland.harvard.edu>
+Cc: linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org
+Message-ID: <20090924221911.GC7943@parisc-linux.org>
+
+From: Matthew Wilcox <willy@linux.intel.com>
+
+Instead of reporting "SCSI emulation for USB Mass Storage devices",
+report "usb-storage 1-4:1.0".
+
+Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/scsiglue.c | 3 ++-
+ drivers/usb/storage/usb.c | 2 ++
+ drivers/usb/storage/usb.h | 1 +
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/storage/scsiglue.c
++++ b/drivers/usb/storage/scsiglue.c
+@@ -73,7 +73,8 @@
+
+ static const char* host_info(struct Scsi_Host *host)
+ {
+- return "SCSI emulation for USB Mass Storage devices";
++ struct us_data *us = host_to_us(host);
++ return us->scsi_name;
+ }
+
+ static int slave_alloc (struct scsi_device *sdev)
+--- a/drivers/usb/storage/usb.c
++++ b/drivers/usb/storage/usb.c
+@@ -929,6 +929,8 @@ int usb_stor_probe2(struct us_data *us)
+ result = usb_stor_acquire_resources(us);
+ if (result)
+ goto BadDevice;
++ snprintf(us->scsi_name, sizeof(us->scsi_name), "usb-storage %s",
++ dev_name(&us->pusb_intf->dev));
+ result = scsi_add_host(us_to_host(us), &us->pusb_intf->dev);
+ if (result) {
+ printk(KERN_WARNING USB_STORAGE
+--- a/drivers/usb/storage/usb.h
++++ b/drivers/usb/storage/usb.h
+@@ -132,6 +132,7 @@ struct us_data {
+ /* SCSI interfaces */
+ struct scsi_cmnd *srb; /* current srb */
+ unsigned int tag; /* current dCBWTag */
++ char scsi_name[32]; /* scsi_host name */
+
+ /* control and bulk communications data */
+ struct urb *current_urb; /* USB requests */