aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-05-30 14:18:31 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-05-30 14:18:31 -0700
commitbe7d6842f303fbe0712e637128399fd333662a8c (patch)
treeb308b768459df354cac7896e22b286e3c378bdd6 /usb
parent0f23e8e35c820146f6939c5164a1115d58855bcd (diff)
downloadpatches-be7d6842f303fbe0712e637128399fd333662a8c.tar.gz
lots of usb patches added
Diffstat (limited to 'usb')
-rw-r--r--usb/always-announce-new-usb-devices.patch6
-rw-r--r--usb/gadgetfs-fix-aio-interface-bugs.patch67
-rw-r--r--usb/gadgetfs-fix-memory-leaks.patch138
-rw-r--r--usb/improved-tt-scheduling-for-ehci.patch334
-rw-r--r--usb/ub-atomic-add_disk.patch85
-rw-r--r--usb/ub-random-cleanups.patch207
-rw-r--r--usb/usb-improve-kconfig-comment-for-mct_u232.patch32
-rw-r--r--usb/usb-io_edgeport-cleanup-to-unicode-handling.patch119
-rw-r--r--usb/usb-more-pegasus-log-spamming-removed.patch128
-rw-r--r--usb/usb-new-cp2101-device.patch35
-rw-r--r--usb/usb-print-message-when-device-is-rejected-due-to-insufficient-power.patch58
-rw-r--r--usb/usb-rmmod-pl2303-after-28.patch29
-rw-r--r--usb/usb-serial-dynamic-id.patch6
-rw-r--r--usb/usb-serial-encapsulate-schedule_work-remove-double-calling.patch262
-rw-r--r--usb/usb-storage-get-rid-of-the-timer-during-urb-submission.patch86
-rw-r--r--usb/usb-syntax-cleanup-for-pl2303.patch28
-rw-r--r--usb/usbcore-fix-broken-rndis-config-selection.patch32
-rw-r--r--usb/usbhid-remove-unneeded-blacklist-entries.patch87
-rw-r--r--usb/usbtest-report-errors-in-iso-tests.patch125
19 files changed, 1858 insertions, 6 deletions
diff --git a/usb/always-announce-new-usb-devices.patch b/usb/always-announce-new-usb-devices.patch
index c01c69a2ac55b..6f0cb775b4392 100644
--- a/usb/always-announce-new-usb-devices.patch
+++ b/usb/always-announce-new-usb-devices.patch
@@ -14,7 +14,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- gregkh-2.6.orig/drivers/usb/core/hub.c
+++ gregkh-2.6/drivers/usb/core/hub.c
-@@ -1277,7 +1277,6 @@ static int choose_configuration(struct u
+@@ -1285,7 +1285,6 @@ static int choose_configuration(struct u
return i;
}
@@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
static void show_string(struct usb_device *udev, char *id, char *string)
{
if (!string)
-@@ -1285,10 +1284,6 @@ static void show_string(struct usb_devic
+@@ -1293,10 +1292,6 @@ static void show_string(struct usb_devic
dev_printk(KERN_INFO, &udev->dev, "%s: %s\n", id, string);
}
@@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#ifdef CONFIG_USB_OTG
-@@ -1333,7 +1328,10 @@ int usb_new_device(struct usb_device *ud
+@@ -1341,7 +1336,10 @@ int usb_new_device(struct usb_device *ud
udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
/* Tell the world! */
diff --git a/usb/gadgetfs-fix-aio-interface-bugs.patch b/usb/gadgetfs-fix-aio-interface-bugs.patch
new file mode 100644
index 0000000000000..1b0ff5e2f7255
--- /dev/null
+++ b/usb/gadgetfs-fix-aio-interface-bugs.patch
@@ -0,0 +1,67 @@
+From stern@rowland.harvard.edu Mon May 22 09:26:37 2006
+Date: Mon, 22 May 2006 12:26:31 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>, David Brownell <david-b@pacbell.net>
+Subject: gadgetfs: fix AIO interface bugs
+Message-ID: <Pine.LNX.4.44L0.0605221221510.5806-100000@iolanthe.rowland.org>
+
+This patch (as691) fixes a few errors in the AIO interface for the
+gadgetfs driver. Now requests will complete properly instead of hanging.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+
+---
+ drivers/usb/gadget/inode.c | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/gadget/inode.c
++++ gregkh-2.6/drivers/usb/gadget/inode.c
+@@ -528,7 +528,7 @@ struct kiocb_priv {
+ struct usb_request *req;
+ struct ep_data *epdata;
+ void *buf;
+- char __user *ubuf;
++ char __user *ubuf; /* NULL for writes */
+ unsigned actual;
+ };
+
+@@ -566,7 +566,6 @@ static ssize_t ep_aio_read_retry(struct
+ status = priv->actual;
+ kfree(priv->buf);
+ kfree(priv);
+- aio_put_req(iocb);
+ return status;
+ }
+
+@@ -580,8 +579,8 @@ static void ep_aio_complete(struct usb_e
+ spin_lock(&epdata->dev->lock);
+ priv->req = NULL;
+ priv->epdata = NULL;
+- if (NULL == iocb->ki_retry
+- || unlikely(0 == req->actual)
++ if (priv->ubuf == NULL
++ || unlikely(req->actual == 0)
+ || unlikely(kiocbIsCancelled(iocb))) {
+ kfree(req->buf);
+ kfree(priv);
+@@ -618,7 +617,7 @@ ep_aio_rwtail(
+ char __user *ubuf
+ )
+ {
+- struct kiocb_priv *priv = (void *) &iocb->private;
++ struct kiocb_priv *priv;
+ struct usb_request *req;
+ ssize_t value;
+
+@@ -670,7 +669,7 @@ fail:
+ kfree(priv);
+ put_ep(epdata);
+ } else
+- value = -EIOCBQUEUED;
++ value = (ubuf ? -EIOCBRETRY : -EIOCBQUEUED);
+ return value;
+ }
+
diff --git a/usb/gadgetfs-fix-memory-leaks.patch b/usb/gadgetfs-fix-memory-leaks.patch
new file mode 100644
index 0000000000000..15f1978dd29c5
--- /dev/null
+++ b/usb/gadgetfs-fix-memory-leaks.patch
@@ -0,0 +1,138 @@
+From stern@rowland.harvard.edu Mon May 22 09:27:46 2006
+Date: Mon, 22 May 2006 12:27:38 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>, David Brownell <david-b@pacbell.net>
+cc: USB development list <linux-usb-devel@lists.sourceforge.net>
+Subject: gadgetfs: fix memory leaks
+Message-ID: <Pine.LNX.4.44L0.0605221226320.5806-100000@iolanthe.rowland.org>
+
+This patch (as692) fixes a few memory leaks in some unimportant error
+pathways of the gadgetfs driver.
+
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Acked-by: David Brownell <david-b@pacbell.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/inode.c | 51 +++++++++++++++++++++++++--------------------
+ 1 file changed, 29 insertions(+), 22 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/gadget/inode.c
++++ gregkh-2.6/drivers/usb/gadget/inode.c
+@@ -1038,7 +1038,7 @@ scan:
+ /* ep0 can't deliver events when STATE_SETUP */
+ for (i = 0; i < n; i++) {
+ if (dev->event [i].type == GADGETFS_SETUP) {
+- len = n = i + 1;
++ len = i + 1;
+ len *= sizeof (struct usb_gadgetfs_event);
+ n = 0;
+ break;
+@@ -1586,13 +1586,13 @@ gadgetfs_create_file (struct super_block
+ static int activate_ep_files (struct dev_data *dev)
+ {
+ struct usb_ep *ep;
++ struct ep_data *data;
+
+ gadget_for_each_ep (ep, dev->gadget) {
+- struct ep_data *data;
+
+ data = kzalloc(sizeof(*data), GFP_KERNEL);
+ if (!data)
+- goto enomem;
++ goto enomem0;
+ data->state = STATE_EP_DISABLED;
+ init_MUTEX (&data->lock);
+ init_waitqueue_head (&data->wait);
+@@ -1607,21 +1607,23 @@ static int activate_ep_files (struct dev
+
+ data->req = usb_ep_alloc_request (ep, GFP_KERNEL);
+ if (!data->req)
+- goto enomem;
++ goto enomem1;
+
+ data->inode = gadgetfs_create_file (dev->sb, data->name,
+ data, &ep_config_operations,
+ &data->dentry);
+- if (!data->inode) {
+- usb_ep_free_request(ep, data->req);
+- kfree (data);
+- goto enomem;
+- }
++ if (!data->inode)
++ goto enomem2;
+ list_add_tail (&data->epfiles, &dev->epfiles);
+ }
+ return 0;
+
+-enomem:
++enomem2:
++ usb_ep_free_request (ep, data->req);
++enomem1:
++ put_dev (dev);
++ kfree (data);
++enomem0:
+ DBG (dev, "%s enomem\n", __FUNCTION__);
+ destroy_ep_files (dev);
+ return -ENOMEM;
+@@ -1792,7 +1794,7 @@ static struct usb_gadget_driver probe_dr
+ *
+ * After initialization, the device stays active for as long as that
+ * $CHIP file is open. Events may then be read from that descriptor,
+- * such configuration notifications. More complex drivers will handle
++ * such as configuration notifications. More complex drivers will handle
+ * some control requests in user space.
+ */
+
+@@ -2032,12 +2034,10 @@ gadgetfs_fill_super (struct super_block
+ NULL, &simple_dir_operations,
+ S_IFDIR | S_IRUGO | S_IXUGO);
+ if (!inode)
+- return -ENOMEM;
++ goto enomem0;
+ inode->i_op = &simple_dir_inode_operations;
+- if (!(d = d_alloc_root (inode))) {
+- iput (inode);
+- return -ENOMEM;
+- }
++ if (!(d = d_alloc_root (inode)))
++ goto enomem1;
+ sb->s_root = d;
+
+ /* the ep0 file is named after the controller we expect;
+@@ -2045,21 +2045,28 @@ gadgetfs_fill_super (struct super_block
+ */
+ dev = dev_new ();
+ if (!dev)
+- return -ENOMEM;
++ goto enomem2;
+
+ dev->sb = sb;
+- if (!(inode = gadgetfs_create_file (sb, CHIP,
++ if (!gadgetfs_create_file (sb, CHIP,
+ dev, &dev_init_operations,
+- &dev->dentry))) {
+- put_dev(dev);
+- return -ENOMEM;
+- }
++ &dev->dentry))
++ goto enomem3;
+
+ /* other endpoint files are available after hardware setup,
+ * from binding to a controller.
+ */
+ the_device = dev;
+ return 0;
++
++enomem3:
++ put_dev (dev);
++enomem2:
++ dput (d);
++enomem1:
++ iput (inode);
++enomem0:
++ return -ENOMEM;
+ }
+
+ /* "mount -t gadgetfs path /dev/gadget" ends up here */
diff --git a/usb/improved-tt-scheduling-for-ehci.patch b/usb/improved-tt-scheduling-for-ehci.patch
new file mode 100644
index 0000000000000..8f7035ef24f7e
--- /dev/null
+++ b/usb/improved-tt-scheduling-for-ehci.patch
@@ -0,0 +1,334 @@
+From david-b@pacbell.net Wed May 24 09:39:26 2006
+From: Dan Streetman <ddstreet@ieee.org>
+To: Greg KH <greg@kroah.com>
+Subject: [patch 2.6.17-rc4-git] improved TT scheduling for EHCI
+Date: Wed, 24 May 2006 09:39:16 -0700
+Cc: Dan Streetman <ddstreet@ieee.org>, Christopher Montgomery <xiphmont@gmail.com>
+Message-Id: <200605240939.19296.david-b@pacbell.net>
+
+From: Dan Streetman <ddstreet@ieee.org>
+
+This updates the EHCI driver by adding an improved scheduler for the
+transaction translators, found in USB 2.0 hubs and used for low and
+full speed devices.
+
+ - adds periodic_tt_usecs() and some helper functions, which does
+ the same thing that "periodic_usecs" does, except on the other
+ side of the TT, i.e. it calculates the low/fullspeed bandwidth
+ usage instead of highspeed.
+
+ - adds a tt_available() function which is the new implementation
+ of what tt_no_collision() does ... while tt_no_collision() ensures
+ that each TT handles only 1 periodic transfer at a time (a very
+ pessimistic approach) this version instead tracks bandwidth and
+ allows each TT to handle as many transfers as will fit on each TT's
+ downstream bus (closer to best-case).
+
+The new scheduler is selected by a config option, marked as EXPERIMENTAL
+so it can be tested (and more broadly reviewed) for a while until it
+seems safe to remove the original scheduler.
+
+Signed-off-by: Dan Streetman <ddstreet@ieee.org>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/Kconfig | 20 +++
+ drivers/usb/host/ehci-sched.c | 216 +++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 234 insertions(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/Kconfig
++++ gregkh-2.6/drivers/usb/host/Kconfig
+@@ -47,7 +47,25 @@ config USB_EHCI_ROOT_HUB_TT
+ controller is needed. It's safe to say "y" even if your
+ controller doesn't support this feature.
+
+- This supports the EHCI implementation from TransDimension Inc.
++ This supports the EHCI implementation that's originally
++ from ARC, and has since changed hands a few times.
++
++config USB_EHCI_TT_NEWSCHED
++ bool "Improved Transaction Translator scheduling (EXPERIMENTAL)"
++ depends on USB_EHCI_HCD && EXPERIMENTAL
++ ---help---
++ This changes the periodic scheduling code to fill more of the low
++ and full speed bandwidth available from the Transaction Translator
++ (TT) in USB 2.0 hubs. Without this, only one transfer will be
++ issued in each microframe, significantly reducing the number of
++ periodic low/fullspeed transfers possible.
++
++ If you have multiple periodic low/fullspeed devices connected to a
++ highspeed USB hub which is connected to a highspeed USB Host
++ Controller, and some of those devices will not work correctly
++ (possibly due to "ENOSPC" or "-28" errors), say Y.
++
++ If unsure, say N.
+
+ config USB_ISP116X_HCD
+ tristate "ISP116X HCD support"
+--- gregkh-2.6.orig/drivers/usb/host/ehci-sched.c
++++ gregkh-2.6/drivers/usb/host/ehci-sched.c
+@@ -163,6 +163,190 @@ static int same_tt (struct usb_device *d
+ return 1;
+ }
+
++#ifdef CONFIG_USB_EHCI_TT_NEWSCHED
++
++/* Which uframe does the low/fullspeed transfer start in?
++ *
++ * The parameter is the mask of ssplits in "H-frame" terms
++ * and this returns the transfer start uframe in "B-frame" terms,
++ * which allows both to match, e.g. a ssplit in "H-frame" uframe 0
++ * will cause a transfer in "B-frame" uframe 0. "B-frames" lag
++ * "H-frames" by 1 uframe. See the EHCI spec sec 4.5 and figure 4.7.
++ */
++static inline unsigned char tt_start_uframe(struct ehci_hcd *ehci, __le32 mask)
++{
++ unsigned char smask = QH_SMASK & le32_to_cpu(mask);
++ if (!smask) {
++ ehci_err(ehci, "invalid empty smask!\n");
++ /* uframe 7 can't have bw so this will indicate failure */
++ return 7;
++ }
++ return ffs(smask) - 1;
++}
++
++static const unsigned char
++max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 30, 0 };
++
++/* carryover low/fullspeed bandwidth that crosses uframe boundries */
++static inline void carryover_tt_bandwidth(unsigned short tt_usecs[8])
++{
++ int i;
++ for (i=0; i<7; i++) {
++ if (max_tt_usecs[i] < tt_usecs[i]) {
++ tt_usecs[i+1] += tt_usecs[i] - max_tt_usecs[i];
++ tt_usecs[i] = max_tt_usecs[i];
++ }
++ }
++}
++
++/* How many of the tt's periodic downstream 1000 usecs are allocated?
++ *
++ * While this measures the bandwidth in terms of usecs/uframe,
++ * the low/fullspeed bus has no notion of uframes, so any particular
++ * low/fullspeed transfer can "carry over" from one uframe to the next,
++ * since the TT just performs downstream transfers in sequence.
++ *
++ * For example two seperate 100 usec transfers can start in the same uframe,
++ * and the second one would "carry over" 75 usecs into the next uframe.
++ */
++static void
++periodic_tt_usecs (
++ struct ehci_hcd *ehci,
++ struct usb_device *dev,
++ unsigned frame,
++ unsigned short tt_usecs[8]
++)
++{
++ __le32 *hw_p = &ehci->periodic [frame];
++ union ehci_shadow *q = &ehci->pshadow [frame];
++ unsigned char uf;
++
++ memset(tt_usecs, 0, 16);
++
++ while (q->ptr) {
++ switch (Q_NEXT_TYPE(*hw_p)) {
++ case Q_TYPE_ITD:
++ hw_p = &q->itd->hw_next;
++ q = &q->itd->itd_next;
++ continue;
++ case Q_TYPE_QH:
++ if (same_tt(dev, q->qh->dev)) {
++ uf = tt_start_uframe(ehci, q->qh->hw_info2);
++ tt_usecs[uf] += q->qh->tt_usecs;
++ }
++ hw_p = &q->qh->hw_next;
++ q = &q->qh->qh_next;
++ continue;
++ case Q_TYPE_SITD:
++ if (same_tt(dev, q->sitd->urb->dev)) {
++ uf = tt_start_uframe(ehci, q->sitd->hw_uframe);
++ tt_usecs[uf] += q->sitd->stream->tt_usecs;
++ }
++ hw_p = &q->sitd->hw_next;
++ q = &q->sitd->sitd_next;
++ continue;
++ // case Q_TYPE_FSTN:
++ default:
++ ehci_dbg(ehci,
++ "ignoring periodic frame %d FSTN\n", frame);
++ hw_p = &q->fstn->hw_next;
++ q = &q->fstn->fstn_next;
++ }
++ }
++
++ carryover_tt_bandwidth(tt_usecs);
++
++ if (max_tt_usecs[7] < tt_usecs[7])
++ ehci_err(ehci, "frame %d tt sched overrun: %d usecs\n",
++ frame, tt_usecs[7] - max_tt_usecs[7]);
++}
++
++/*
++ * Return true if the device's tt's downstream bus is available for a
++ * periodic transfer of the specified length (usecs), starting at the
++ * specified frame/uframe. Note that (as summarized in section 11.19
++ * of the usb 2.0 spec) TTs can buffer multiple transactions for each
++ * uframe.
++ *
++ * The uframe parameter is when the fullspeed/lowspeed transfer
++ * should be executed in "B-frame" terms, which is the same as the
++ * highspeed ssplit's uframe (which is in "H-frame" terms). For example
++ * a ssplit in "H-frame" 0 causes a transfer in "B-frame" 0.
++ * See the EHCI spec sec 4.5 and fig 4.7.
++ *
++ * This checks if the full/lowspeed bus, at the specified starting uframe,
++ * has the specified bandwidth available, according to rules listed
++ * in USB 2.0 spec section 11.18.1 fig 11-60.
++ *
++ * This does not check if the transfer would exceed the max ssplit
++ * limit of 16, specified in USB 2.0 spec section 11.18.4 requirement #4,
++ * since proper scheduling limits ssplits to less than 16 per uframe.
++ */
++static int tt_available (
++ struct ehci_hcd *ehci,
++ unsigned period,
++ struct usb_device *dev,
++ unsigned frame,
++ unsigned uframe,
++ u16 usecs
++)
++{
++ if ((period == 0) || (uframe >= 7)) /* error */
++ return 0;
++
++ for (; frame < ehci->periodic_size; frame += period) {
++ unsigned short tt_usecs[8];
++
++ periodic_tt_usecs (ehci, dev, frame, tt_usecs);
++
++ ehci_vdbg(ehci, "tt frame %d check %d usecs start uframe %d in"
++ " schedule %d/%d/%d/%d/%d/%d/%d/%d\n",
++ frame, usecs, uframe,
++ tt_usecs[0], tt_usecs[1], tt_usecs[2], tt_usecs[3],
++ tt_usecs[4], tt_usecs[5], tt_usecs[6], tt_usecs[7]);
++
++ if (max_tt_usecs[uframe] <= tt_usecs[uframe]) {
++ ehci_vdbg(ehci, "frame %d uframe %d fully scheduled\n",
++ frame, uframe);
++ return 0;
++ }
++
++ /* special case for isoc transfers larger than 125us:
++ * the first and each subsequent fully used uframe
++ * must be empty, so as to not illegally delay
++ * already scheduled transactions
++ */
++ if (125 < usecs) {
++ int ufs = (usecs / 125) - 1;
++ int i;
++ for (i = uframe; i < (uframe + ufs) && i < 8; i++)
++ if (0 < tt_usecs[i]) {
++ ehci_vdbg(ehci,
++ "multi-uframe xfer can't fit "
++ "in frame %d uframe %d\n",
++ frame, i);
++ return 0;
++ }
++ }
++
++ tt_usecs[uframe] += usecs;
++
++ carryover_tt_bandwidth(tt_usecs);
++
++ /* fail if the carryover pushed bw past the last uframe's limit */
++ if (max_tt_usecs[7] < tt_usecs[7]) {
++ ehci_vdbg(ehci,
++ "tt unavailable usecs %d frame %d uframe %d\n",
++ usecs, frame, uframe);
++ return 0;
++ }
++ }
++
++ return 1;
++}
++
++#else
++
+ /* return true iff the device's transaction translator is available
+ * for a periodic transfer starting at the specified frame, using
+ * all the uframes in the mask.
+@@ -237,6 +421,8 @@ static int tt_no_collision (
+ return 1;
+ }
+
++#endif /* CONFIG_USB_EHCI_TT_NEWSCHED */
++
+ /*-------------------------------------------------------------------------*/
+
+ static int enable_periodic (struct ehci_hcd *ehci)
+@@ -481,7 +667,7 @@ static int check_intr_schedule (
+ )
+ {
+ int retval = -ENOSPC;
+- u8 mask;
++ u8 mask = 0;
+
+ if (qh->c_usecs && uframe >= 6) /* FSTN territory? */
+ goto done;
+@@ -494,6 +680,24 @@ static int check_intr_schedule (
+ goto done;
+ }
+
++#ifdef CONFIG_USB_EHCI_TT_NEWSCHED
++ if (tt_available (ehci, qh->period, qh->dev, frame, uframe,
++ qh->tt_usecs)) {
++ unsigned i;
++
++ /* TODO : this may need FSTN for SSPLIT in uframe 5. */
++ for (i=uframe+1; i<8 && i<uframe+4; i++)
++ if (!check_period (ehci, frame, i,
++ qh->period, qh->c_usecs))
++ goto done;
++ else
++ mask |= 1 << i;
++
++ retval = 0;
++
++ *c_maskp = cpu_to_le32 (mask << 8);
++ }
++#else
+ /* Make sure this tt's buffer is also available for CSPLITs.
+ * We pessimize a bit; probably the typical full speed case
+ * doesn't need the second CSPLIT.
+@@ -514,6 +718,7 @@ static int check_intr_schedule (
+ goto done;
+ retval = 0;
+ }
++#endif
+ done:
+ return retval;
+ }
+@@ -1047,12 +1252,21 @@ sitd_slot_ok (
+ frame = uframe >> 3;
+ uf = uframe & 7;
+
++#ifdef CONFIG_USB_EHCI_TT_NEWSCHED
++ /* The tt's fullspeed bus bandwidth must be available.
++ * tt_available scheduling guarantees 10+% for control/bulk.
++ */
++ if (!tt_available (ehci, period_uframes << 3,
++ stream->udev, frame, uf, stream->tt_usecs))
++ return 0;
++#else
+ /* tt must be idle for start(s), any gap, and csplit.
+ * assume scheduling slop leaves 10+% for control/bulk.
+ */
+ if (!tt_no_collision (ehci, period_uframes << 3,
+ stream->udev, frame, mask))
+ return 0;
++#endif
+
+ /* check starts (OUT uses more than one) */
+ max_used = 100 - stream->usecs;
diff --git a/usb/ub-atomic-add_disk.patch b/usb/ub-atomic-add_disk.patch
new file mode 100644
index 0000000000000..68f122105e9a7
--- /dev/null
+++ b/usb/ub-atomic-add_disk.patch
@@ -0,0 +1,85 @@
+From zaitcev@redhat.com Thu May 25 20:05:07 2006
+Date: Thu, 25 May 2006 20:04:54 -0700
+From: Pete Zaitcev <zaitcev@redhat.com>
+To: greg@kroah.com
+Cc: zaitcev@redhat.com, viro@www.linux.org.uk
+Subject: ub: atomic add_disk
+Message-Id: <20060525200454.d80905b6.zaitcev@redhat.com>
+
+<zaitcev> I am taling about this: "if (disk->flags & GENHD_FL_UP) del_gendisk(disk);"
+<zaitcev> If del_gendisk() undoes add_disk() like viro just said, why is it conditional?
+<viro> huh?
+<viro> add_disk() sets the damn flag
+<zaitcev> So, I should not need to check ever
+<viro> so the above is "if I've called add_disk(), call gendisk()"
+<viro> which might be what you want, of course
+<viro> but usually you know if you'd done add_disk() on that puppy anyway
+
+In ub, nobody upstream should ever see half-constructed disks before
+they were passed to add_disk. To that end, only add the struct lun to
+the list on the path of no return. With that fix in place, we do
+not need to test GENHD_FL_UP.
+
+Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/block/ub.c | 10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+--- gregkh-2.6.orig/drivers/block/ub.c
++++ gregkh-2.6/drivers/block/ub.c
+@@ -2314,7 +2314,6 @@ static int ub_probe_lun(struct ub_dev *s
+ goto err_id;
+
+ lun->udev = sc;
+- list_add(&lun->link, &sc->luns);
+
+ snprintf(lun->name, 16, DRV_NAME "%c(%d.%d.%d)",
+ lun->id + 'a', sc->dev->bus->busnum, sc->dev->devnum, lun->num);
+@@ -2327,7 +2326,6 @@ static int ub_probe_lun(struct ub_dev *s
+ if ((disk = alloc_disk(UB_PARTS_PER_LUN)) == NULL)
+ goto err_diskalloc;
+
+- lun->disk = disk;
+ sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a');
+ sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a');
+ disk->major = UB_MAJOR;
+@@ -2349,7 +2347,9 @@ static int ub_probe_lun(struct ub_dev *s
+ blk_queue_max_sectors(q, UB_MAX_SECTORS);
+ blk_queue_hardsect_size(q, lun->capacity.bsize);
+
++ lun->disk = disk;
+ q->queuedata = lun;
++ list_add(&lun->link, &sc->luns);
+
+ set_capacity(disk, lun->capacity.nsec);
+ if (lun->removable)
+@@ -2362,7 +2362,6 @@ static int ub_probe_lun(struct ub_dev *s
+ err_blkqinit:
+ put_disk(disk);
+ err_diskalloc:
+- list_del(&lun->link);
+ ub_id_put(lun->id);
+ err_id:
+ kfree(lun);
+@@ -2375,7 +2374,6 @@ static void ub_disconnect(struct usb_int
+ struct ub_dev *sc = usb_get_intfdata(intf);
+ struct list_head *p;
+ struct ub_lun *lun;
+- struct gendisk *disk;
+ unsigned long flags;
+
+ /*
+@@ -2431,9 +2429,7 @@ static void ub_disconnect(struct usb_int
+ */
+ list_for_each (p, &sc->luns) {
+ lun = list_entry(p, struct ub_lun, link);
+- disk = lun->disk;
+- if (disk->flags & GENHD_FL_UP)
+- del_gendisk(disk);
++ del_gendisk(lun->disk);
+ /*
+ * I wish I could do:
+ * set_bit(QUEUE_FLAG_DEAD, &q->queue_flags);
diff --git a/usb/ub-random-cleanups.patch b/usb/ub-random-cleanups.patch
new file mode 100644
index 0000000000000..163f460a80b41
--- /dev/null
+++ b/usb/ub-random-cleanups.patch
@@ -0,0 +1,207 @@
+From zaitcev@redhat.com Thu May 25 20:09:07 2006
+Date: Thu, 25 May 2006 20:08:50 -0700
+From: Pete Zaitcev <zaitcev@redhat.com>
+To: greg@kroah.com
+Cc: zaitcev@redhat.com
+Subject: ub: random cleanups
+Message-Id: <20060525200850.f67fe6b7.zaitcev@redhat.com>
+
+Remove some silly messages and cast in stone "temporary" messages which
+we keep around. Also, I am hesitant to remove the initialization retries
+without having the hardware to test (anyone who was at KS04 has a spare?)
+
+Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/block/ub.c | 60 ++++++++++-------------------------------------------
+ 1 file changed, 12 insertions(+), 48 deletions(-)
+
+--- gregkh-2.6.orig/drivers/block/ub.c
++++ gregkh-2.6/drivers/block/ub.c
+@@ -10,17 +10,13 @@
+ * TODO (sorted by decreasing priority)
+ * -- set readonly flag for CDs, set removable flag for CF readers
+ * -- do inquiry and verify we got a disk and not a tape (for LUN mismatch)
+- * -- special case some senses, e.g. 3a/0 -> no media present, reduce retries
+ * -- verify the 13 conditions and do bulk resets
+- * -- kill last_pipe and simply do two-state clearing on both pipes
+ * -- highmem
+ * -- move top_sense and work_bcs into separate allocations (if they survive)
+ * for cache purists and esoteric architectures.
+ * -- Allocate structure for LUN 0 before the first ub_sync_tur, avoid NULL. ?
+ * -- prune comments, they are too volumnous
+- * -- Exterminate P3 printks
+ * -- Resove XXX's
+- * -- Redo "benh's retries", perhaps have spin-up code to handle them. V:D=?
+ * -- CLEAR, CLR2STS, CLRRS seem to be ripe for refactoring.
+ */
+ #include <linux/kernel.h>
+@@ -180,7 +176,6 @@ struct ub_dev;
+ #define UB_DIR_ILLEGAL2 2
+ #define UB_DIR_WRITE 3
+
+-/* P3 */
+ #define UB_DIR_CHAR(c) (((c)==UB_DIR_WRITE)? 'w': \
+ (((c)==UB_DIR_READ)? 'r': 'n'))
+
+@@ -669,8 +664,9 @@ static int ub_request_fn_1(struct ub_lun
+ */
+ n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]);
+ if (n_elem < 0) {
++ /* Impossible, because blk_rq_map_sg should not hit ENOMEM. */
+ printk(KERN_INFO "%s: failed request map (%d)\n",
+- lun->name, n_elem); /* P3 */
++ lun->name, n_elem);
+ goto drop;
+ }
+ if (n_elem > UB_MAX_REQ_SG) { /* Paranoia */
+@@ -824,7 +820,9 @@ static int ub_rw_cmd_retry(struct ub_dev
+ if (urq->current_try >= 3)
+ return -EIO;
+ urq->current_try++;
+- /* P3 */ printk("%s: dir %c len/act %d/%d "
++
++ /* Remove this if anyone complains of flooding. */
++ printk(KERN_DEBUG "%s: dir %c len/act %d/%d "
+ "[sense %x %02x %02x] retry %d\n",
+ sc->name, UB_DIR_CHAR(cmd->dir), cmd->len, cmd->act_len,
+ cmd->key, cmd->asc, cmd->ascq, urq->current_try);
+@@ -1241,8 +1239,6 @@ static void ub_scsi_urb_compl(struct ub_
+ * to check. But it's not all right if the device
+ * counts disagree with our counts.
+ */
+- /* P3 */ printk("%s: resid %d len %d act %d\n",
+- sc->name, len, cmd->len, cmd->act_len);
+ goto Bad_End;
+ }
+
+@@ -1253,7 +1249,6 @@ static void ub_scsi_urb_compl(struct ub_
+ ub_state_sense(sc, cmd);
+ return;
+ case US_BULK_STAT_PHASE:
+- /* P3 */ printk("%s: status PHASE\n", sc->name);
+ goto Bad_End;
+ default:
+ printk(KERN_INFO "%s: unknown CSW status 0x%x\n",
+@@ -1568,16 +1563,14 @@ static void ub_reset_task(void *arg)
+ }
+
+ if (atomic_read(&sc->poison)) {
+- printk(KERN_NOTICE "%s: Not resetting disconnected device\n",
+- sc->name); /* P3 This floods. Remove soon. XXX */
++ ;
+ } else if ((sc->reset & 1) == 0) {
+ ub_sync_reset(sc);
+ msleep(700); /* usb-storage sleeps 6s (!) */
+ ub_probe_clear_stall(sc, sc->recv_bulk_pipe);
+ ub_probe_clear_stall(sc, sc->send_bulk_pipe);
+ } else if (sc->dev->actconfig->desc.bNumInterfaces != 1) {
+- printk(KERN_NOTICE "%s: Not resetting multi-interface device\n",
+- sc->name); /* P3 This floods. Remove soon. XXX */
++ ;
+ } else {
+ if ((lkr = usb_lock_device_for_reset(sc->dev, sc->intf)) < 0) {
+ printk(KERN_NOTICE
+@@ -1819,10 +1812,8 @@ static int ub_sync_tur(struct ub_dev *sc
+ rc = ub_submit_scsi(sc, cmd);
+ spin_unlock_irqrestore(sc->lock, flags);
+
+- if (rc != 0) {
+- printk("ub: testing ready: submit error (%d)\n", rc); /* P3 */
++ if (rc != 0)
+ goto err_submit;
+- }
+
+ wait_for_completion(&compl);
+
+@@ -1880,20 +1871,16 @@ static int ub_sync_read_cap(struct ub_de
+ rc = ub_submit_scsi(sc, cmd);
+ spin_unlock_irqrestore(sc->lock, flags);
+
+- if (rc != 0) {
+- printk("ub: reading capacity: submit error (%d)\n", rc); /* P3 */
++ if (rc != 0)
+ goto err_submit;
+- }
+
+ wait_for_completion(&compl);
+
+ if (cmd->error != 0) {
+- printk("ub: reading capacity: error %d\n", cmd->error); /* P3 */
+ rc = -EIO;
+ goto err_read;
+ }
+ if (cmd->act_len != 8) {
+- printk("ub: reading capacity: size %d\n", cmd->act_len); /* P3 */
+ rc = -EIO;
+ goto err_read;
+ }
+@@ -1907,7 +1894,6 @@ static int ub_sync_read_cap(struct ub_de
+ case 2048: shift = 2; break;
+ case 4096: shift = 3; break;
+ default:
+- printk("ub: Bad sector size %u\n", bsize); /* P3 */
+ rc = -EDOM;
+ goto err_inv_bsize;
+ }
+@@ -2019,17 +2005,8 @@ static int ub_sync_getmaxlun(struct ub_d
+ sc->work_urb.error_count = 0;
+ sc->work_urb.status = 0;
+
+- if ((rc = usb_submit_urb(&sc->work_urb, GFP_KERNEL)) != 0) {
+- if (rc == -EPIPE) {
+- printk("%s: Stall submitting GetMaxLUN, using 1 LUN\n",
+- sc->name); /* P3 */
+- } else {
+- printk(KERN_NOTICE
+- "%s: Unable to submit GetMaxLUN (%d)\n",
+- sc->name, rc);
+- }
++ if ((rc = usb_submit_urb(&sc->work_urb, GFP_KERNEL)) != 0)
+ goto err_submit;
+- }
+
+ init_timer(&timer);
+ timer.function = ub_probe_timeout;
+@@ -2042,21 +2019,10 @@ static int ub_sync_getmaxlun(struct ub_d
+ del_timer_sync(&timer);
+ usb_kill_urb(&sc->work_urb);
+
+- if ((rc = sc->work_urb.status) < 0) {
+- if (rc == -EPIPE) {
+- printk("%s: Stall at GetMaxLUN, using 1 LUN\n",
+- sc->name); /* P3 */
+- } else {
+- printk(KERN_NOTICE
+- "%s: Error at GetMaxLUN (%d)\n",
+- sc->name, rc);
+- }
++ if ((rc = sc->work_urb.status) < 0)
+ goto err_io;
+- }
+
+ if (sc->work_urb.actual_length != 1) {
+- printk("%s: GetMaxLUN returned %d bytes\n", sc->name,
+- sc->work_urb.actual_length); /* P3 */
+ nluns = 0;
+ } else {
+ if ((nluns = *p) == 55) {
+@@ -2067,8 +2033,6 @@ static int ub_sync_getmaxlun(struct ub_d
+ if (nluns > UB_MAX_LUNS)
+ nluns = UB_MAX_LUNS;
+ }
+- printk("%s: GetMaxLUN returned %d, using %d LUNs\n", sc->name,
+- *p, nluns); /* P3 */
+ }
+
+ kfree(p);
+@@ -2266,7 +2230,7 @@ static int ub_probe(struct usb_interface
+ * has to succeed, so we clear checks with an additional one here.
+ * In any case it's not our business how revaliadation is implemented.
+ */
+- for (i = 0; i < 3; i++) { /* Retries for benh's key */
++ for (i = 0; i < 3; i++) { /* Retries for the schwag key from KS'04 */
+ if ((rc = ub_sync_tur(sc, NULL)) <= 0) break;
+ if (rc != 0x6) break;
+ msleep(10);
diff --git a/usb/usb-improve-kconfig-comment-for-mct_u232.patch b/usb/usb-improve-kconfig-comment-for-mct_u232.patch
new file mode 100644
index 0000000000000..3c5036c8b21b0
--- /dev/null
+++ b/usb/usb-improve-kconfig-comment-for-mct_u232.patch
@@ -0,0 +1,32 @@
+From zaitcev@redhat.com Mon May 22 22:02:43 2006
+Date: Mon, 22 May 2006 22:02:32 -0700
+From: Pete Zaitcev <zaitcev@redhat.com>
+To: greg@kroah.com
+Cc: zaitcev@redhat.com, linux-usb-devel@lists.sourceforge.net
+Subject: USB: Improve Kconfig comment for mct_u232
+Message-Id: <20060522220232.69c9542b.zaitcev@redhat.com>
+
+Add a couple of supported devices into the help message.
+
+It's a long story... I promised this comment changed to a user long ago,
+so I'd like to have that promise kept. In reality though, nobody is
+likely to read this anyway.
+
+Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/usb/serial/Kconfig
++++ gregkh-2.6/drivers/usb/serial/Kconfig
+@@ -417,7 +417,7 @@ config USB_SERIAL_MCT_U232
+ Magic Control Technology Corp. (U232 is one of the model numbers).
+
+ This driver also works with Sitecom U232-P25 and D-Link DU-H3SP USB
+- BAY devices.
++ BAY, Belkin F5U109, and Belkin F5U409 devices.
+
+ To compile this driver as a module, choose M here: the
+ module will be called mct_u232.
diff --git a/usb/usb-io_edgeport-cleanup-to-unicode-handling.patch b/usb/usb-io_edgeport-cleanup-to-unicode-handling.patch
new file mode 100644
index 0000000000000..5781a22b926ab
--- /dev/null
+++ b/usb/usb-io_edgeport-cleanup-to-unicode-handling.patch
@@ -0,0 +1,119 @@
+From zaitcev@redhat.com Mon May 22 21:49:59 2006
+Date: Mon, 22 May 2006 21:49:44 -0700
+From: Pete Zaitcev <zaitcev@redhat.com>
+To: <alborchers@steinerpoint.com>
+Cc: <pberger@brimson.com>, zaitcev@redhat.com, greg@kroah.com
+Subject: usb: io_edgeport, cleanup to unicode handling
+Message-Id: <20060522214944.2c92f074.zaitcev@redhat.com>
+
+Clean up the unicode handling in io_edgeport. Make get_string size-limited.
+
+Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/serial/io_edgeport.c | 42 ++++++++++++++++++++++++---------------
+ 1 file changed, 26 insertions(+), 16 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/serial/io_edgeport.c
++++ gregkh-2.6/drivers/usb/serial/io_edgeport.c
+@@ -142,7 +142,7 @@ struct edgeport_port {
+
+ /* This structure holds all of the individual device information */
+ struct edgeport_serial {
+- char name[MAX_NAME_LEN+1]; /* string name of this device */
++ char name[MAX_NAME_LEN+2]; /* string name of this device */
+
+ struct edge_manuf_descriptor manuf_descriptor; /* the manufacturer descriptor */
+ struct edge_boot_descriptor boot_descriptor; /* the boot firmware descriptor */
+@@ -270,7 +270,7 @@ static void get_manufacturing_desc (stru
+ static void get_boot_desc (struct edgeport_serial *edge_serial);
+ static void load_application_firmware (struct edgeport_serial *edge_serial);
+
+-static void unicode_to_ascii (char *string, __le16 *unicode, int unicode_size);
++static void unicode_to_ascii(char *string, int buflen, __le16 *unicode, int unicode_size);
+
+
+ // ************************************************************************
+@@ -373,7 +373,7 @@ static void update_edgeport_E2PROM (stru
+ * Get string descriptor from device *
+ * *
+ ************************************************************************/
+-static int get_string (struct usb_device *dev, int Id, char *string)
++static int get_string (struct usb_device *dev, int Id, char *string, int buflen)
+ {
+ struct usb_string_descriptor StringDesc;
+ struct usb_string_descriptor *pStringDesc;
+@@ -395,7 +395,7 @@ static int get_string (struct usb_device
+ return 0;
+ }
+
+- unicode_to_ascii(string, pStringDesc->wData, pStringDesc->bLength/2-1);
++ unicode_to_ascii(string, buflen, pStringDesc->wData, pStringDesc->bLength/2);
+
+ kfree(pStringDesc);
+ return strlen(string);
+@@ -2564,16 +2564,20 @@ static void change_port_settings (struct
+ * ASCII range, but it's only for debugging...
+ * NOTE: expects the unicode in LE format
+ ****************************************************************************/
+-static void unicode_to_ascii (char *string, __le16 *unicode, int unicode_size)
++static void unicode_to_ascii(char *string, int buflen, __le16 *unicode, int unicode_size)
+ {
+ int i;
+
+- if (unicode_size <= 0)
++ if (buflen <= 0) /* never happens, but... */
+ return;
++ --buflen; /* space for nul */
+
+- for (i = 0; i < unicode_size; ++i)
++ for (i = 0; i < unicode_size; i++) {
++ if (i >= buflen)
++ break;
+ string[i] = (char)(le16_to_cpu(unicode[i]));
+- string[unicode_size] = 0x00;
++ }
++ string[i] = 0x00;
+ }
+
+
+@@ -2603,11 +2607,17 @@ static void get_manufacturing_desc (stru
+ dbg(" BoardRev: %d", edge_serial->manuf_descriptor.BoardRev);
+ dbg(" NumPorts: %d", edge_serial->manuf_descriptor.NumPorts);
+ dbg(" DescDate: %d/%d/%d", edge_serial->manuf_descriptor.DescDate[0], edge_serial->manuf_descriptor.DescDate[1], edge_serial->manuf_descriptor.DescDate[2]+1900);
+- unicode_to_ascii (string, edge_serial->manuf_descriptor.SerialNumber, edge_serial->manuf_descriptor.SerNumLength/2-1);
++ unicode_to_ascii(string, 30,
++ edge_serial->manuf_descriptor.SerialNumber,
++ edge_serial->manuf_descriptor.SerNumLength/2);
+ dbg(" SerialNumber: %s", string);
+- unicode_to_ascii (string, edge_serial->manuf_descriptor.AssemblyNumber, edge_serial->manuf_descriptor.AssemblyNumLength/2-1);
++ unicode_to_ascii(string, 30,
++ edge_serial->manuf_descriptor.AssemblyNumber,
++ edge_serial->manuf_descriptor.AssemblyNumLength/2);
+ dbg(" AssemblyNumber: %s", string);
+- unicode_to_ascii (string, edge_serial->manuf_descriptor.OemAssyNumber, edge_serial->manuf_descriptor.OemAssyNumLength/2-1);
++ unicode_to_ascii(string, 30,
++ edge_serial->manuf_descriptor.OemAssyNumber,
++ edge_serial->manuf_descriptor.OemAssyNumLength/2);
+ dbg(" OemAssyNumber: %s", string);
+ dbg(" UartType: %d", edge_serial->manuf_descriptor.UartType);
+ dbg(" IonPid: %d", edge_serial->manuf_descriptor.IonPid);
+@@ -2735,11 +2745,11 @@ static int edge_startup (struct usb_seri
+ usb_set_serial_data(serial, edge_serial);
+
+ /* get the name for the device from the device */
+- if ( (i = get_string(dev, dev->descriptor.iManufacturer, &edge_serial->name[0])) != 0) {
+- edge_serial->name[i-1] = ' ';
+- }
+-
+- get_string(dev, dev->descriptor.iProduct, &edge_serial->name[i]);
++ i = get_string(dev, dev->descriptor.iManufacturer,
++ &edge_serial->name[0], MAX_NAME_LEN+1);
++ edge_serial->name[i++] = ' ';
++ get_string(dev, dev->descriptor.iProduct,
++ &edge_serial->name[i], MAX_NAME_LEN+2 - i);
+
+ dev_info(&serial->dev->dev, "%s detected\n", edge_serial->name);
+
diff --git a/usb/usb-more-pegasus-log-spamming-removed.patch b/usb/usb-more-pegasus-log-spamming-removed.patch
new file mode 100644
index 0000000000000..1054914c6fcde
--- /dev/null
+++ b/usb/usb-more-pegasus-log-spamming-removed.patch
@@ -0,0 +1,128 @@
+From david-b@pacbell.net Fri May 26 10:32:45 2006
+From: David Brownell <david-b@pacbell.net>
+To: Greg KH <greg@kroah.com>
+Subject: USB: more pegasus log spamming removed
+Date: Fri, 26 May 2006 10:17:03 -0700
+Message-Id: <200605261017.05089.david-b@pacbell.net>
+
+Remove more log spamming from pegasus: stop talking to the device once we
+see ENODEV reported. It may take a while before khubd notifies us.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/net/pegasus.c | 29 ++++++++++++++++++++++++++---
+ 1 file changed, 26 insertions(+), 3 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/net/pegasus.c
++++ gregkh-2.6/drivers/usb/net/pegasus.c
+@@ -163,6 +163,8 @@ static int get_registers(pegasus_t * peg
+
+ /* using ATOMIC, we'd never wake up if we slept */
+ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
++ if (ret == -ENODEV)
++ netif_device_detach(pegasus->net);
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __FUNCTION__, ret);
+@@ -217,6 +219,8 @@ static int set_registers(pegasus_t * peg
+ set_current_state(TASK_UNINTERRUPTIBLE);
+
+ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
++ if (ret == -ENODEV)
++ netif_device_detach(pegasus->net);
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __FUNCTION__, ret);
+@@ -268,6 +272,8 @@ static int set_register(pegasus_t * pega
+ set_current_state(TASK_UNINTERRUPTIBLE);
+
+ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
++ if (ret == -ENODEV)
++ netif_device_detach(pegasus->net);
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __FUNCTION__, ret);
+@@ -298,10 +304,13 @@ static int update_eth_regs_async(pegasus
+ (char *) &pegasus->dr,
+ pegasus->eth_regs, 3, ctrl_callback, pegasus);
+
+- if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC)))
++ if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) {
++ if (ret == -ENODEV)
++ netif_device_detach(pegasus->net);
+ if (netif_msg_drv(pegasus))
+ dev_err(&pegasus->intf->dev, "%s, status %d\n",
+ __FUNCTION__, ret);
++ }
+
+ return ret;
+ }
+@@ -692,7 +701,10 @@ goon:
+ usb_rcvbulkpipe(pegasus->usb, 1),
+ pegasus->rx_skb->data, PEGASUS_MTU + 8,
+ read_bulk_callback, pegasus);
+- if (usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) {
++ rx_status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC);
++ if (rx_status == -ENODEV)
++ netif_device_detach(pegasus->net);
++ else if (rx_status) {
+ pegasus->flags |= PEGASUS_RX_URB_FAIL;
+ goto tl_sched;
+ } else {
+@@ -709,6 +721,7 @@ static void rx_fixup(unsigned long data)
+ {
+ pegasus_t *pegasus;
+ unsigned long flags;
++ int status;
+
+ pegasus = (pegasus_t *) data;
+ if (pegasus->flags & PEGASUS_UNPLUG)
+@@ -734,7 +747,10 @@ static void rx_fixup(unsigned long data)
+ pegasus->rx_skb->data, PEGASUS_MTU + 8,
+ read_bulk_callback, pegasus);
+ try_again:
+- if (usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC)) {
++ status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC);
++ if (status == -ENODEV)
++ netif_device_detach(pegasus->net);
++ else if (status) {
+ pegasus->flags |= PEGASUS_RX_URB_FAIL;
+ tasklet_schedule(&pegasus->rx_tl);
+ } else {
+@@ -836,6 +852,8 @@ static void intr_callback(struct urb *ur
+ }
+
+ status = usb_submit_urb(urb, SLAB_ATOMIC);
++ if (status == -ENODEV)
++ netif_device_detach(pegasus->net);
+ if (status && netif_msg_timer(pegasus))
+ printk(KERN_ERR "%s: can't resubmit interrupt urb, %d\n",
+ net->name, status);
+@@ -874,6 +892,7 @@ static int pegasus_start_xmit(struct sk_
+ /* cleanup should already have been scheduled */
+ break;
+ case -ENODEV: /* disconnect() upcoming */
++ netif_device_detach(pegasus->net);
+ break;
+ default:
+ pegasus->stats.tx_errors++;
+@@ -999,6 +1018,8 @@ static int pegasus_open(struct net_devic
+ pegasus->rx_skb->data, PEGASUS_MTU + 8,
+ read_bulk_callback, pegasus);
+ if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) {
++ if (res == -ENODEV)
++ netif_device_detach(pegasus->net);
+ if (netif_msg_ifup(pegasus))
+ pr_debug("%s: failed rx_urb, %d", net->name, res);
+ goto exit;
+@@ -1009,6 +1030,8 @@ static int pegasus_open(struct net_devic
+ pegasus->intr_buff, sizeof (pegasus->intr_buff),
+ intr_callback, pegasus, pegasus->intr_interval);
+ if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) {
++ if (res == -ENODEV)
++ netif_device_detach(pegasus->net);
+ if (netif_msg_ifup(pegasus))
+ pr_debug("%s: failed intr_urb, %d\n", net->name, res);
+ usb_kill_urb(pegasus->rx_urb);
diff --git a/usb/usb-new-cp2101-device.patch b/usb/usb-new-cp2101-device.patch
new file mode 100644
index 0000000000000..3b18531ae44f8
--- /dev/null
+++ b/usb/usb-new-cp2101-device.patch
@@ -0,0 +1,35 @@
+From vitja.makarov@gmail.com Tue May 30 13:40:08 2006
+Message-ID: <1925ef8a0605301340t61e49681g3a64c8db3865e5d8@mail.gmail.com>
+Date: Wed, 31 May 2006 00:40:06 +0400
+From: "Vitja Makarov" <vitja.makarov@gmail.com>
+To: "Greg KH" <greg@kroah.com>
+Subject: USB: new cp2101 device
+Content-Disposition: inline
+
+By the way I have to ask you to add new (vid,pid) pair to cp2101 driver.
+
+This device is argussoft's avr in-system programmer AS3M,
+http://atmel.argussoft.ru/hard.htm
+it's based on cp2101 chip and works pretty well with the linux driver.
+
+It could be used with argussoft's `asisp1109.exe'
+(http://atmel.argussoft.ru/download/software/as-tools.soft/asisp.zip)
+tool run under wine.
+
+Signed-off-by: Vitja Makarov <vitja.makarov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/cp2101.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- gregkh-2.6.orig/drivers/usb/serial/cp2101.c
++++ gregkh-2.6/drivers/usb/serial/cp2101.c
+@@ -59,6 +59,7 @@ static struct usb_device_id id_table []
+ { USB_DEVICE(0x10AB, 0x10C5) }, /* Siemens MC60 Cable */
+ { USB_DEVICE(0x10B5, 0xAC70) }, /* Nokia CA-42 USB */
+ { USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */
++ { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */
+ { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */
+ { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */
+ { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */
diff --git a/usb/usb-print-message-when-device-is-rejected-due-to-insufficient-power.patch b/usb/usb-print-message-when-device-is-rejected-due-to-insufficient-power.patch
new file mode 100644
index 0000000000000..d22ebf79bfdf2
--- /dev/null
+++ b/usb/usb-print-message-when-device-is-rejected-due-to-insufficient-power.patch
@@ -0,0 +1,58 @@
+From dsd@ntlworld.com Fri May 26 13:36:37 2006
+From: Daniel Drake <dsd@gentoo.org>
+To: greg@kroah.com
+Cc: <stern@rowland.harvard.edu>
+Subject: USB: print message when device is rejected due to insufficient power
+Message-Id: <20060526203628.DE8BA8946CA@zog.reactivated.net>
+Date: Fri, 26 May 2006 21:36:28 +0100 (BST)
+
+2.6.16 introduces USB power budgeting in the Linux kernel, and since then, a
+fair number of users have observed that some of their devices no longer work in
+unpowered hubs (this is not a bug, the devices claim that they need more than
+100mA).
+
+The very least we can do is print an informational message to the kernel log
+when this happens, otherwise it is not at all clear why the device was not
+accepted.
+
+Signed-off-by: Daniel Drake <dsd@gentoo.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hub.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/usb/core/hub.c
++++ gregkh-2.6/drivers/usb/core/hub.c
+@@ -1176,6 +1176,7 @@ static int choose_configuration(struct u
+ {
+ int i;
+ int num_configs;
++ int insufficient_power = 0;
+ struct usb_host_config *c, *best;
+
+ best = NULL;
+@@ -1228,8 +1229,10 @@ static int choose_configuration(struct u
+ */
+
+ /* Rule out configs that draw too much bus current */
+- if (c->desc.bMaxPower * 2 > udev->bus_mA)
++ if (c->desc.bMaxPower * 2 > udev->bus_mA) {
++ insufficient_power++;
+ continue;
++ }
+
+ /* If the first config's first interface is COMM/2/0xff
+ * (MSFT RNDIS), rule it out unless Linux has host-side
+@@ -1263,6 +1266,11 @@ static int choose_configuration(struct u
+ best = c;
+ }
+
++ if (insufficient_power > 0)
++ dev_info(&udev->dev, "rejected %d configuration%s "
++ "due to insufficient available bus power\n",
++ insufficient_power, plural(insufficient_power));
++
+ if (best) {
+ i = best->desc.bConfigurationValue;
+ dev_info(&udev->dev,
diff --git a/usb/usb-rmmod-pl2303-after-28.patch b/usb/usb-rmmod-pl2303-after-28.patch
new file mode 100644
index 0000000000000..2600ec03eda8c
--- /dev/null
+++ b/usb/usb-rmmod-pl2303-after-28.patch
@@ -0,0 +1,29 @@
+From zaitcev@redhat.com Wed May 24 11:04:22 2006
+Date: Wed, 24 May 2006 11:04:04 -0700
+From: Pete Zaitcev <zaitcev@redhat.com>
+To: greg@kroah.com
+Cc: zaitcev@redhat.com
+Subject: USB: rmmod pl2303 after -28
+Message-Id: <20060524110404.6f179ab8.zaitcev@redhat.com>
+
+Wait for the scheduled work to finish before freeing memory, prevent oops.
+http://bugzilla.kernel.org/show_bug.cgi?id=6596
+
+Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/usb-serial.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- gregkh-2.6.orig/drivers/usb/serial/usb-serial.c
++++ gregkh-2.6/drivers/usb/serial/usb-serial.c
+@@ -162,6 +162,8 @@ static void destroy_serial(struct kref *
+ }
+ }
+
++ flush_scheduled_work(); /* port->work */
++
+ usb_put_dev(serial->dev);
+
+ /* free up any memory that we allocated */
diff --git a/usb/usb-serial-dynamic-id.patch b/usb/usb-serial-dynamic-id.patch
index 5741c7ad2fad9..238c06f401f86 100644
--- a/usb/usb-serial-dynamic-id.patch
+++ b/usb/usb-serial-dynamic-id.patch
@@ -201,7 +201,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
.name = "usbserial",
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
-@@ -587,6 +587,39 @@ static struct usb_serial * create_serial
+@@ -599,6 +599,39 @@ static struct usb_serial * create_serial
return serial;
}
@@ -241,7 +241,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
static struct usb_serial_driver *search_serial_device(struct usb_interface *iface)
{
struct list_head *p;
-@@ -596,11 +629,9 @@ static struct usb_serial_driver *search_
+@@ -608,11 +641,9 @@ static struct usb_serial_driver *search_
/* Check if the usb id matches a known device */
list_for_each(p, &usb_serial_driver_list) {
t = list_entry(p, struct usb_serial_driver, driver_list);
@@ -255,7 +255,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return NULL;
-@@ -652,7 +683,7 @@ int usb_serial_probe(struct usb_interfac
+@@ -664,7 +695,7 @@ int usb_serial_probe(struct usb_interfac
return -EIO;
}
diff --git a/usb/usb-serial-encapsulate-schedule_work-remove-double-calling.patch b/usb/usb-serial-encapsulate-schedule_work-remove-double-calling.patch
new file mode 100644
index 0000000000000..5656c71135bb4
--- /dev/null
+++ b/usb/usb-serial-encapsulate-schedule_work-remove-double-calling.patch
@@ -0,0 +1,262 @@
+From zaitcev@redhat.com Mon May 22 21:59:07 2006
+Date: Mon, 22 May 2006 21:58:49 -0700
+From: Pete Zaitcev <zaitcev@redhat.com>
+To: greg@kroah.com
+Cc: linux-usb-devel@lists.sourceforge.net
+Subject: USB serial: encapsulate schedule_work, remove double-calling
+Message-Id: <20060522215849.c2dafb6e.zaitcev@redhat.com>
+
+I'm going to throw schedule_work away, it's retarded. But for starters,
+let's have it encapsulated.
+
+Also, generic and whiteheat were both calling usb_serial_port_softint
+and scheduled work. Only one was necessary.
+
+Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/serial/cyberjack.c | 2 +-
+ drivers/usb/serial/cypress_m8.c | 2 +-
+ drivers/usb/serial/empeg.c | 2 +-
+ drivers/usb/serial/ftdi_sio.c | 2 +-
+ drivers/usb/serial/garmin_gps.c | 2 +-
+ drivers/usb/serial/generic.c | 4 +---
+ drivers/usb/serial/ipaq.c | 2 +-
+ drivers/usb/serial/ipw.c | 2 +-
+ drivers/usb/serial/ir-usb.c | 2 +-
+ drivers/usb/serial/keyspan.c | 2 +-
+ drivers/usb/serial/kl5kusb105.c | 3 +--
+ drivers/usb/serial/omninet.c | 2 +-
+ drivers/usb/serial/option.c | 3 +--
+ drivers/usb/serial/pl2303.c | 2 +-
+ drivers/usb/serial/usb-serial.c | 14 ++++++++++++--
+ drivers/usb/serial/usb-serial.h | 2 +-
+ drivers/usb/serial/visor.c | 2 +-
+ drivers/usb/serial/whiteheat.c | 4 +---
+ 18 files changed, 29 insertions(+), 25 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/serial/cyberjack.c
++++ gregkh-2.6/drivers/usb/serial/cyberjack.c
+@@ -469,7 +469,7 @@ static void cyberjack_write_bulk_callbac
+
+ exit:
+ spin_unlock(&priv->lock);
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+ static int __init cyberjack_init (void)
+--- gregkh-2.6.orig/drivers/usb/serial/cypress_m8.c
++++ gregkh-2.6/drivers/usb/serial/cypress_m8.c
+@@ -824,7 +824,7 @@ send:
+ priv->bytes_out += count; /* do not count the line control and size bytes */
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ } /* cypress_send */
+
+
+--- gregkh-2.6.orig/drivers/usb/serial/empeg.c
++++ gregkh-2.6/drivers/usb/serial/empeg.c
+@@ -335,7 +335,7 @@ static void empeg_write_bulk_callback (s
+ return;
+ }
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+
+--- gregkh-2.6.orig/drivers/usb/serial/ftdi_sio.c
++++ gregkh-2.6/drivers/usb/serial/ftdi_sio.c
+@@ -1472,7 +1472,7 @@ static void ftdi_write_bulk_callback (st
+ return;
+ }
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ } /* ftdi_write_bulk_callback */
+
+
+--- gregkh-2.6.orig/drivers/usb/serial/garmin_gps.c
++++ gregkh-2.6/drivers/usb/serial/garmin_gps.c
+@@ -1012,7 +1012,7 @@ static void garmin_write_bulk_callback (
+ garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
+ }
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+
+--- gregkh-2.6.orig/drivers/usb/serial/generic.c
++++ gregkh-2.6/drivers/usb/serial/generic.c
+@@ -299,9 +299,7 @@ void usb_serial_generic_write_bulk_callb
+ return;
+ }
+
+- usb_serial_port_softint((void *)port);
+-
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+ EXPORT_SYMBOL_GPL(usb_serial_generic_write_bulk_callback);
+
+--- gregkh-2.6.orig/drivers/usb/serial/ipaq.c
++++ gregkh-2.6/drivers/usb/serial/ipaq.c
+@@ -870,7 +870,7 @@ static void ipaq_write_bulk_callback(str
+ spin_unlock_irqrestore(&write_list_lock, flags);
+ }
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+ static int ipaq_write_room(struct usb_serial_port *port)
+--- gregkh-2.6.orig/drivers/usb/serial/ipw.c
++++ gregkh-2.6/drivers/usb/serial/ipw.c
+@@ -376,7 +376,7 @@ static void ipw_write_bulk_callback(stru
+ if (urb->status)
+ dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status);
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+ static int ipw_write(struct usb_serial_port *port, const unsigned char *buf, int count)
+--- gregkh-2.6.orig/drivers/usb/serial/ir-usb.c
++++ gregkh-2.6/drivers/usb/serial/ir-usb.c
+@@ -408,7 +408,7 @@ static void ir_write_bulk_callback (stru
+ urb->actual_length,
+ urb->transfer_buffer);
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+ static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
+--- gregkh-2.6.orig/drivers/usb/serial/keyspan.c
++++ gregkh-2.6/drivers/usb/serial/keyspan.c
+@@ -481,7 +481,7 @@ static void usa2x_outdat_callback(struct
+ dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]);
+
+ if (port->open_count)
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+ static void usa26_inack_callback(struct urb *urb, struct pt_regs *regs)
+--- gregkh-2.6.orig/drivers/usb/serial/kl5kusb105.c
++++ gregkh-2.6/drivers/usb/serial/kl5kusb105.c
+@@ -569,8 +569,7 @@ static void klsi_105_write_bulk_callback
+ return;
+ }
+
+- /* from generic_write_bulk_callback */
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ } /* klsi_105_write_bulk_completion_callback */
+
+
+--- gregkh-2.6.orig/drivers/usb/serial/omninet.c
++++ gregkh-2.6/drivers/usb/serial/omninet.c
+@@ -320,7 +320,7 @@ static void omninet_write_bulk_callback
+ return;
+ }
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+
+--- gregkh-2.6.orig/drivers/usb/serial/option.c
++++ gregkh-2.6/drivers/usb/serial/option.c
+@@ -365,8 +365,7 @@ static void option_outdat_callback(struc
+
+ port = (struct usb_serial_port *) urb->context;
+
+- if (port->open_count)
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+ static void option_instat_callback(struct urb *urb, struct pt_regs *regs)
+--- gregkh-2.6.orig/drivers/usb/serial/pl2303.c
++++ gregkh-2.6/drivers/usb/serial/pl2303.c
+@@ -314,7 +314,7 @@ static void pl2303_send(struct usb_seria
+ // TODO: reschedule pl2303_send
+ }
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+ static int pl2303_write_room(struct usb_serial_port *port)
+--- gregkh-2.6.orig/drivers/usb/serial/usb-serial.c
++++ gregkh-2.6/drivers/usb/serial/usb-serial.c
+@@ -531,7 +531,17 @@ exit:
+ return -EINVAL;
+ }
+
+-void usb_serial_port_softint(void *private)
++/*
++ * We would be calling tty_wakeup here, but unfortunately some line
++ * disciplines have an annoying habit of calling tty->write from
++ * the write wakeup callback (e.g. n_hdlc.c).
++ */
++void usb_serial_port_softint(struct usb_serial_port *port)
++{
++ schedule_work(&port->work);
++}
++
++static void usb_serial_port_work(void *private)
+ {
+ struct usb_serial_port *port = private;
+ struct tty_struct *tty;
+@@ -794,7 +804,7 @@ int usb_serial_probe(struct usb_interfac
+ port->serial = serial;
+ spin_lock_init(&port->lock);
+ mutex_init(&port->mutex);
+- INIT_WORK(&port->work, usb_serial_port_softint, port);
++ INIT_WORK(&port->work, usb_serial_port_work, port);
+ serial->port[i] = port;
+ }
+
+--- gregkh-2.6.orig/drivers/usb/serial/usb-serial.h
++++ gregkh-2.6/drivers/usb/serial/usb-serial.h
+@@ -236,7 +236,7 @@ struct usb_serial_driver {
+
+ extern int usb_serial_register(struct usb_serial_driver *driver);
+ extern void usb_serial_deregister(struct usb_serial_driver *driver);
+-extern void usb_serial_port_softint(void *private);
++extern void usb_serial_port_softint(struct usb_serial_port *port);
+
+ extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id);
+ extern void usb_serial_disconnect(struct usb_interface *iface);
+--- gregkh-2.6.orig/drivers/usb/serial/visor.c
++++ gregkh-2.6/drivers/usb/serial/visor.c
+@@ -480,7 +480,7 @@ static void visor_write_bulk_callback (s
+ --priv->outstanding_urbs;
+ spin_unlock_irqrestore(&priv->lock, flags);
+
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+
+--- gregkh-2.6.orig/drivers/usb/serial/whiteheat.c
++++ gregkh-2.6/drivers/usb/serial/whiteheat.c
+@@ -1089,9 +1089,7 @@ static void whiteheat_write_callback(str
+ return;
+ }
+
+- usb_serial_port_softint((void *)port);
+-
+- schedule_work(&port->work);
++ usb_serial_port_softint(port);
+ }
+
+
diff --git a/usb/usb-storage-get-rid-of-the-timer-during-urb-submission.patch b/usb/usb-storage-get-rid-of-the-timer-during-urb-submission.patch
new file mode 100644
index 0000000000000..16f2e7ec0abaa
--- /dev/null
+++ b/usb/usb-storage-get-rid-of-the-timer-during-urb-submission.patch
@@ -0,0 +1,86 @@
+From fbh.work@gmail.com Wed May 24 07:54:09 2006
+Message-ID: <44747458.2080203@innova-card.com>
+Date: Wed, 24 May 2006 16:57:28 +0200
+From: Franck Bui-Huu <fbh.work@gmail.com>
+To: Greg KH <greg@kroah.com>
+CC: mdharm-usb@one-eyed-alien.net, Alan Stern <stern@rowland.harvard.edu>
+Subject: usb-storage: get rid of the timer during URB submission
+
+
+This patch uses completion timeout instead of a timer to implement
+a timeout when submitting an URB.
+
+It also put the task in interruptible state instead of an
+uninterruptible one while waiting for the completion.
+
+Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
+Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/transport.c | 38 ++++++++++----------------------------
+ 1 file changed, 10 insertions(+), 28 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/storage/transport.c
++++ gregkh-2.6/drivers/usb/storage/transport.c
+@@ -115,19 +115,6 @@ static void usb_stor_blocking_completion
+
+ complete(urb_done_ptr);
+ }
+-
+-/* This is the timeout handler which will cancel an URB when its timeout
+- * expires.
+- */
+-static void timeout_handler(unsigned long us_)
+-{
+- struct us_data *us = (struct us_data *) us_;
+-
+- if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->flags)) {
+- US_DEBUGP("Timeout -- cancelling URB\n");
+- usb_unlink_urb(us->current_urb);
+- }
+-}
+
+ /* This is the common part of the URB message submission code
+ *
+@@ -138,7 +125,7 @@ static void timeout_handler(unsigned lon
+ static int usb_stor_msg_common(struct us_data *us, int timeout)
+ {
+ struct completion urb_done;
+- struct timer_list to_timer;
++ long timeleft;
+ int status;
+
+ /* don't submit URBs during abort/disconnect processing */
+@@ -185,22 +172,17 @@ static int usb_stor_msg_common(struct us
+ }
+ }
+
+- /* submit the timeout timer, if a timeout was requested */
+- if (timeout > 0) {
+- init_timer(&to_timer);
+- to_timer.expires = jiffies + timeout;
+- to_timer.function = timeout_handler;
+- to_timer.data = (unsigned long) us;
+- add_timer(&to_timer);
+- }
+-
+ /* wait for the completion of the URB */
+- wait_for_completion(&urb_done);
+- clear_bit(US_FLIDX_URB_ACTIVE, &us->flags);
++ timeleft = wait_for_completion_interruptible_timeout(
++ &urb_done, timeout ? : MAX_SCHEDULE_TIMEOUT);
+
+- /* clean up the timeout timer */
+- if (timeout > 0)
+- del_timer_sync(&to_timer);
++ clear_bit(US_FLIDX_URB_ACTIVE, &us->flags);
++
++ if (timeleft <= 0) {
++ US_DEBUGP("%s -- cancelling URB\n",
++ timeleft == 0 ? "Timeout" : "Signal");
++ usb_unlink_urb(us->current_urb);
++ }
+
+ /* return the URB status */
+ return us->current_urb->status;
diff --git a/usb/usb-syntax-cleanup-for-pl2303.patch b/usb/usb-syntax-cleanup-for-pl2303.patch
new file mode 100644
index 0000000000000..f710306e5fd34
--- /dev/null
+++ b/usb/usb-syntax-cleanup-for-pl2303.patch
@@ -0,0 +1,28 @@
+From zaitcev@redhat.com Mon May 22 22:05:32 2006
+Date: Mon, 22 May 2006 22:05:17 -0700
+From: Pete Zaitcev <zaitcev@redhat.com>
+To: greg@kroah.com
+Cc: zaitcev@redhat.com
+Subject: USB: Syntax cleanup for pl2303 (trailing backslash)
+Message-Id: <20060522220517.c1183e0c.zaitcev@redhat.com>
+
+Remove the silly trailing backslash.
+
+Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/pl2303.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/usb/serial/pl2303.c
++++ gregkh-2.6/drivers/usb/serial/pl2303.c
+@@ -600,7 +600,7 @@ static void pl2303_close (struct usb_ser
+ unsigned int c_cflag;
+ int bps;
+ long timeout;
+- wait_queue_t wait; \
++ wait_queue_t wait;
+
+ dbg("%s - port %d", __FUNCTION__, port->number);
+
diff --git a/usb/usbcore-fix-broken-rndis-config-selection.patch b/usb/usbcore-fix-broken-rndis-config-selection.patch
new file mode 100644
index 0000000000000..ab66635d57ed4
--- /dev/null
+++ b/usb/usbcore-fix-broken-rndis-config-selection.patch
@@ -0,0 +1,32 @@
+From stern@rowland.harvard.edu Tue May 30 07:12:34 2006
+Date: Tue, 30 May 2006 10:12:30 -0400 (EDT)
+From: Giridhar Pemmasani <giri@lmc.cs.sunysb.edu>
+To: Greg KH <greg@kroah.com>, Giridhar Pemmasani <giri@lmc.cs.sunysb.edu>
+Subject: usbcore: Fix broken RNDIS config selection
+Message-ID: <Pine.LNX.4.44L0.0605301009410.5821-100000@iolanthe.rowland.org>
+
+From: Giridhar Pemmasani <giri@lmc.cs.sunysb.edu>
+
+RNDIS devices don't get configured owing to a typo in
+choose_configuration(). This patch from Giridhar Pemmasani fixes the
+typo.
+
+From: Giridhar Pemmasani <giri@lmc.cs.sunysb.edu>
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hub.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/usb/core/hub.c
++++ gregkh-2.6/drivers/usb/core/hub.c
+@@ -1241,7 +1241,7 @@ static int choose_configuration(struct u
+ && desc->bInterfaceClass == USB_CLASS_COMM
+ && desc->bInterfaceSubClass == 2
+ && desc->bInterfaceProtocol == 0xff) {
+-#ifndef CONFIG_USB_NET_RNDIS
++#ifndef CONFIG_USB_NET_RNDIS_HOST
+ continue;
+ #else
+ best = c;
diff --git a/usb/usbhid-remove-unneeded-blacklist-entries.patch b/usb/usbhid-remove-unneeded-blacklist-entries.patch
new file mode 100644
index 0000000000000..95c840a6527d2
--- /dev/null
+++ b/usb/usbhid-remove-unneeded-blacklist-entries.patch
@@ -0,0 +1,87 @@
+From stern@rowland.harvard.edu Tue May 30 07:21:21 2006
+Date: Tue, 30 May 2006 10:21:14 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+cc: Vojtech Pavlik <vojtech@suse.cz>, Dmitry Torokhov <dtor_core@ameritech.net>
+Subject: usbhid: Remove unneeded blacklist entries
+Message-ID: <Pine.LNX.4.44L0.0605301013280.5821-100000@iolanthe.rowland.org>
+
+Now that usbhid automatically applies HID_QUIRK_NOGET to keyboards and
+mice, we no longer need the blacklist entries that were present for no
+other purpose. This patch (as698) removes them.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Acked-by: Vojtech Pavlik <vojtech@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/input/hid-core.c | 28 ----------------------------
+ 1 file changed, 28 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/input/hid-core.c
++++ gregkh-2.6/drivers/usb/input/hid-core.c
+@@ -1374,9 +1374,6 @@ void hid_close(struct hid_device *hid)
+
+ #define USB_VENDOR_ID_PANJIT 0x134c
+
+-#define USB_VENDOR_ID_SILVERCREST 0x062a
+-#define USB_DEVICE_ID_SILVERCREST_KB 0x0201
+-
+ /*
+ * Initialize all reports
+ */
+@@ -1461,9 +1458,6 @@ void hid_init_reports(struct hid_device
+ #define USB_VENDOR_ID_ONTRAK 0x0a07
+ #define USB_DEVICE_ID_ONTRAK_ADU100 0x0064
+
+-#define USB_VENDOR_ID_TANGTOP 0x0d3d
+-#define USB_DEVICE_ID_TANGTOP_USBPS2 0x0001
+-
+ #define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f
+ #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100
+
+@@ -1520,12 +1514,6 @@ void hid_init_reports(struct hid_device
+ #define USB_DEVICE_ID_MCC_PMD1024LS 0x0076
+ #define USB_DEVICE_ID_MCC_PMD1208LS 0x007a
+
+-#define USB_VENDOR_ID_CHICONY 0x04f2
+-#define USB_DEVICE_ID_CHICONY_USBHUB_KB 0x0100
+-
+-#define USB_VENDOR_ID_BTC 0x046e
+-#define USB_DEVICE_ID_BTC_KEYBOARD 0x5303
+-
+ #define USB_VENDOR_ID_VERNIER 0x08f7
+ #define USB_DEVICE_ID_VERNIER_LABPRO 0x0001
+ #define USB_DEVICE_ID_VERNIER_GOTEMP 0x0002
+@@ -1554,15 +1542,6 @@ void hid_init_reports(struct hid_device
+ #define USB_VENDOR_ID_CHERRY 0x046a
+ #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023
+
+-#define USB_VENDOR_ID_HP 0x03f0
+-#define USB_DEVICE_ID_HP_USBHUB_KB 0x020c
+-
+-#define USB_VENDOR_ID_IBM 0x04b3
+-#define USB_DEVICE_ID_IBM_USBHUB_KB 0x3005
+-
+-#define USB_VENDOR_ID_CREATIVELABS 0x062a
+-#define USB_DEVICE_ID_CREATIVELABS_SILVERCREST 0x0201
+-
+ #define USB_VENDOR_ID_YEALINK 0x6993
+ #define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K 0xb001
+ /*
+@@ -1683,14 +1662,7 @@ static const struct hid_blacklist {
+ { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
+ { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET },
+ { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
+- { USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_KEYBOARD, HID_QUIRK_NOGET},
+- { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_USBHUB_KB, HID_QUIRK_NOGET},
+- { USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVELABS_SILVERCREST, HID_QUIRK_NOGET },
+- { USB_VENDOR_ID_HP, USB_DEVICE_ID_HP_USBHUB_KB, HID_QUIRK_NOGET },
+- { USB_VENDOR_ID_IBM, USB_DEVICE_ID_IBM_USBHUB_KB, HID_QUIRK_NOGET },
+- { USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET },
+ { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
+- { USB_VENDOR_ID_SILVERCREST, USB_DEVICE_ID_SILVERCREST_KB, HID_QUIRK_NOGET },
+
+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
+ { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 },
diff --git a/usb/usbtest-report-errors-in-iso-tests.patch b/usb/usbtest-report-errors-in-iso-tests.patch
new file mode 100644
index 0000000000000..cd1fe1eb71153
--- /dev/null
+++ b/usb/usbtest-report-errors-in-iso-tests.patch
@@ -0,0 +1,125 @@
+From stern@rowland.harvard.edu Mon May 22 13:47:15 2006
+Date: Mon, 22 May 2006 16:47:13 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>, David Brownell <david-b@pacbell.net>
+cc: USB development list <linux-usb-devel@lists.sourceforge.net>
+Subject: usbtest: report errors in iso tests
+Message-ID: <Pine.LNX.4.44L0.0605221643560.5848-100000@iolanthe.rowland.org>
+
+This patch (as693b) makes the usbtest driver report errors in the
+isochronous bulk transfer tests instead of always returning 0. As an
+arbitrary cutoff, an error is returned if more than 10% of the packet
+transfers fail. It also stops a test immediately upon receiving an URB
+submission error.
+
+For a test harness, it's especially important to report when errors occur!
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/misc/usbtest.c | 36 +++++++++++++++++++++++++++++-------
+ 1 file changed, 29 insertions(+), 7 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/misc/usbtest.c
++++ gregkh-2.6/drivers/usb/misc/usbtest.c
+@@ -1337,7 +1337,9 @@ struct iso_context {
+ unsigned pending;
+ spinlock_t lock;
+ struct completion done;
++ int submit_error;
+ unsigned long errors;
++ unsigned long packet_count;
+ struct usbtest_dev *dev;
+ };
+
+@@ -1348,10 +1350,14 @@ static void iso_callback (struct urb *ur
+ spin_lock(&ctx->lock);
+ ctx->count--;
+
++ ctx->packet_count += urb->number_of_packets;
+ if (urb->error_count > 0)
+ ctx->errors += urb->error_count;
++ else if (urb->status != 0)
++ ctx->errors += urb->number_of_packets;
+
+- if (urb->status == 0 && ctx->count > (ctx->pending - 1)) {
++ if (urb->status == 0 && ctx->count > (ctx->pending - 1)
++ && !ctx->submit_error) {
+ int status = usb_submit_urb (urb, GFP_ATOMIC);
+ switch (status) {
+ case 0:
+@@ -1362,6 +1368,8 @@ static void iso_callback (struct urb *ur
+ status);
+ /* FALLTHROUGH */
+ case -ENODEV: /* disconnected */
++ case -ESHUTDOWN: /* endpoint disabled */
++ ctx->submit_error = 1;
+ break;
+ }
+ }
+@@ -1371,8 +1379,8 @@ static void iso_callback (struct urb *ur
+ if (ctx->pending == 0) {
+ if (ctx->errors)
+ dev_dbg (&ctx->dev->intf->dev,
+- "iso test, %lu errors\n",
+- ctx->errors);
++ "iso test, %lu errors out of %lu\n",
++ ctx->errors, ctx->packet_count);
+ complete (&ctx->done);
+ }
+ done:
+@@ -1433,15 +1441,14 @@ test_iso_queue (struct usbtest_dev *dev,
+ struct usb_device *udev;
+ unsigned i;
+ unsigned long packets = 0;
+- int status;
++ int status = 0;
+ struct urb *urbs[10]; /* FIXME no limit */
+
+ if (param->sglen > 10)
+ return -EDOM;
+
++ memset(&context, 0, sizeof context);
+ context.count = param->iterations * param->sglen;
+- context.pending = param->sglen;
+- context.errors = 0;
+ context.dev = dev;
+ init_completion (&context.done);
+ spin_lock_init (&context.lock);
+@@ -1473,6 +1480,7 @@ test_iso_queue (struct usbtest_dev *dev,
+
+ spin_lock_irq (&context.lock);
+ for (i = 0; i < param->sglen; i++) {
++ ++context.pending;
+ status = usb_submit_urb (urbs [i], SLAB_ATOMIC);
+ if (status < 0) {
+ ERROR (dev, "submit iso[%d], error %d\n", i, status);
+@@ -1483,12 +1491,26 @@ test_iso_queue (struct usbtest_dev *dev,
+
+ simple_free_urb (urbs [i]);
+ context.pending--;
++ context.submit_error = 1;
++ break;
+ }
+ }
+ spin_unlock_irq (&context.lock);
+
+ wait_for_completion (&context.done);
+- return 0;
++
++ /*
++ * Isochronous transfers are expected to fail sometimes. As an
++ * arbitrary limit, we will report an error if any submissions
++ * fail or if the transfer failure rate is > 10%.
++ */
++ if (status != 0)
++ ;
++ else if (context.submit_error)
++ status = -EACCES;
++ else if (context.errors > context.packet_count / 10)
++ status = -EIO;
++ return status;
+
+ fail:
+ for (i = 0; i < param->sglen; i++) {