]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
start .27 queue
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Jul 2009 23:24:05 +0000 (16:24 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Jul 2009 23:24:05 +0000 (16:24 -0700)
12 files changed:
queue-2.6.27/fix-rcu-callback-after-kmem_cache_destroy-problem-in-slb.patch [new file with mode: 0644]
queue-2.6.27/gigaset-accept-connection-establishment-messages-in-any-order.patch [new file with mode: 0644]
queue-2.6.27/scsi-zalon-fix-oops-on-attach-failure.patch [new file with mode: 0644]
queue-2.6.27/series [new file with mode: 0644]
queue-2.6.27/sound-usb-audio-add-workaround-for-blue-microphones-devices.patch [new file with mode: 0644]
queue-2.6.27/sound-virtuoso-fix-xonar-d1-dx-silence-after-resume.patch [new file with mode: 0644]
queue-2.6.27/usb-ehci-report-actual_length-for-iso-transfers.patch [new file with mode: 0644]
queue-2.6.27/usb-fix-memleak-in-usbfs.patch [new file with mode: 0644]
queue-2.6.27/usb-fix-uninitialised-variable-in-ti_do_download.patch [new file with mode: 0644]
queue-2.6.27/usb-handle-zero-length-usbfs-submissions-correctly.patch [new file with mode: 0644]
queue-2.6.27/usb-rndis-gadget-fix-issues-talking-from-pxa.patch [new file with mode: 0644]
queue-2.6.27/usb-ti_usb_3410_5052-fix-duplicate-device-ids.patch [new file with mode: 0644]

diff --git a/queue-2.6.27/fix-rcu-callback-after-kmem_cache_destroy-problem-in-slb.patch b/queue-2.6.27/fix-rcu-callback-after-kmem_cache_destroy-problem-in-slb.patch
new file mode 100644 (file)
index 0000000..0422372
--- /dev/null
@@ -0,0 +1,58 @@
+From 7ed9f7e5db58c6e8c2b4b738a75d5dcd8e17aad5 Mon Sep 17 00:00:00 2001
+From: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+Date: Thu, 25 Jun 2009 12:31:37 -0700
+Subject: fix RCU-callback-after-kmem_cache_destroy problem in sl[aou]b
+
+From: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+
+commit 7ed9f7e5db58c6e8c2b4b738a75d5dcd8e17aad5 upstream.
+
+Jesper noted that kmem_cache_destroy() invokes synchronize_rcu() rather than
+rcu_barrier() in the SLAB_DESTROY_BY_RCU case, which could result in RCU
+callbacks accessing a kmem_cache after it had been destroyed.
+
+Acked-by: Matt Mackall <mpm@selenic.com>
+Reported-by: Jesper Dangaard Brouer <hawk@comx.dk>
+Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/slab.c |    2 +-
+ mm/slob.c |    2 ++
+ mm/slub.c |    2 ++
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+--- a/mm/slab.c
++++ b/mm/slab.c
+@@ -2580,7 +2580,7 @@ void kmem_cache_destroy(struct kmem_cach
+       }
+       if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU))
+-              synchronize_rcu();
++              rcu_barrier();
+       __kmem_cache_destroy(cachep);
+       mutex_unlock(&cache_chain_mutex);
+--- a/mm/slob.c
++++ b/mm/slob.c
+@@ -561,6 +561,8 @@ EXPORT_SYMBOL(kmem_cache_create);
+ void kmem_cache_destroy(struct kmem_cache *c)
+ {
++      if (c->flags & SLAB_DESTROY_BY_RCU)
++              rcu_barrier();
+       slob_free(c, sizeof(struct kmem_cache));
+ }
+ EXPORT_SYMBOL(kmem_cache_destroy);
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -2447,6 +2447,8 @@ static inline int kmem_cache_close(struc
+  */
+ void kmem_cache_destroy(struct kmem_cache *s)
+ {
++      if (s->flags & SLAB_DESTROY_BY_RCU)
++              rcu_barrier();
+       down_write(&slub_lock);
+       s->refcount--;
+       if (!s->refcount) {
diff --git a/queue-2.6.27/gigaset-accept-connection-establishment-messages-in-any-order.patch b/queue-2.6.27/gigaset-accept-connection-establishment-messages-in-any-order.patch
new file mode 100644 (file)
index 0000000..b786a84
--- /dev/null
@@ -0,0 +1,100 @@
+From bceb0f126f25184eaec3f3c8f00c92b0d899e5de Mon Sep 17 00:00:00 2001
+From: Tilman Schmidt <tilman@imap.cc>
+Date: Wed, 1 Jul 2009 11:20:57 +0000
+Subject: gigaset: accept connection establishment messages in any order
+
+From: Tilman Schmidt <tilman@imap.cc>
+
+commit bceb0f126f25184eaec3f3c8f00c92b0d899e5de upstream.
+
+ISDN connection setup failed if the "connection active" and
+"B channel up" messages from the device arrived in a different
+order than expected. Modify the state machine to accept them in
+any order.
+
+Impact: bugfix
+
+Signed-off-by: Tilman Schmidt <tilman@imap.cc>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/isdn/gigaset/ev-layer.c |   44 ++++++++++++++++++----------------------
+ 1 file changed, 20 insertions(+), 24 deletions(-)
+
+--- a/drivers/isdn/gigaset/ev-layer.c
++++ b/drivers/isdn/gigaset/ev-layer.c
+@@ -307,32 +307,33 @@ struct reply_t gigaset_tab_cid_m10x[] = 
+       {RSP_OK,      604,604, -1,                605, 5, {ACT_CMD+AT_MSN}},
+       {RSP_OK,      605,605, -1,                606, 5, {ACT_CMD+AT_ISO}},
+       {RSP_NULL,    605,605, -1,                606, 5, {ACT_CMD+AT_ISO}},
+-      {RSP_OK,      606,606, -1,                607, 5, {0},             "+VLS=17\r"}, /* set "Endgeraetemodus" */
++      {RSP_OK,      606,606, -1,                607, 5, {0}, "+VLS=17\r"},
+       {RSP_OK,      607,607, -1,                608,-1},
+-      //{RSP_ZSAU,    608,608,ZSAU_PROCEEDING,    608, 0, {ACT_ERROR}},//DELETE
+       {RSP_ZSAU,    608,608,ZSAU_PROCEEDING,    609, 5, {ACT_CMD+AT_DIAL}},
+       {RSP_OK,      609,609, -1,                650, 0, {ACT_DIALING}},
+-      {RSP_ZVLS,    608,608, 17,                 -1,-1, {ACT_DEBUG}},
+-      {RSP_ZCTP,    609,609, -1,                 -1,-1, {ACT_DEBUG}},
+-      {RSP_ZCPN,    609,609, -1,                 -1,-1, {ACT_DEBUG}},
+       {RSP_ERROR,   601,609, -1,                  0, 0, {ACT_ABORTDIAL}},
+       {EV_TIMEOUT,  601,609, -1,                  0, 0, {ACT_ABORTDIAL}},
+-      /* dialing */
+-      {RSP_ZCTP,    650,650, -1,                 -1,-1, {ACT_DEBUG}},
+-      {RSP_ZCPN,    650,650, -1,                 -1,-1, {ACT_DEBUG}},
+-      {RSP_ZSAU,    650,650,ZSAU_CALL_DELIVERED, -1,-1, {ACT_DEBUG}}, /* some devices don't send this */
+-
+-      /* connection established  */
+-      {RSP_ZSAU,    650,650,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT}}, //FIXME -> DLE1
+-      {RSP_ZSAU,    750,750,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT}}, //FIXME -> DLE1
+-
+-      {EV_BC_OPEN,  800,800, -1,                800,-1, {ACT_NOTIFY_BC_UP}}, //FIXME new constate + timeout
++      /* optional dialing responses */
++      {EV_BC_OPEN,  650,650, -1,                651,-1},
++      {RSP_ZVLS,    608,651, 17,                 -1,-1, {ACT_DEBUG}},
++      {RSP_ZCTP,    609,651, -1,                 -1,-1, {ACT_DEBUG}},
++      {RSP_ZCPN,    609,651, -1,                 -1,-1, {ACT_DEBUG}},
++      {RSP_ZSAU,    650,651,ZSAU_CALL_DELIVERED, -1,-1, {ACT_DEBUG}},
++
++      /* connect */
++      {RSP_ZSAU,    650,650,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT}},
++      {RSP_ZSAU,    651,651,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT,
++                                                         ACT_NOTIFY_BC_UP}},
++      {RSP_ZSAU,    750,750,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT}},
++      {RSP_ZSAU,    751,751,ZSAU_ACTIVE,        800,-1, {ACT_CONNECT,
++                                                         ACT_NOTIFY_BC_UP}},
++      {EV_BC_OPEN,  800,800, -1,                800,-1, {ACT_NOTIFY_BC_UP}},
+       /* remote hangup */
+-      {RSP_ZSAU,    650,650,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEREJECT}},
+-      {RSP_ZSAU,    750,750,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEHUP}},
++      {RSP_ZSAU,    650,651,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEREJECT}},
++      {RSP_ZSAU,    750,751,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEHUP}},
+       {RSP_ZSAU,    800,800,ZSAU_DISCONNECT_IND,  0, 0, {ACT_REMOTEHUP}},
+       /* hangup */
+@@ -371,7 +372,8 @@ struct reply_t gigaset_tab_cid_m10x[] = 
+       {RSP_ZSAU,    700,729,ZSAU_ACTIVE,          0, 0, {ACT_ABORTACCEPT}},
+       {RSP_ZSAU,    700,729,ZSAU_DISCONNECT_IND,  0, 0, {ACT_ABORTACCEPT}},
+-      {EV_TIMEOUT,  750,750, -1,                  0, 0, {ACT_CONNTIMEOUT}},
++      {EV_BC_OPEN,  750,750, -1,                751,-1},
++      {EV_TIMEOUT,  750,751, -1,                  0, 0, {ACT_CONNTIMEOUT}},
+       /* B channel closed (general case) */
+       {EV_BC_CLOSED, -1, -1, -1,                 -1,-1, {ACT_NOTIFY_BC_DOWN}}, //FIXME
+@@ -914,12 +916,6 @@ static void bchannel_down(struct bc_stat
+ static void bchannel_up(struct bc_state *bcs)
+ {
+-      if (!(bcs->chstate & CHS_D_UP)) {
+-              dev_notice(bcs->cs->dev, "%s: D channel not up\n", __func__);
+-              bcs->chstate |= CHS_D_UP;
+-              gigaset_i4l_channel_cmd(bcs, ISDN_STAT_DCONN);
+-      }
+-
+       if (bcs->chstate & CHS_B_UP) {
+               dev_notice(bcs->cs->dev, "%s: B channel already up\n",
+                          __func__);
diff --git a/queue-2.6.27/scsi-zalon-fix-oops-on-attach-failure.patch b/queue-2.6.27/scsi-zalon-fix-oops-on-attach-failure.patch
new file mode 100644 (file)
index 0000000..b05e549
--- /dev/null
@@ -0,0 +1,35 @@
+From d3a263a8168f78874254ea9da9595cfb0f3e96d7 Mon Sep 17 00:00:00 2001
+From: James Bottomley <James.Bottomley@HansenPartnership.com>
+Date: Wed, 24 Jun 2009 19:55:22 +0000
+Subject: SCSI: zalon: fix oops on attach failure
+
+From: James Bottomley <James.Bottomley@HansenPartnership.com>
+
+commit d3a263a8168f78874254ea9da9595cfb0f3e96d7 upstream.
+
+I recently discovered on my zalon that if the attachment fails because
+of a bus misconfiguration (I scrapped my HVD array, so the card is now
+unterminated) then the system oopses.  The reason is that if
+ncr_attach() returns NULL (signalling failure) that NULL is passed by
+the goto failed straight into ncr_detach() which oopses.
+
+The fix is just to return -ENODEV in this case.
+
+Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/zalon.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/zalon.c
++++ b/drivers/scsi/zalon.c
+@@ -134,7 +134,7 @@ zalon_probe(struct parisc_device *dev)
+       host = ncr_attach(&zalon7xx_template, unit, &device);
+       if (!host)
+-              goto fail;
++              return -ENODEV;
+       if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) {
+               printk(KERN_ERR "%s: irq problem with %d, detaching\n ",
diff --git a/queue-2.6.27/series b/queue-2.6.27/series
new file mode 100644 (file)
index 0000000..5d9361e
--- /dev/null
@@ -0,0 +1,11 @@
+fix-rcu-callback-after-kmem_cache_destroy-problem-in-slb.patch
+gigaset-accept-connection-establishment-messages-in-any-order.patch
+scsi-zalon-fix-oops-on-attach-failure.patch
+sound-usb-audio-add-workaround-for-blue-microphones-devices.patch
+sound-virtuoso-fix-xonar-d1-dx-silence-after-resume.patch
+usb-ehci-report-actual_length-for-iso-transfers.patch
+usb-fix-memleak-in-usbfs.patch
+usb-fix-uninitialised-variable-in-ti_do_download.patch
+usb-handle-zero-length-usbfs-submissions-correctly.patch
+usb-rndis-gadget-fix-issues-talking-from-pxa.patch
+usb-ti_usb_3410_5052-fix-duplicate-device-ids.patch
diff --git a/queue-2.6.27/sound-usb-audio-add-workaround-for-blue-microphones-devices.patch b/queue-2.6.27/sound-usb-audio-add-workaround-for-blue-microphones-devices.patch
new file mode 100644 (file)
index 0000000..240c26a
--- /dev/null
@@ -0,0 +1,56 @@
+From 8886f33f25083a47d5fa24ad7b57bb708c5c5403 Mon Sep 17 00:00:00 2001
+From: Clemens Ladisch <clemens@ladisch.de>
+Date: Mon, 13 Jul 2009 13:21:58 +0200
+Subject: sound: usb-audio: add workaround for Blue Microphones devices
+
+From: Clemens Ladisch <clemens@ladisch.de>
+
+commit 8886f33f25083a47d5fa24ad7b57bb708c5c5403 upstream.
+
+Blue Microphones USB devices have an alternate setting that sends two
+channels of data to the computer.  Unfortunately, the descriptors of
+that altsetting have a wrong channel setting, which means that any
+recorded data from such a device has twice the sample rate from what
+would be expected.
+
+This patch adds a workaround to ignore that altsetting.  Since these
+devices have only one actual channel, no data is lost.
+
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/usb/usbaudio.c |   14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+--- a/sound/usb/usbaudio.c
++++ b/sound/usb/usbaudio.c
+@@ -2674,7 +2674,7 @@ static int parse_audio_endpoints(struct 
+       struct usb_interface_descriptor *altsd;
+       int i, altno, err, stream;
+       int format;
+-      struct audioformat *fp;
++      struct audioformat *fp = NULL;
+       unsigned char *fmt, *csep;
+       int num;
+@@ -2747,6 +2747,18 @@ static int parse_audio_endpoints(struct 
+                       continue;
+               }
++              /*
++               * Blue Microphones workaround: The last altsetting is identical
++               * with the previous one, except for a larger packet size, but
++               * is actually a mislabeled two-channel setting; ignore it.
++               */
++              if (fmt[4] == 1 && fmt[5] == 2 && altno == 2 && num == 3 &&
++                  fp && fp->altsetting == 1 && fp->channels == 1 &&
++                  fp->format == SNDRV_PCM_FORMAT_S16_LE &&
++                  le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize) ==
++                                                      fp->maxpacksize * 2)
++                      continue;
++
+               csep = snd_usb_find_desc(alts->endpoint[0].extra, alts->endpoint[0].extralen, NULL, USB_DT_CS_ENDPOINT);
+               /* Creamware Noah has this descriptor after the 2nd endpoint */
+               if (!csep && altsd->bNumEndpoints >= 2)
diff --git a/queue-2.6.27/sound-virtuoso-fix-xonar-d1-dx-silence-after-resume.patch b/queue-2.6.27/sound-virtuoso-fix-xonar-d1-dx-silence-after-resume.patch
new file mode 100644 (file)
index 0000000..7bfce7f
--- /dev/null
@@ -0,0 +1,34 @@
+From 826390796d09444b93e1f957582f8970ddfd9b3d Mon Sep 17 00:00:00 2001
+From: Clemens Ladisch <clemens@ladisch.de>
+Date: Thu, 2 Jul 2009 08:31:30 +0200
+Subject: sound: virtuoso: fix Xonar D1/DX silence after resume
+
+From: Clemens Ladisch <clemens@ladisch.de>
+
+commit 826390796d09444b93e1f957582f8970ddfd9b3d upstream.
+
+When resuming, we better take the DACs out of the reset state before
+trying to use them.
+
+Reference: kernel bug #13599
+       http://bugzilla.kernel.org/show_bug.cgi?id=13599
+
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/oxygen/virtuoso.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/pci/oxygen/virtuoso.c
++++ b/sound/pci/oxygen/virtuoso.c
+@@ -376,6 +376,8 @@ static void xonar_d2_resume(struct oxyge
+ static void xonar_d1_resume(struct oxygen *chip)
+ {
++      oxygen_set_bits8(chip, OXYGEN_FUNCTION, OXYGEN_FUNCTION_RESET_CODEC);
++      msleep(1);
+       cs43xx_init(chip);
+       xonar_enable_output(chip);
+ }
diff --git a/queue-2.6.27/usb-ehci-report-actual_length-for-iso-transfers.patch b/queue-2.6.27/usb-ehci-report-actual_length-for-iso-transfers.patch
new file mode 100644 (file)
index 0000000..625921e
--- /dev/null
@@ -0,0 +1,51 @@
+From ec6d67e39f5638c792eb7490bf32586ccb9d8005 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 29 Jun 2009 14:34:59 -0400
+Subject: USB: EHCI: report actual_length for iso transfers
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit ec6d67e39f5638c792eb7490bf32586ccb9d8005 upstream.
+
+This patch (as1259b) makes ehci-hcd return the total number of bytes
+transferred in urb->actual_length for Isochronous transfers.
+Until now, the actual_length value was unaccountably left at 0.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-sched.c |   12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/host/ehci-sched.c
++++ b/drivers/usb/host/ehci-sched.c
+@@ -1617,11 +1617,14 @@ itd_complete (
+                               desc->status = -EPROTO;
+                       /* HC need not update length with this error */
+-                      if (!(t & EHCI_ISOC_BABBLE))
+-                              desc->actual_length = EHCI_ITD_LENGTH (t);
++                      if (!(t & EHCI_ISOC_BABBLE)) {
++                              desc->actual_length = EHCI_ITD_LENGTH(t);
++                              urb->actual_length += desc->actual_length;
++                      }
+               } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) {
+                       desc->status = 0;
+-                      desc->actual_length = EHCI_ITD_LENGTH (t);
++                      desc->actual_length = EHCI_ITD_LENGTH(t);
++                      urb->actual_length += desc->actual_length;
+               } else {
+                       /* URB was too late */
+                       desc->status = -EXDEV;
+@@ -2012,7 +2015,8 @@ sitd_complete (
+                       desc->status = -EPROTO;
+       } else {
+               desc->status = 0;
+-              desc->actual_length = desc->length - SITD_LENGTH (t);
++              desc->actual_length = desc->length - SITD_LENGTH(t);
++              urb->actual_length += desc->actual_length;
+       }
+       stream->depth -= stream->interval << 3;
diff --git a/queue-2.6.27/usb-fix-memleak-in-usbfs.patch b/queue-2.6.27/usb-fix-memleak-in-usbfs.patch
new file mode 100644 (file)
index 0000000..ee53417
--- /dev/null
@@ -0,0 +1,63 @@
+From d794a02111cd3393da69bc7d6dd2b6074bd037cc Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oliver@neukum.org>
+Date: Sun, 28 Jun 2009 23:34:14 +0200
+Subject: USB: fix memleak in usbfs
+
+From: Oliver Neukum <oliver@neukum.org>
+
+commit d794a02111cd3393da69bc7d6dd2b6074bd037cc upstream.
+
+This patch fixes a memory leak in devio.c::processcompl
+
+If writing to user space fails the packet must be discarded, as it
+already has been removed from the queue of completed packets.
+
+Signed-off-by: Oliver Neukum <oliver@neukum.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/devio.c |   16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/core/devio.c
++++ b/drivers/usb/core/devio.c
+@@ -1228,22 +1228,22 @@ static int processcompl(struct async *as
+       if (as->userbuffer)
+               if (copy_to_user(as->userbuffer, urb->transfer_buffer,
+                                urb->transfer_buffer_length))
+-                      return -EFAULT;
++                      goto err_out;
+       if (put_user(as->status, &userurb->status))
+-              return -EFAULT;
++              goto err_out;
+       if (put_user(urb->actual_length, &userurb->actual_length))
+-              return -EFAULT;
++              goto err_out;
+       if (put_user(urb->error_count, &userurb->error_count))
+-              return -EFAULT;
++              goto err_out;
+       if (usb_endpoint_xfer_isoc(&urb->ep->desc)) {
+               for (i = 0; i < urb->number_of_packets; i++) {
+                       if (put_user(urb->iso_frame_desc[i].actual_length,
+                                    &userurb->iso_frame_desc[i].actual_length))
+-                              return -EFAULT;
++                              goto err_out;
+                       if (put_user(urb->iso_frame_desc[i].status,
+                                    &userurb->iso_frame_desc[i].status))
+-                              return -EFAULT;
++                              goto err_out;
+               }
+       }
+@@ -1252,6 +1252,10 @@ static int processcompl(struct async *as
+       if (put_user(addr, (void __user * __user *)arg))
+               return -EFAULT;
+       return 0;
++
++err_out:
++      free_async(as);
++      return -EFAULT;
+ }
+ static struct async *reap_as(struct dev_state *ps)
diff --git a/queue-2.6.27/usb-fix-uninitialised-variable-in-ti_do_download.patch b/queue-2.6.27/usb-fix-uninitialised-variable-in-ti_do_download.patch
new file mode 100644 (file)
index 0000000..bf6f591
--- /dev/null
@@ -0,0 +1,28 @@
+From 87ea8c887905d8b13ae90b537117592ed027632a Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oliver@neukum.org>
+Date: Tue, 30 Jun 2009 09:44:24 +0200
+Subject: USB: fix uninitialised variable in ti_do_download
+
+From: Oliver Neukum <oliver@neukum.org>
+
+commit 87ea8c887905d8b13ae90b537117592ed027632a upstream.
+
+Signed-off-by: Oliver Neukum <oliver@neukum.org>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ti_usb_3410_5052.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/ti_usb_3410_5052.c
++++ b/drivers/usb/serial/ti_usb_3410_5052.c
+@@ -1703,7 +1703,7 @@ static int ti_do_download(struct usb_dev
+       u8 cs = 0;
+       int done;
+       struct ti_firmware_header *header;
+-      int status;
++      int status = 0;
+       int len;
+       for (pos = sizeof(struct ti_firmware_header); pos < size; pos++)
diff --git a/queue-2.6.27/usb-handle-zero-length-usbfs-submissions-correctly.patch b/queue-2.6.27/usb-handle-zero-length-usbfs-submissions-correctly.patch
new file mode 100644 (file)
index 0000000..5fbb16a
--- /dev/null
@@ -0,0 +1,123 @@
+From 9180135bc80ab11199d482b6111e23f74d65af4a Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 29 Jun 2009 11:04:54 -0400
+Subject: USB: handle zero-length usbfs submissions correctly
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 9180135bc80ab11199d482b6111e23f74d65af4a upstream.
+
+This patch (as1262) fixes a bug in usbfs: It refuses to accept
+zero-length transfers, and it insists that the buffer pointer be valid
+even if there is no data being transferred.
+
+The patch also consolidates a bunch of repetitive access_ok() checks
+into a single check, which incidentally fixes the lack of such a check
+for Isochronous URBs.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/devio.c |   41 ++++++++++++++++++++---------------------
+ 1 file changed, 20 insertions(+), 21 deletions(-)
+
+--- a/drivers/usb/core/devio.c
++++ b/drivers/usb/core/devio.c
+@@ -976,7 +976,7 @@ static int proc_do_submiturb(struct dev_
+                               USBDEVFS_URB_ZERO_PACKET |
+                               USBDEVFS_URB_NO_INTERRUPT))
+               return -EINVAL;
+-      if (!uurb->buffer)
++      if (uurb->buffer_length > 0 && !uurb->buffer)
+               return -EINVAL;
+       if (uurb->signr != 0 && (uurb->signr < SIGRTMIN ||
+                                uurb->signr > SIGRTMAX))
+@@ -1035,11 +1035,6 @@ static int proc_do_submiturb(struct dev_
+                       is_in = 0;
+                       uurb->endpoint &= ~USB_DIR_IN;
+               }
+-              if (!access_ok(is_in ? VERIFY_WRITE : VERIFY_READ,
+-                              uurb->buffer, uurb->buffer_length)) {
+-                      kfree(dr);
+-                      return -EFAULT;
+-              }
+               snoop(&ps->dev->dev, "control urb: bRequest=%02x "
+                       "bRrequestType=%02x wValue=%04x "
+                       "wIndex=%04x wLength=%04x\n",
+@@ -1059,9 +1054,6 @@ static int proc_do_submiturb(struct dev_
+               uurb->number_of_packets = 0;
+               if (uurb->buffer_length > MAX_USBFS_BUFFER_SIZE)
+                       return -EINVAL;
+-              if (!access_ok(is_in ? VERIFY_WRITE : VERIFY_READ,
+-                              uurb->buffer, uurb->buffer_length))
+-                      return -EFAULT;
+               snoop(&ps->dev->dev, "bulk urb\n");
+               break;
+@@ -1103,28 +1095,35 @@ static int proc_do_submiturb(struct dev_
+                       return -EINVAL;
+               if (uurb->buffer_length > MAX_USBFS_BUFFER_SIZE)
+                       return -EINVAL;
+-              if (!access_ok(is_in ? VERIFY_WRITE : VERIFY_READ,
+-                              uurb->buffer, uurb->buffer_length))
+-                      return -EFAULT;
+               snoop(&ps->dev->dev, "interrupt urb\n");
+               break;
+       default:
+               return -EINVAL;
+       }
+-      as = alloc_async(uurb->number_of_packets);
+-      if (!as) {
++      if (uurb->buffer_length > 0 &&
++                      !access_ok(is_in ? VERIFY_WRITE : VERIFY_READ,
++                              uurb->buffer, uurb->buffer_length)) {
+               kfree(isopkt);
+               kfree(dr);
+-              return -ENOMEM;
++              return -EFAULT;
+       }
+-      as->urb->transfer_buffer = kmalloc(uurb->buffer_length, GFP_KERNEL);
+-      if (!as->urb->transfer_buffer) {
++      as = alloc_async(uurb->number_of_packets);
++      if (!as) {
+               kfree(isopkt);
+               kfree(dr);
+-              free_async(as);
+               return -ENOMEM;
+       }
++      if (uurb->buffer_length > 0) {
++              as->urb->transfer_buffer = kmalloc(uurb->buffer_length,
++                              GFP_KERNEL);
++              if (!as->urb->transfer_buffer) {
++                      kfree(isopkt);
++                      kfree(dr);
++                      free_async(as);
++                      return -ENOMEM;
++              }
++      }
+       as->urb->dev = ps->dev;
+       as->urb->pipe = (uurb->type << 30) |
+                       __create_pipe(ps->dev, uurb->endpoint & 0xf) |
+@@ -1166,7 +1165,7 @@ static int proc_do_submiturb(struct dev_
+       kfree(isopkt);
+       as->ps = ps;
+       as->userurb = arg;
+-      if (uurb->endpoint & USB_DIR_IN)
++      if (is_in && uurb->buffer_length > 0)
+               as->userbuffer = uurb->buffer;
+       else
+               as->userbuffer = NULL;
+@@ -1176,9 +1175,9 @@ static int proc_do_submiturb(struct dev_
+       as->uid = current->uid;
+       as->euid = current->euid;
+       security_task_getsecid(current, &as->secid);
+-      if (!is_in) {
++      if (!is_in && uurb->buffer_length > 0) {
+               if (copy_from_user(as->urb->transfer_buffer, uurb->buffer,
+-                              as->urb->transfer_buffer_length)) {
++                              uurb->buffer_length)) {
+                       free_async(as);
+                       return -EFAULT;
+               }
diff --git a/queue-2.6.27/usb-rndis-gadget-fix-issues-talking-from-pxa.patch b/queue-2.6.27/usb-rndis-gadget-fix-issues-talking-from-pxa.patch
new file mode 100644 (file)
index 0000000..43a11df
--- /dev/null
@@ -0,0 +1,51 @@
+From 4e19f220d4e84f5728cb7edde36352ab425cfba4 Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell@users.sourceforge.net>
+Date: Fri, 19 Jun 2009 03:09:04 -0700
+Subject: USB: RNDIS gadget, fix issues talking from PXA
+
+From: David Brownell <dbrownell@users.sourceforge.net>
+
+commit 4e19f220d4e84f5728cb7edde36352ab425cfba4 upstream.
+
+The reworked Ethernet gadget has an RNDIS interop problem when used
+with the CDC subset driver ... e.g. on PXA 2xx and 3xx hardware,
+which currently has a hard time talking to MS-Windows hosts.
+
+The issue is that Microsoft requires USB_CLASS_COMM.  Fix by tweaking
+the CDC subset driver to not switch to USB_CLASS_VENDOR_SPEC if RNDIS
+is used in some other device configuration.
+
+[ UPDATED:  some "statements" were comma-terminated; fix that. ]
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Aric Blumer <aric@sdgsystems.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/ether.c |   11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/gadget/ether.c
++++ b/drivers/usb/gadget/ether.c
+@@ -273,15 +273,16 @@ static int __init eth_bind(struct usb_co
+               /* CDC Subset */
+               eth_config_driver.label = "CDC Subset/SAFE";
+-              device_desc.idVendor = cpu_to_le16(SIMPLE_VENDOR_NUM),
+-              device_desc.idProduct = cpu_to_le16(SIMPLE_PRODUCT_NUM),
+-              device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
++              device_desc.idVendor = cpu_to_le16(SIMPLE_VENDOR_NUM);
++              device_desc.idProduct = cpu_to_le16(SIMPLE_PRODUCT_NUM);
++              if (!has_rndis())
++                      device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
+       }
+       if (has_rndis()) {
+               /* RNDIS plus ECM-or-Subset */
+-              device_desc.idVendor = cpu_to_le16(RNDIS_VENDOR_NUM),
+-              device_desc.idProduct = cpu_to_le16(RNDIS_PRODUCT_NUM),
++              device_desc.idVendor = cpu_to_le16(RNDIS_VENDOR_NUM);
++              device_desc.idProduct = cpu_to_le16(RNDIS_PRODUCT_NUM);
+               device_desc.bNumConfigurations = 2;
+       }
diff --git a/queue-2.6.27/usb-ti_usb_3410_5052-fix-duplicate-device-ids.patch b/queue-2.6.27/usb-ti_usb_3410_5052-fix-duplicate-device-ids.patch
new file mode 100644 (file)
index 0000000..07d7fc7
--- /dev/null
@@ -0,0 +1,29 @@
+From 3c43f27bf57b0502df2478253699559ee1d43f6d Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Fri, 26 Jun 2009 08:05:20 -0700
+Subject: USB: ti_usb_3410_5052: fix duplicate device ids.
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit 3c43f27bf57b0502df2478253699559ee1d43f6d upstream.
+
+commit 1a1fab513734b3a4fca1bee8229e5ff7e1cb873c accidentally added the
+device id to both tables in the driver, which causes problems as this is
+only a single port device, not a multiple port device.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ti_usb_3410_5052.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/usb/serial/ti_usb_3410_5052.c
++++ b/drivers/usb/serial/ti_usb_3410_5052.c
+@@ -240,7 +240,6 @@ static struct usb_device_id ti_id_table_
+       { USB_DEVICE(TI_VENDOR_ID, TI_5152_BOOT_PRODUCT_ID) },
+       { USB_DEVICE(TI_VENDOR_ID, TI_5052_EEPROM_PRODUCT_ID) },
+       { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) },
+-      { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) },
+ };
+ static struct usb_device_id ti_id_table_combined[14+2*TI_EXTRA_VID_PID_COUNT+1] = {