]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
start .32 queue
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Jan 2010 21:13:05 +0000 (13:13 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Jan 2010 21:13:05 +0000 (13:13 -0800)
17 files changed:
queue-2.6.32/ecryptfs-initialize-private-persistent-file-before-dereferencing-pointer.patch [new file with mode: 0644]
queue-2.6.32/ecryptfs-use-after-free.patch [new file with mode: 0644]
queue-2.6.32/nozomi-quick-fix-for-the-close-close-bug.patch [new file with mode: 0644]
queue-2.6.32/serial-8250_pnp-use-wildcard-for-serial-wacom-tablets.patch [new file with mode: 0644]
queue-2.6.32/series [new file with mode: 0644]
queue-2.6.32/staging-asus_oled-fix-oops-in-2.6.32.2.patch [new file with mode: 0644]
queue-2.6.32/staging-hv-fix-smp-problems-in-the-hyperv-core-code.patch [new file with mode: 0644]
queue-2.6.32/tty-fix-race-in-tty_fasync.patch [new file with mode: 0644]
queue-2.6.32/usb-add-missing-delay-during-remote-wakeup.patch [new file with mode: 0644]
queue-2.6.32/usb-add-speed-values-for-usb-3.0-and-wireless-controllers.patch [new file with mode: 0644]
queue-2.6.32/usb-don-t-use-gfp_kernel-while-we-cannot-reset-a-storage-device.patch [new file with mode: 0644]
queue-2.6.32/usb-ehci-fix-handling-of-unusual-interrupt-intervals.patch [new file with mode: 0644]
queue-2.6.32/usb-ehci-uhci-fix-race-between-root-hub-suspend-and-port-resume.patch [new file with mode: 0644]
queue-2.6.32/usb-fix-bitmask-merge-error.patch [new file with mode: 0644]
queue-2.6.32/usb-serial-fix-memory-leak-in-generic-driver.patch [new file with mode: 0644]
queue-2.6.32/v4l-dvb-13900-gspca-sunplus-fix-bridge-exchanges.patch [new file with mode: 0644]
queue-2.6.32/x86-msr-cpuid-register-enough-minors-for-the-msr-and-cpuid-drivers.patch [new file with mode: 0644]

diff --git a/queue-2.6.32/ecryptfs-initialize-private-persistent-file-before-dereferencing-pointer.patch b/queue-2.6.32/ecryptfs-initialize-private-persistent-file-before-dereferencing-pointer.patch
new file mode 100644 (file)
index 0000000..fd1403d
--- /dev/null
@@ -0,0 +1,55 @@
+From e27759d7a333d1f25d628c4f7caf845c51be51c2 Mon Sep 17 00:00:00 2001
+From: Erez Zadok <ezk@cs.sunysb.edu>
+Date: Thu, 3 Dec 2009 13:35:27 -0500
+Subject: ecryptfs: initialize private persistent file before dereferencing pointer
+
+From: Erez Zadok <ezk@cs.sunysb.edu>
+
+commit e27759d7a333d1f25d628c4f7caf845c51be51c2 upstream.
+
+Ecryptfs_open dereferences a pointer to the private lower file (the one
+stored in the ecryptfs inode), without checking if the pointer is NULL.
+Right afterward, it initializes that pointer if it is NULL.  Swap order of
+statements to first initialize.  Bug discovered by Duckjin Kang.
+
+Signed-off-by: Duckjin Kang <fromdj2k@gmail.com>
+Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
+Cc: Dustin Kirkland <kirkland@canonical.com>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ecryptfs/file.c |   14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/fs/ecryptfs/file.c
++++ b/fs/ecryptfs/file.c
+@@ -191,13 +191,6 @@ static int ecryptfs_open(struct inode *i
+                                     | ECRYPTFS_ENCRYPTED);
+       }
+       mutex_unlock(&crypt_stat->cs_mutex);
+-      if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_RDONLY)
+-          && !(file->f_flags & O_RDONLY)) {
+-              rc = -EPERM;
+-              printk(KERN_WARNING "%s: Lower persistent file is RO; eCryptfs "
+-                     "file must hence be opened RO\n", __func__);
+-              goto out;
+-      }
+       if (!ecryptfs_inode_to_private(inode)->lower_file) {
+               rc = ecryptfs_init_persistent_file(ecryptfs_dentry);
+               if (rc) {
+@@ -208,6 +201,13 @@ static int ecryptfs_open(struct inode *i
+                       goto out;
+               }
+       }
++      if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_RDONLY)
++          && !(file->f_flags & O_RDONLY)) {
++              rc = -EPERM;
++              printk(KERN_WARNING "%s: Lower persistent file is RO; eCryptfs "
++                     "file must hence be opened RO\n", __func__);
++              goto out;
++      }
+       ecryptfs_set_file_lower(
+               file, ecryptfs_inode_to_private(inode)->lower_file);
+       if (S_ISDIR(ecryptfs_dentry->d_inode->i_mode)) {
diff --git a/queue-2.6.32/ecryptfs-use-after-free.patch b/queue-2.6.32/ecryptfs-use-after-free.patch
new file mode 100644 (file)
index 0000000..9c1201a
--- /dev/null
@@ -0,0 +1,47 @@
+From ece550f51ba175c14ec3ec047815927d7386ea1f Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <error27@gmail.com>
+Date: Tue, 19 Jan 2010 12:34:32 +0300
+Subject: ecryptfs: use after free
+
+From: Dan Carpenter <error27@gmail.com>
+
+commit ece550f51ba175c14ec3ec047815927d7386ea1f upstream.
+
+The "full_alg_name" variable is used on a couple error paths, so we
+shouldn't free it until the end.
+
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ecryptfs/crypto.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/ecryptfs/crypto.c
++++ b/fs/ecryptfs/crypto.c
+@@ -1748,7 +1748,7 @@ ecryptfs_process_key_cipher(struct crypt
+                           char *cipher_name, size_t *key_size)
+ {
+       char dummy_key[ECRYPTFS_MAX_KEY_BYTES];
+-      char *full_alg_name;
++      char *full_alg_name = NULL;
+       int rc;
+       *key_tfm = NULL;
+@@ -1763,7 +1763,6 @@ ecryptfs_process_key_cipher(struct crypt
+       if (rc)
+               goto out;
+       *key_tfm = crypto_alloc_blkcipher(full_alg_name, 0, CRYPTO_ALG_ASYNC);
+-      kfree(full_alg_name);
+       if (IS_ERR(*key_tfm)) {
+               rc = PTR_ERR(*key_tfm);
+               printk(KERN_ERR "Unable to allocate crypto cipher with name "
+@@ -1786,6 +1785,7 @@ ecryptfs_process_key_cipher(struct crypt
+               goto out;
+       }
+ out:
++      kfree(full_alg_name);
+       return rc;
+ }
diff --git a/queue-2.6.32/nozomi-quick-fix-for-the-close-close-bug.patch b/queue-2.6.32/nozomi-quick-fix-for-the-close-close-bug.patch
new file mode 100644 (file)
index 0000000..19d0330
--- /dev/null
@@ -0,0 +1,46 @@
+From eeec32a731631a9bad9abb21c626b9f2840bee0d Mon Sep 17 00:00:00 2001
+From: Alan Cox <alan@linux.intel.com>
+Date: Mon, 4 Jan 2010 16:26:50 +0000
+Subject: nozomi: quick fix for the close/close bug
+
+From: Alan Cox <alan@linux.intel.com>
+
+commit eeec32a731631a9bad9abb21c626b9f2840bee0d upstream.
+
+Nozomi goes wrong if you get the sequence
+
+       open
+       open
+       close
+
+       [stuff]
+       close
+
+which turns out to occur on some ppp type setups.
+
+This is a quick patch up for the problem. It's not really fixing Nozomi
+which completely fails to implement tty open/close semantics and all the
+other needed stuff. Doing it right is a rather more invasive patch set and
+not one that will backport.
+
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/nozomi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/char/nozomi.c
++++ b/drivers/char/nozomi.c
+@@ -1629,10 +1629,10 @@ static void ntty_close(struct tty_struct
+       dc->open_ttys--;
+       port->count--;
+-      tty_port_tty_set(port, NULL);
+       if (port->count == 0) {
+               DBG1("close: %d", nport->token_dl);
++              tty_port_tty_set(port, NULL);
+               spin_lock_irqsave(&dc->spin_mutex, flags);
+               dc->last_ier &= ~(nport->token_dl);
+               writew(dc->last_ier, dc->reg_ier);
diff --git a/queue-2.6.32/serial-8250_pnp-use-wildcard-for-serial-wacom-tablets.patch b/queue-2.6.32/serial-8250_pnp-use-wildcard-for-serial-wacom-tablets.patch
new file mode 100644 (file)
index 0000000..445eaa9
--- /dev/null
@@ -0,0 +1,43 @@
+From 6d34855d9aa281f72c533ecb827405139d1b0fe9 Mon Sep 17 00:00:00 2001
+From: Matthew Garrett <mjg@redhat.com>
+Date: Wed, 9 Dec 2009 12:31:37 -0800
+Subject: serial: 8250_pnp: use wildcard for serial Wacom tablets
+
+From: Matthew Garrett <mjg@redhat.com>
+
+commit 6d34855d9aa281f72c533ecb827405139d1b0fe9 upstream.
+
+Wacom claims that the WACF namespace will always be devoted to serial
+Wacom tablets.  Remove the existing entries and add a wildcard to avoid
+having to update the kernel every time they add a new device.
+
+Signed-off-by: Ping Cheng <pingc@wacom.com>
+Signed-off-by: Matthew Garrett <mjg@redhat.com>
+Tested-by: Ping Cheng <pingc@wacom.com>
+Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/8250_pnp.c |   10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+--- a/drivers/serial/8250_pnp.c
++++ b/drivers/serial/8250_pnp.c
+@@ -328,15 +328,7 @@ static const struct pnp_device_id pnp_de
+       /* U.S. Robotics 56K Voice INT PnP*/
+       {       "USR9190",              0       },
+       /* Wacom tablets */
+-      {       "WACF004",              0       },
+-      {       "WACF005",              0       },
+-      {       "WACF006",              0       },
+-      {       "WACF007",              0       },
+-      {       "WACF008",              0       },
+-      {       "WACF009",              0       },
+-      {       "WACF00A",              0       },
+-      {       "WACF00B",              0       },
+-      {       "WACF00C",              0       },
++      {       "WACFXXX",              0       },
+       /* Compaq touchscreen */
+       {       "FPI2002",              0 },
+       /* Fujitsu Stylistic touchscreens */
diff --git a/queue-2.6.32/series b/queue-2.6.32/series
new file mode 100644 (file)
index 0000000..94feae3
--- /dev/null
@@ -0,0 +1,16 @@
+x86-msr-cpuid-register-enough-minors-for-the-msr-and-cpuid-drivers.patch
+v4l-dvb-13900-gspca-sunplus-fix-bridge-exchanges.patch
+staging-asus_oled-fix-oops-in-2.6.32.2.patch
+staging-hv-fix-smp-problems-in-the-hyperv-core-code.patch
+tty-fix-race-in-tty_fasync.patch
+ecryptfs-use-after-free.patch
+ecryptfs-initialize-private-persistent-file-before-dereferencing-pointer.patch
+nozomi-quick-fix-for-the-close-close-bug.patch
+serial-8250_pnp-use-wildcard-for-serial-wacom-tablets.patch
+usb-serial-fix-memory-leak-in-generic-driver.patch
+usb-fix-bitmask-merge-error.patch
+usb-don-t-use-gfp_kernel-while-we-cannot-reset-a-storage-device.patch
+usb-ehci-fix-handling-of-unusual-interrupt-intervals.patch
+usb-ehci-uhci-fix-race-between-root-hub-suspend-and-port-resume.patch
+usb-add-missing-delay-during-remote-wakeup.patch
+usb-add-speed-values-for-usb-3.0-and-wireless-controllers.patch
diff --git a/queue-2.6.32/staging-asus_oled-fix-oops-in-2.6.32.2.patch b/queue-2.6.32/staging-asus_oled-fix-oops-in-2.6.32.2.patch
new file mode 100644 (file)
index 0000000..37c3830
--- /dev/null
@@ -0,0 +1,55 @@
+From 20633bf0141c5e93e3396770d5eb7d200ee4068a Mon Sep 17 00:00:00 2001
+From: Eugeni Dodonov <eugeni@mandriva.com>
+Date: Wed, 23 Dec 2009 10:27:22 -0200
+Subject: Staging: asus_oled: fix oops in 2.6.32.2
+
+From: Eugeni Dodonov <eugeni@mandriva.com>
+
+commit 20633bf0141c5e93e3396770d5eb7d200ee4068a upstream.
+
+After updating to 2.6.32 kernel, I started experiencing Oopses caused by
+the asus_oled module. After quick investigation, I wrapped this simple
+patch which fixes an Oops in by asus_oled module on 2.6.32.2 kernel,
+caused by incorrect usage of strict_strtoul function call within
+set_enabled and set_disabled functions. This can be triggered by simple
+running the userspace client for asus_old (e.g., 'asusoled -e' or
+'asusoled -d').
+
+Signed-off-by: Eugeni Dodonov <eugeni@mandriva.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/asus_oled/asus_oled.c |   12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/drivers/staging/asus_oled/asus_oled.c
++++ b/drivers/staging/asus_oled/asus_oled.c
+@@ -194,9 +194,11 @@ static ssize_t set_enabled(struct device
+ {
+       struct usb_interface *intf = to_usb_interface(dev);
+       struct asus_oled_dev *odev = usb_get_intfdata(intf);
+-      int temp = strict_strtoul(buf, 10, NULL);
++      unsigned long value;
++      if (strict_strtoul(buf, 10, &value))
++              return -EINVAL;
+-      enable_oled(odev, temp);
++      enable_oled(odev, value);
+       return count;
+ }
+@@ -207,10 +209,12 @@ static ssize_t class_set_enabled(struct 
+ {
+       struct asus_oled_dev *odev =
+               (struct asus_oled_dev *) dev_get_drvdata(device);
++      unsigned long value;
+-      int temp = strict_strtoul(buf, 10, NULL);
++      if (strict_strtoul(buf, 10, &value))
++              return -EINVAL;
+-      enable_oled(odev, temp);
++      enable_oled(odev, value);
+       return count;
+ }
diff --git a/queue-2.6.32/staging-hv-fix-smp-problems-in-the-hyperv-core-code.patch b/queue-2.6.32/staging-hv-fix-smp-problems-in-the-hyperv-core-code.patch
new file mode 100644 (file)
index 0000000..47fe55d
--- /dev/null
@@ -0,0 +1,246 @@
+From 7692fd4d441afac728cb83fdd33349d5ba07406c Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Fri, 8 Jan 2010 09:06:40 -0800
+Subject: Staging: hv: fix smp problems in the hyperv core code
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit 7692fd4d441afac728cb83fdd33349d5ba07406c upstream.
+
+This fixes a number of SMP problems that were in the hyperv core code.
+
+Patch originally written by K. Y. Srinivasan <ksrinivasan@novell.com>
+but forward ported to the latest in-kernel code and tweaked slightly by
+me.
+
+Novell, Inc. hereby disclaims all copyright in any derivative work
+copyright associated with this patch.
+
+Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
+Cc: Hank Janssen <hjanssen@microsoft.com>
+Cc: Haiyang Zhang <haiyangz@microsoft.com>.
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/hv/Hv.c    |   50 ++++++++++++++++++++++-----------------------
+ drivers/staging/hv/Hv.h    |    6 ++---
+ drivers/staging/hv/Vmbus.c |   12 ++++++----
+ 3 files changed, 35 insertions(+), 33 deletions(-)
+
+--- a/drivers/staging/hv/Hv.c
++++ b/drivers/staging/hv/Hv.c
+@@ -386,7 +386,7 @@ u16 HvSignalEvent(void)
+  * retrieve the initialized message and event pages.  Otherwise, we create and
+  * initialize the message and event pages.
+  */
+-int HvSynicInit(u32 irqVector)
++void HvSynicInit(void *irqarg)
+ {
+       u64 version;
+       union hv_synic_simp simp;
+@@ -394,13 +394,14 @@ int HvSynicInit(u32 irqVector)
+       union hv_synic_sint sharedSint;
+       union hv_synic_scontrol sctrl;
+       u64 guestID;
+-      int ret = 0;
++      u32 irqVector = *((u32 *)(irqarg));
++      int cpu = smp_processor_id();
+       DPRINT_ENTER(VMBUS);
+       if (!gHvContext.HypercallPage) {
+               DPRINT_EXIT(VMBUS);
+-              return ret;
++              return;
+       }
+       /* Check the version */
+@@ -425,27 +426,27 @@ int HvSynicInit(u32 irqVector)
+                */
+               rdmsrl(HV_X64_MSR_GUEST_OS_ID, guestID);
+               if (guestID == HV_LINUX_GUEST_ID) {
+-                      gHvContext.synICMessagePage[0] =
++                      gHvContext.synICMessagePage[cpu] =
+                               phys_to_virt(simp.BaseSimpGpa << PAGE_SHIFT);
+-                      gHvContext.synICEventPage[0] =
++                      gHvContext.synICEventPage[cpu] =
+                               phys_to_virt(siefp.BaseSiefpGpa << PAGE_SHIFT);
+               } else {
+                       DPRINT_ERR(VMBUS, "unknown guest id!!");
+                       goto Cleanup;
+               }
+               DPRINT_DBG(VMBUS, "MAPPED: Simp: %p, Sifep: %p",
+-                         gHvContext.synICMessagePage[0],
+-                         gHvContext.synICEventPage[0]);
++                         gHvContext.synICMessagePage[cpu],
++                         gHvContext.synICEventPage[cpu]);
+       } else {
+-              gHvContext.synICMessagePage[0] = osd_PageAlloc(1);
+-              if (gHvContext.synICMessagePage[0] == NULL) {
++              gHvContext.synICMessagePage[cpu] = (void *)get_zeroed_page(GFP_ATOMIC);
++              if (gHvContext.synICMessagePage[cpu] == NULL) {
+                       DPRINT_ERR(VMBUS,
+                                  "unable to allocate SYNIC message page!!");
+                       goto Cleanup;
+               }
+-              gHvContext.synICEventPage[0] = osd_PageAlloc(1);
+-              if (gHvContext.synICEventPage[0] == NULL) {
++              gHvContext.synICEventPage[cpu] = (void *)get_zeroed_page(GFP_ATOMIC);
++              if (gHvContext.synICEventPage[cpu] == NULL) {
+                       DPRINT_ERR(VMBUS,
+                                  "unable to allocate SYNIC event page!!");
+                       goto Cleanup;
+@@ -454,7 +455,7 @@ int HvSynicInit(u32 irqVector)
+               /* Setup the Synic's message page */
+               rdmsrl(HV_X64_MSR_SIMP, simp.AsUINT64);
+               simp.SimpEnabled = 1;
+-              simp.BaseSimpGpa = virt_to_phys(gHvContext.synICMessagePage[0])
++              simp.BaseSimpGpa = virt_to_phys(gHvContext.synICMessagePage[cpu])
+                                       >> PAGE_SHIFT;
+               DPRINT_DBG(VMBUS, "HV_X64_MSR_SIMP msr set to: %llx",
+@@ -465,7 +466,7 @@ int HvSynicInit(u32 irqVector)
+               /* Setup the Synic's event page */
+               rdmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64);
+               siefp.SiefpEnabled = 1;
+-              siefp.BaseSiefpGpa = virt_to_phys(gHvContext.synICEventPage[0])
++              siefp.BaseSiefpGpa = virt_to_phys(gHvContext.synICEventPage[cpu])
+                                       >> PAGE_SHIFT;
+               DPRINT_DBG(VMBUS, "HV_X64_MSR_SIEFP msr set to: %llx",
+@@ -501,32 +502,30 @@ int HvSynicInit(u32 irqVector)
+       DPRINT_EXIT(VMBUS);
+-      return ret;
++      return;
+ Cleanup:
+-      ret = -1;
+-
+       if (gHvContext.GuestId == HV_LINUX_GUEST_ID) {
+-              if (gHvContext.synICEventPage[0])
+-                      osd_PageFree(gHvContext.synICEventPage[0], 1);
++              if (gHvContext.synICEventPage[cpu])
++                      osd_PageFree(gHvContext.synICEventPage[cpu], 1);
+-              if (gHvContext.synICMessagePage[0])
+-                      osd_PageFree(gHvContext.synICMessagePage[0], 1);
++              if (gHvContext.synICMessagePage[cpu])
++                      osd_PageFree(gHvContext.synICMessagePage[cpu], 1);
+       }
+       DPRINT_EXIT(VMBUS);
+-
+-      return ret;
++      return;
+ }
+ /**
+  * HvSynicCleanup - Cleanup routine for HvSynicInit().
+  */
+-void HvSynicCleanup(void)
++void HvSynicCleanup(void *arg)
+ {
+       union hv_synic_sint sharedSint;
+       union hv_synic_simp simp;
+       union hv_synic_siefp siefp;
++      int cpu = smp_processor_id();
+       DPRINT_ENTER(VMBUS);
+@@ -539,6 +538,7 @@ void HvSynicCleanup(void)
+       sharedSint.Masked = 1;
++      /* Need to correctly cleanup in the case of SMP!!! */
+       /* Disable the interrupt */
+       wrmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, sharedSint.AsUINT64);
+@@ -560,8 +560,8 @@ void HvSynicCleanup(void)
+               wrmsrl(HV_X64_MSR_SIEFP, siefp.AsUINT64);
+-              osd_PageFree(gHvContext.synICMessagePage[0], 1);
+-              osd_PageFree(gHvContext.synICEventPage[0], 1);
++              osd_PageFree(gHvContext.synICMessagePage[cpu], 1);
++              osd_PageFree(gHvContext.synICEventPage[cpu], 1);
+       }
+       DPRINT_EXIT(VMBUS);
+--- a/drivers/staging/hv/Hv.h
++++ b/drivers/staging/hv/Hv.h
+@@ -93,7 +93,7 @@ static const struct hv_guid VMBUS_SERVIC
+       },
+ };
+-#define MAX_NUM_CPUS  1
++#define MAX_NUM_CPUS  32
+ struct hv_input_signal_event_buffer {
+@@ -137,8 +137,8 @@ extern u16 HvPostMessage(union hv_connec
+ extern u16 HvSignalEvent(void);
+-extern int HvSynicInit(u32 irqVector);
++extern void HvSynicInit(void *irqarg);
+-extern void HvSynicCleanup(void);
++extern void HvSynicCleanup(void *arg);
+ #endif /* __HV_H__ */
+--- a/drivers/staging/hv/Vmbus.c
++++ b/drivers/staging/hv/Vmbus.c
+@@ -129,7 +129,7 @@ static int VmbusOnDeviceAdd(struct hv_de
+       /* strcpy(dev->name, "vmbus"); */
+       /* SynIC setup... */
+-      ret = HvSynicInit(*irqvector);
++      on_each_cpu(HvSynicInit, (void *)irqvector, 1);
+       /* Connect to VMBus in the root partition */
+       ret = VmbusConnect();
+@@ -150,7 +150,7 @@ static int VmbusOnDeviceRemove(struct hv
+       DPRINT_ENTER(VMBUS);
+       VmbusChannelReleaseUnattachedChannels();
+       VmbusDisconnect();
+-      HvSynicCleanup();
++      on_each_cpu(HvSynicCleanup, NULL, 1);
+       DPRINT_EXIT(VMBUS);
+       return ret;
+@@ -173,7 +173,8 @@ static void VmbusOnCleanup(struct hv_dri
+  */
+ static void VmbusOnMsgDPC(struct hv_driver *drv)
+ {
+-      void *page_addr = gHvContext.synICMessagePage[0];
++      int cpu = smp_processor_id();
++      void *page_addr = gHvContext.synICMessagePage[cpu];
+       struct hv_message *msg = (struct hv_message *)page_addr +
+                                 VMBUS_MESSAGE_SINT;
+       struct hv_message *copied;
+@@ -230,11 +231,12 @@ static void VmbusOnEventDPC(struct hv_dr
+ static int VmbusOnISR(struct hv_driver *drv)
+ {
+       int ret = 0;
++      int cpu = smp_processor_id();
+       void *page_addr;
+       struct hv_message *msg;
+       union hv_synic_event_flags *event;
+-      page_addr = gHvContext.synICMessagePage[0];
++      page_addr = gHvContext.synICMessagePage[cpu];
+       msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT;
+       DPRINT_ENTER(VMBUS);
+@@ -248,7 +250,7 @@ static int VmbusOnISR(struct hv_driver *
+       }
+       /* TODO: Check if there are events to be process */
+-      page_addr = gHvContext.synICEventPage[0];
++      page_addr = gHvContext.synICEventPage[cpu];
+       event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT;
+       /* Since we are a child, we only need to check bit 0 */
diff --git a/queue-2.6.32/tty-fix-race-in-tty_fasync.patch b/queue-2.6.32/tty-fix-race-in-tty_fasync.patch
new file mode 100644 (file)
index 0000000..2e52984
--- /dev/null
@@ -0,0 +1,41 @@
+From 703625118069f9f8960d356676662d3db5a9d116 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Thu, 17 Dec 2009 07:07:19 -0800
+Subject: tty: fix race in tty_fasync
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit 703625118069f9f8960d356676662d3db5a9d116 upstream.
+
+We need to keep the lock held over the call to __f_setown() to
+prevent a PID race.
+
+Thanks to Al Viro for pointing out the problem, and to Travis for
+making us look here in the first place.
+
+Cc: Eric W. Biederman <ebiederm@xmission.com>
+Cc: Al Viro <viro@ZenIV.linux.org.uk>
+Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Tavis Ormandy <taviso@google.com>
+Cc: Jeff Dike <jdike@addtoit.com>
+Cc: Julien Tinnes <jln@google.com>
+Cc: Matt Mackall <mpm@selenic.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/tty_io.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/char/tty_io.c
++++ b/drivers/char/tty_io.c
+@@ -1930,8 +1930,8 @@ static int tty_fasync(int fd, struct fil
+                       pid = task_pid(current);
+                       type = PIDTYPE_PID;
+               }
+-              spin_unlock_irqrestore(&tty->ctrl_lock, flags);
+               retval = __f_setown(filp, pid, type, 0);
++              spin_unlock_irqrestore(&tty->ctrl_lock, flags);
+               if (retval)
+                       goto out;
+       } else {
diff --git a/queue-2.6.32/usb-add-missing-delay-during-remote-wakeup.patch b/queue-2.6.32/usb-add-missing-delay-during-remote-wakeup.patch
new file mode 100644 (file)
index 0000000..82e0d05
--- /dev/null
@@ -0,0 +1,74 @@
+From 49d0f078f494b9d81e820a13dd8093a9bfb0b6b1 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Fri, 8 Jan 2010 11:18:38 -0500
+Subject: USB: add missing delay during remote wakeup
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 49d0f078f494b9d81e820a13dd8093a9bfb0b6b1 upstream.
+
+This patch (as1330) fixes a bug in khbud's handling of remote
+wakeups.  When a device sends a remote-wakeup request, the parent hub
+(or the host controller driver, for directly attached devices) begins
+the resume sequence and notifies khubd when the sequence finishes.  At
+this point the port's SUSPEND feature is automatically turned off.
+
+However the device needs an additional 10-ms resume-recovery time
+(TRSMRCY in the USB spec).  Khubd does not wait for this delay if the
+SUSPEND feature is off, and as a result some devices fail to behave
+properly following a remote wakeup.  This patch adds the missing
+delay to the remote-wakeup path.
+
+It also extends the resume-signalling delay used by ehci-hcd and
+uhci-hcd from 20 ms (the value in the spec) to 25 ms (the value we use
+for non-remote-wakeup resumes).  The extra time appears to help some
+devices.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Cc: Rickard Bellini <rickard.bellini@ericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hub.c      |    3 +++
+ drivers/usb/host/ehci-hcd.c |    5 +++--
+ drivers/usb/host/uhci-hub.c |    2 +-
+ 3 files changed, 7 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -3286,6 +3286,9 @@ static void hub_events(void)
+                                       USB_PORT_FEAT_C_SUSPEND);
+                               udev = hdev->children[i-1];
+                               if (udev) {
++                                      /* TRSMRCY = 10 msec */
++                                      msleep(10);
++
+                                       usb_lock_device(udev);
+                                       ret = remote_wakeup(hdev->
+                                                       children[i-1]);
+--- a/drivers/usb/host/ehci-hcd.c
++++ b/drivers/usb/host/ehci-hcd.c
+@@ -785,9 +785,10 @@ static irqreturn_t ehci_irq (struct usb_
+                       /* start 20 msec resume signaling from this port,
+                        * and make khubd collect PORT_STAT_C_SUSPEND to
+-                       * stop that signaling.
++                       * stop that signaling.  Use 5 ms extra for safety,
++                       * like usb_port_resume() does.
+                        */
+-                      ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
++                      ehci->reset_done[i] = jiffies + msecs_to_jiffies(25);
+                       ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
+                       mod_timer(&hcd->rh_timer, ehci->reset_done[i]);
+               }
+--- a/drivers/usb/host/uhci-hub.c
++++ b/drivers/usb/host/uhci-hub.c
+@@ -167,7 +167,7 @@ static void uhci_check_ports(struct uhci
+                               /* Port received a wakeup request */
+                               set_bit(port, &uhci->resuming_ports);
+                               uhci->ports_timeout = jiffies +
+-                                              msecs_to_jiffies(20);
++                                              msecs_to_jiffies(25);
+                               /* Make sure we see the port again
+                                * after the resuming period is over. */
diff --git a/queue-2.6.32/usb-add-speed-values-for-usb-3.0-and-wireless-controllers.patch b/queue-2.6.32/usb-add-speed-values-for-usb-3.0-and-wireless-controllers.patch
new file mode 100644 (file)
index 0000000..2705484
--- /dev/null
@@ -0,0 +1,36 @@
+From b132b04e193908a94d95065d0628f8fb0159cc55 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Thu, 14 Jan 2010 10:33:19 -0800
+Subject: USB: add speed values for USB 3.0 and wireless controllers
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit b132b04e193908a94d95065d0628f8fb0159cc55 upstream.
+
+These controllers say "unknown" for their speed in sysfs, which
+obviously isn't correct.
+
+Reported-by: Kurt Garloff <garloff@novell.com>
+Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Cc: David Vrabel <david.vrabel@csr.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/sysfs.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/usb/core/sysfs.c
++++ b/drivers/usb/core/sysfs.c
+@@ -115,6 +115,12 @@ show_speed(struct device *dev, struct de
+       case USB_SPEED_HIGH:
+               speed = "480";
+               break;
++      case USB_SPEED_VARIABLE:
++              speed = "480";
++              break;
++      case USB_SPEED_SUPER:
++              speed = "5000";
++              break;
+       default:
+               speed = "unknown";
+       }
diff --git a/queue-2.6.32/usb-don-t-use-gfp_kernel-while-we-cannot-reset-a-storage-device.patch b/queue-2.6.32/usb-don-t-use-gfp_kernel-while-we-cannot-reset-a-storage-device.patch
new file mode 100644 (file)
index 0000000..f6a8f73
--- /dev/null
@@ -0,0 +1,68 @@
+From acbe2febe71abb2360b008e9ab3ee5c44169f78c Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oliver@neukum.org>
+Date: Tue, 12 Jan 2010 12:32:50 +0100
+Subject: USB: Don't use GFP_KERNEL while we cannot reset a storage device
+
+From: Oliver Neukum <oliver@neukum.org>
+
+commit acbe2febe71abb2360b008e9ab3ee5c44169f78c upstream.
+
+Memory allocations with GFP_KERNEL can cause IO to a storage
+device which can fail resulting in a need to reset the device.
+Therefore GFP_KERNEL cannot be safely used between usb_lock_device()
+and usb_unlock_device(). Replace by GFP_NOIO.
+
+Signed-off-by: Oliver Neukum <oliver@neukum.org>
+Cc: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/devices.c |    2 +-
+ drivers/usb/core/message.c |    8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/core/devices.c
++++ b/drivers/usb/core/devices.c
+@@ -494,7 +494,7 @@ static ssize_t usb_device_dump(char __us
+               return 0;
+       /* allocate 2^1 pages = 8K (on i386);
+        * should be more than enough for one device */
+-      pages_start = (char *)__get_free_pages(GFP_KERNEL, 1);
++      pages_start = (char *)__get_free_pages(GFP_NOIO, 1);
+       if (!pages_start)
+               return -ENOMEM;
+--- a/drivers/usb/core/message.c
++++ b/drivers/usb/core/message.c
+@@ -911,11 +911,11 @@ char *usb_cache_string(struct usb_device
+       if (index <= 0)
+               return NULL;
+-      buf = kmalloc(MAX_USB_STRING_SIZE, GFP_KERNEL);
++      buf = kmalloc(MAX_USB_STRING_SIZE, GFP_NOIO);
+       if (buf) {
+               len = usb_string(udev, index, buf, MAX_USB_STRING_SIZE);
+               if (len > 0) {
+-                      smallbuf = kmalloc(++len, GFP_KERNEL);
++                      smallbuf = kmalloc(++len, GFP_NOIO);
+                       if (!smallbuf)
+                               return buf;
+                       memcpy(smallbuf, buf, len);
+@@ -1682,7 +1682,7 @@ int usb_set_configuration(struct usb_dev
+       if (cp) {
+               nintf = cp->desc.bNumInterfaces;
+               new_interfaces = kmalloc(nintf * sizeof(*new_interfaces),
+-                              GFP_KERNEL);
++                              GFP_NOIO);
+               if (!new_interfaces) {
+                       dev_err(&dev->dev, "Out of memory\n");
+                       return -ENOMEM;
+@@ -1691,7 +1691,7 @@ int usb_set_configuration(struct usb_dev
+               for (; n < nintf; ++n) {
+                       new_interfaces[n] = kzalloc(
+                                       sizeof(struct usb_interface),
+-                                      GFP_KERNEL);
++                                      GFP_NOIO);
+                       if (!new_interfaces[n]) {
+                               dev_err(&dev->dev, "Out of memory\n");
+                               ret = -ENOMEM;
diff --git a/queue-2.6.32/usb-ehci-fix-handling-of-unusual-interrupt-intervals.patch b/queue-2.6.32/usb-ehci-fix-handling-of-unusual-interrupt-intervals.patch
new file mode 100644 (file)
index 0000000..901f5eb
--- /dev/null
@@ -0,0 +1,61 @@
+From 1b9a38bfa6e664ff02511314f5586d711c83cc91 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Fri, 8 Jan 2010 11:17:55 -0500
+Subject: USB: EHCI: fix handling of unusual interrupt intervals
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit 1b9a38bfa6e664ff02511314f5586d711c83cc91 upstream.
+
+This patch (as1320) fixes two problems related to interrupt-URB
+scheduling in ehci-hcd.
+
+       URBs with an interval of 2 or 4 microframes aren't handled.
+       For the time being, the patch reduces to interval to 1 uframe.
+
+       URBs are constrained to have an interval no larger than 1024
+       frames by usb_submit_urb().  But some EHCI controllers allow
+       use of a schedule as short as 256 frames; for these
+       controllers we may have to decrease the interval to the
+       actual schedule length.
+
+The second problem isn't very significant since few devices expose
+interrupt endpoints with an interval larger than 256 frames.  But the
+first problem is critical; it will prevent the kernel from working
+with devices having interrupt intervals of 2 or 4 uframes.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Glynn Farrow <farrowg@sg.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-q.c |   11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/host/ehci-q.c
++++ b/drivers/usb/host/ehci-q.c
+@@ -827,9 +827,10 @@ qh_make (
+                                * But interval 1 scheduling is simpler, and
+                                * includes high bandwidth.
+                                */
+-                              dbg ("intr period %d uframes, NYET!",
+-                                              urb->interval);
+-                              goto done;
++                              urb->interval = 1;
++                      } else if (qh->period > ehci->periodic_size) {
++                              qh->period = ehci->periodic_size;
++                              urb->interval = qh->period << 3;
+                       }
+               } else {
+                       int             think_time;
+@@ -852,6 +853,10 @@ qh_make (
+                                       usb_calc_bus_time (urb->dev->speed,
+                                       is_input, 0, max_packet (maxp)));
+                       qh->period = urb->interval;
++                      if (qh->period > ehci->periodic_size) {
++                              qh->period = ehci->periodic_size;
++                              urb->interval = qh->period;
++                      }
+               }
+       }
diff --git a/queue-2.6.32/usb-ehci-uhci-fix-race-between-root-hub-suspend-and-port-resume.patch b/queue-2.6.32/usb-ehci-uhci-fix-race-between-root-hub-suspend-and-port-resume.patch
new file mode 100644 (file)
index 0000000..d593dd8
--- /dev/null
@@ -0,0 +1,87 @@
+From cec3a53c7fe794237b582e8e77fc0e48465e65ee Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Fri, 8 Jan 2010 11:18:20 -0500
+Subject: USB: EHCI & UHCI: fix race between root-hub suspend and port resume
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit cec3a53c7fe794237b582e8e77fc0e48465e65ee upstream.
+
+This patch (as1321) fixes a problem with EHCI and UHCI root-hub
+suspends: If the suspend occurs while a port is trying to resume, the
+resume doesn't finish and simply gets lost.  When remote wakeup is
+enabled, this is undesirable behavior.
+
+The patch checks first to see if any port resumes are in progress, and
+if they are then it fails the root-hub suspend with -EBUSY.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-hub.c |   20 +++++++++++++++++++-
+ drivers/usb/host/uhci-hcd.c |   15 ++++++++++++++-
+ 2 files changed, 33 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/ehci-hub.c
++++ b/drivers/usb/host/ehci-hub.c
+@@ -120,9 +120,26 @@ static int ehci_bus_suspend (struct usb_
+       del_timer_sync(&ehci->watchdog);
+       del_timer_sync(&ehci->iaa_watchdog);
+-      port = HCS_N_PORTS (ehci->hcs_params);
+       spin_lock_irq (&ehci->lock);
++      /* Once the controller is stopped, port resumes that are already
++       * in progress won't complete.  Hence if remote wakeup is enabled
++       * for the root hub and any ports are in the middle of a resume or
++       * remote wakeup, we must fail the suspend.
++       */
++      if (hcd->self.root_hub->do_remote_wakeup) {
++              port = HCS_N_PORTS(ehci->hcs_params);
++              while (port--) {
++                      if (ehci->reset_done[port] != 0) {
++                              spin_unlock_irq(&ehci->lock);
++                              ehci_dbg(ehci, "suspend failed because "
++                                              "port %d is resuming\n",
++                                              port + 1);
++                              return -EBUSY;
++                      }
++              }
++      }
++
+       /* stop schedules, clean any completed work */
+       if (HC_IS_RUNNING(hcd->state)) {
+               ehci_quiesce (ehci);
+@@ -138,6 +155,7 @@ static int ehci_bus_suspend (struct usb_
+        */
+       ehci->bus_suspended = 0;
+       ehci->owned_ports = 0;
++      port = HCS_N_PORTS(ehci->hcs_params);
+       while (port--) {
+               u32 __iomem     *reg = &ehci->regs->port_status [port];
+               u32             t1 = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
+--- a/drivers/usb/host/uhci-hcd.c
++++ b/drivers/usb/host/uhci-hcd.c
+@@ -749,7 +749,20 @@ static int uhci_rh_suspend(struct usb_hc
+       spin_lock_irq(&uhci->lock);
+       if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))
+               rc = -ESHUTDOWN;
+-      else if (!uhci->dead)
++      else if (uhci->dead)
++              ;               /* Dead controllers tell no tales */
++
++      /* Once the controller is stopped, port resumes that are already
++       * in progress won't complete.  Hence if remote wakeup is enabled
++       * for the root hub and any ports are in the middle of a resume or
++       * remote wakeup, we must fail the suspend.
++       */
++      else if (hcd->self.root_hub->do_remote_wakeup &&
++                      uhci->resuming_ports) {
++              dev_dbg(uhci_dev(uhci), "suspend failed because a port "
++                              "is resuming\n");
++              rc = -EBUSY;
++      } else
+               suspend_rh(uhci, UHCI_RH_SUSPENDED);
+       spin_unlock_irq(&uhci->lock);
+       return rc;
diff --git a/queue-2.6.32/usb-fix-bitmask-merge-error.patch b/queue-2.6.32/usb-fix-bitmask-merge-error.patch
new file mode 100644 (file)
index 0000000..d20acc7
--- /dev/null
@@ -0,0 +1,31 @@
+From a91b593edd4b3e8aa91f671b763b27b8119eb49d Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Tue, 22 Dec 2009 23:16:32 -0500
+Subject: USB: fix bitmask merge error
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit a91b593edd4b3e8aa91f671b763b27b8119eb49d upstream.
+
+This patch adds a mask bit which was mistakenly omitted from the
+as1311 patch (usb-storage: add BAD_SENSE flag).
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/usb.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/storage/usb.c
++++ b/drivers/usb/storage/usb.c
+@@ -430,7 +430,8 @@ static void adjust_quirks(struct us_data
+       u16 vid = le16_to_cpu(us->pusb_dev->descriptor.idVendor);
+       u16 pid = le16_to_cpu(us->pusb_dev->descriptor.idProduct);
+       unsigned f = 0;
+-      unsigned int mask = (US_FL_SANE_SENSE | US_FL_FIX_CAPACITY |
++      unsigned int mask = (US_FL_SANE_SENSE | US_FL_BAD_SENSE |
++                      US_FL_FIX_CAPACITY |
+                       US_FL_CAPACITY_HEURISTICS | US_FL_IGNORE_DEVICE |
+                       US_FL_NOT_LOCKABLE | US_FL_MAX_SECTORS_64 |
+                       US_FL_CAPACITY_OK | US_FL_IGNORE_RESIDUE |
diff --git a/queue-2.6.32/usb-serial-fix-memory-leak-in-generic-driver.patch b/queue-2.6.32/usb-serial-fix-memory-leak-in-generic-driver.patch
new file mode 100644 (file)
index 0000000..80764d3
--- /dev/null
@@ -0,0 +1,37 @@
+From 2591530204a76fecc843529ade56afe865dd2657 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <jhovold@gmail.com>
+Date: Wed, 6 Jan 2010 15:48:42 -0800
+Subject: usb: serial: fix memory leak in generic driver
+
+From: Johan Hovold <jhovold@gmail.com>
+
+commit 2591530204a76fecc843529ade56afe865dd2657 upstream.
+
+Fix a regression introduced by commit
+715b1dc01fe44537e8fce9566e4bb48d6821d84b ("USB: usb_debug,
+usb_generic_serial: implement multi urb write").
+
+URB transfer buffer was never freed when using multi-urb writes.
+Currently the only driver enabling multi-urb writes is usb_debug.
+
+Signed-off-by: Johan Hovold <jhovold@gmail.com>
+Cc: Greg KH <greg@kroah.com>
+Acked-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/generic.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/generic.c
++++ b/drivers/usb/serial/generic.c
+@@ -489,6 +489,8 @@ void usb_serial_generic_write_bulk_callb
+       dbg("%s - port %d", __func__, port->number);
+       if (port->serial->type->max_in_flight_urbs) {
++              kfree(urb->transfer_buffer);
++
+               spin_lock_irqsave(&port->lock, flags);
+               --port->urbs_in_flight;
+               port->tx_bytes_flight -= urb->transfer_buffer_length;
diff --git a/queue-2.6.32/v4l-dvb-13900-gspca-sunplus-fix-bridge-exchanges.patch b/queue-2.6.32/v4l-dvb-13900-gspca-sunplus-fix-bridge-exchanges.patch
new file mode 100644 (file)
index 0000000..c8852f8
--- /dev/null
@@ -0,0 +1,78 @@
+From 07d1c69b2dcfdd1b21e36af0ff8b9506234908ee Mon Sep 17 00:00:00 2001
+From: Jean-Francois Moine <moinejf@free.fr>
+Date: Sun, 10 Jan 2010 04:32:11 -0300
+Subject: V4L/DVB (13900): gspca - sunplus: Fix bridge exchanges.
+
+From: Jean-Francois Moine <moinejf@free.fr>
+
+commit 07d1c69b2dcfdd1b21e36af0ff8b9506234908ee upstream.
+
+A previous code optimization inverted bridge registers and values,
+doing a regression in kernel  2.6.32.
+
+Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/gspca/sunplus.c |   26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+--- a/drivers/media/video/gspca/sunplus.c
++++ b/drivers/media/video/gspca/sunplus.c
+@@ -705,7 +705,7 @@ static void spca504B_SetSizeType(struct 
+               rc = spca504B_PollingDataReady(gspca_dev);
+               /* Init the cam width height with some values get on init ? */
+-              reg_w_riv(dev, 0x31, 0, 0x04);
++              reg_w_riv(dev, 0x31, 0x04, 0);
+               spca504B_WaitCmdStatus(gspca_dev);
+               rc = spca504B_PollingDataReady(gspca_dev);
+               break;
+@@ -807,14 +807,14 @@ static void init_ctl_reg(struct gspca_de
+       default:
+ /*    case BRIDGE_SPCA533: */
+ /*    case BRIDGE_SPCA504B: */
+-              reg_w_riv(dev, 0, 0x00, 0x21ad);        /* hue */
+-              reg_w_riv(dev, 0, 0x01, 0x21ac);        /* sat/hue */
+-              reg_w_riv(dev, 0, 0x00, 0x21a3);        /* gamma */
++              reg_w_riv(dev, 0, 0x21ad, 0x00);        /* hue */
++              reg_w_riv(dev, 0, 0x21ac, 0x01);        /* sat/hue */
++              reg_w_riv(dev, 0, 0x21a3, 0x00);        /* gamma */
+               break;
+       case BRIDGE_SPCA536:
+-              reg_w_riv(dev, 0, 0x40, 0x20f5);
+-              reg_w_riv(dev, 0, 0x01, 0x20f4);
+-              reg_w_riv(dev, 0, 0x00, 0x2089);
++              reg_w_riv(dev, 0, 0x20f5, 0x40);
++              reg_w_riv(dev, 0, 0x20f4, 0x01);
++              reg_w_riv(dev, 0, 0x2089, 0x00);
+               break;
+       }
+       if (pollreg)
+@@ -888,11 +888,11 @@ static int sd_init(struct gspca_dev *gsp
+       switch (sd->bridge) {
+       case BRIDGE_SPCA504B:
+               reg_w_riv(dev, 0x1d, 0x00, 0);
+-              reg_w_riv(dev, 0, 0x01, 0x2306);
+-              reg_w_riv(dev, 0, 0x00, 0x0d04);
+-              reg_w_riv(dev, 0, 0x00, 0x2000);
+-              reg_w_riv(dev, 0, 0x13, 0x2301);
+-              reg_w_riv(dev, 0, 0x00, 0x2306);
++              reg_w_riv(dev, 0, 0x2306, 0x01);
++              reg_w_riv(dev, 0, 0x0d04, 0x00);
++              reg_w_riv(dev, 0, 0x2000, 0x00);
++              reg_w_riv(dev, 0, 0x2301, 0x13);
++              reg_w_riv(dev, 0, 0x2306, 0x00);
+               /* fall thru */
+       case BRIDGE_SPCA533:
+               spca504B_PollingDataReady(gspca_dev);
+@@ -1011,7 +1011,7 @@ static int sd_start(struct gspca_dev *gs
+                       spca504B_WaitCmdStatus(gspca_dev);
+                       break;
+               default:
+-                      reg_w_riv(dev, 0x31, 0, 0x04);
++                      reg_w_riv(dev, 0x31, 0x04, 0);
+                       spca504B_WaitCmdStatus(gspca_dev);
+                       spca504B_PollingDataReady(gspca_dev);
+                       break;
diff --git a/queue-2.6.32/x86-msr-cpuid-register-enough-minors-for-the-msr-and-cpuid-drivers.patch b/queue-2.6.32/x86-msr-cpuid-register-enough-minors-for-the-msr-and-cpuid-drivers.patch
new file mode 100644 (file)
index 0000000..0148e34
--- /dev/null
@@ -0,0 +1,72 @@
+From 0b962d473af32ec334df271b54ff4973cb2b4c73 Mon Sep 17 00:00:00 2001
+From: H. Peter Anvin <hpa@zytor.com>
+Date: Tue, 15 Dec 2009 15:13:07 -0800
+Subject: x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers
+
+From: H. Peter Anvin <hpa@zytor.com>
+
+commit 0b962d473af32ec334df271b54ff4973cb2b4c73 upstream.
+
+register_chrdev() hardcodes registering 256 minors, presumably to
+avoid breaking old drivers.  However, we need to register enough
+minors so that we have all possible CPUs.
+
+checkpatch warns on this patch, but the patch is correct: NR_CPUS here
+is a static *upper bound* on the *maximum CPU index* (not *number of
+CPUs!*) and that is what we want.
+
+Reported-and-tested-by: Russ Anderson <rja@sgi.com>
+Cc: Tejun Heo <tj@kernel.org>
+Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Cc: Takashi Iwai <tiwai@suse.de>
+Cc: Alexander Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: H. Peter Anvin <hpa@zytor.com>
+LKML-Reference: <tip-*@git.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/cpuid.c |    5 +++--
+ arch/x86/kernel/msr.c   |    4 ++--
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+--- a/arch/x86/kernel/cpuid.c
++++ b/arch/x86/kernel/cpuid.c
+@@ -192,7 +192,8 @@ static int __init cpuid_init(void)
+       int i, err = 0;
+       i = 0;
+-      if (register_chrdev(CPUID_MAJOR, "cpu/cpuid", &cpuid_fops)) {
++      if (__register_chrdev(CPUID_MAJOR, 0, NR_CPUS,
++                            "cpu/cpuid", &cpuid_fops)) {
+               printk(KERN_ERR "cpuid: unable to get major %d for cpuid\n",
+                      CPUID_MAJOR);
+               err = -EBUSY;
+@@ -221,7 +222,7 @@ out_class:
+       }
+       class_destroy(cpuid_class);
+ out_chrdev:
+-      unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");
++      __unregister_chrdev(CPUID_MAJOR, 0, NR_CPUS, "cpu/cpuid");
+ out:
+       return err;
+ }
+--- a/arch/x86/kernel/msr.c
++++ b/arch/x86/kernel/msr.c
+@@ -251,7 +251,7 @@ static int __init msr_init(void)
+       int i, err = 0;
+       i = 0;
+-      if (register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) {
++      if (__register_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr", &msr_fops)) {
+               printk(KERN_ERR "msr: unable to get major %d for msr\n",
+                      MSR_MAJOR);
+               err = -EBUSY;
+@@ -279,7 +279,7 @@ out_class:
+               msr_device_destroy(i);
+       class_destroy(msr_class);
+ out_chrdev:
+-      unregister_chrdev(MSR_MAJOR, "cpu/msr");
++      __unregister_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr");
+ out:
+       return err;
+ }