--- /dev/null
+From c7c25802b39c443b3745cfa973dc49a97a3491f8 Mon Sep 17 00:00:00 2001
+From: Robert Richter <robert.richter@amd.com>
+Date: Mon, 3 Jan 2011 12:15:14 +0100
+Subject: arch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU
+
+From: Robert Richter <robert.richter@amd.com>
+
+commit c7c25802b39c443b3745cfa973dc49a97a3491f8 upstream.
+
+Disable preemption in init_ibs(). The function only checks the
+ibs capabilities and sets up pci devices (if necessary). It runs
+only on one cpu but operates with the local APIC and some MSRs,
+thus it is better to disable preemption.
+
+[ 7.034377] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/483
+[ 7.034385] caller is setup_APIC_eilvt+0x155/0x180
+[ 7.034389] Pid: 483, comm: modprobe Not tainted 2.6.37-rc1-20101110+ #1
+[ 7.034392] Call Trace:
+[ 7.034400] [<ffffffff812a2b72>] debug_smp_processor_id+0xd2/0xf0
+[ 7.034404] [<ffffffff8101e985>] setup_APIC_eilvt+0x155/0x180
+[ ... ]
+
+Addresses https://bugzilla.kernel.org/show_bug.cgi?id=22812
+
+Reported-by: <atswartz@gmail.com>
+Signed-off-by: Robert Richter <robert.richter@amd.com>
+Cc: oprofile-list@lists.sourceforge.net <oprofile-list@lists.sourceforge.net>
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Cc: Frederic Weisbecker <fweisbec@gmail.com>
+Cc: Rafael J. Wysocki <rjw@sisk.pl>
+Cc: Dan Carpenter <error27@gmail.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+LKML-Reference: <20110103111514.GM4739@erda.amd.com>
+[ small cleanups ]
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/oprofile/op_model_amd.c | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+--- a/arch/x86/oprofile/op_model_amd.c
++++ b/arch/x86/oprofile/op_model_amd.c
+@@ -484,21 +484,29 @@ static int __init_ibs_nmi(void)
+ return 0;
+ }
+
+-/* initialize the APIC for the IBS interrupts if available */
++/*
++ * check and reserve APIC extended interrupt LVT offset for IBS if
++ * available
++ *
++ * init_ibs() preforms implicitly cpu-local operations, so pin this
++ * thread to its current CPU
++ */
++
+ static void init_ibs(void)
+ {
+- ibs_caps = get_ibs_caps();
++ preempt_disable();
+
++ ibs_caps = get_ibs_caps();
+ if (!ibs_caps)
+- return;
++ goto out;
+
+- if (__init_ibs_nmi()) {
++ if (__init_ibs_nmi() < 0)
+ ibs_caps = 0;
+- return;
+- }
++ else
++ printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", ibs_caps);
+
+- printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n",
+- (unsigned)ibs_caps);
++out:
++ preempt_enable();
+ }
+
+ static int (*create_arch_files)(struct super_block *sb, struct dentry *root);
--- /dev/null
+From 001851659354cce436b749a793f3512a53394d80 Mon Sep 17 00:00:00 2001
+From: Andres Salomon <dilinger@queued.net>
+Date: Tue, 21 Dec 2010 13:04:42 -0800
+Subject: cs5535-gpio: don't apply errata #36 to edge detect GPIOs
+
+From: Andres Salomon <dilinger@queued.net>
+
+commit 001851659354cce436b749a793f3512a53394d80 upstream.
+
+The edge detect status GPIOs function differently from the other atomic
+model CS5536 GPIO registers; writing 1 to the high bits clears the GPIO,
+but writing 1 to the lower bits also clears the bit.
+
+This means that read-modify-write doesn't actually work for it, so don't
+apply the errata here. If a negative edge status gets lost after
+resume.. well, we tried our best!
+
+Tested-by: Daniel Drake <dsd@laptop.org>
+Signed-off-by: Andres Salomon <dilinger@queued.net>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpio/cs5535-gpio.c | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpio/cs5535-gpio.c
++++ b/drivers/gpio/cs5535-gpio.c
+@@ -56,15 +56,22 @@ static struct cs5535_gpio_chip {
+ * registers, see include/linux/cs5535.h.
+ */
+
+-static void errata_outl(u32 val, unsigned long addr)
++static void errata_outl(struct cs5535_gpio_chip *chip, u32 val,
++ unsigned int reg)
+ {
++ unsigned long addr = chip->base + 0x80 + reg;
++
+ /*
+ * According to the CS5536 errata (#36), after suspend
+ * a write to the high bank GPIO register will clear all
+ * non-selected bits; the recommended workaround is a
+ * read-modify-write operation.
++ *
++ * Don't apply this errata to the edge status GPIOs, as writing
++ * to their lower bits will clear them.
+ */
+- val |= inl(addr);
++ if (reg != GPIO_POSITIVE_EDGE_STS && reg != GPIO_NEGATIVE_EDGE_STS)
++ val |= inl(addr);
+ outl(val, addr);
+ }
+
+@@ -76,7 +83,7 @@ static void __cs5535_gpio_set(struct cs5
+ outl(1 << offset, chip->base + reg);
+ else
+ /* high bank register */
+- errata_outl(1 << (offset - 16), chip->base + 0x80 + reg);
++ errata_outl(chip, 1 << (offset - 16), reg);
+ }
+
+ void cs5535_gpio_set(unsigned offset, unsigned int reg)
+@@ -98,7 +105,7 @@ static void __cs5535_gpio_clear(struct c
+ outl(1 << (offset + 16), chip->base + reg);
+ else
+ /* high bank register */
+- errata_outl(1 << offset, chip->base + 0x80 + reg);
++ errata_outl(chip, 1 << offset, reg);
+ }
+
+ void cs5535_gpio_clear(unsigned offset, unsigned int reg)
--- /dev/null
+From 44658a11f312fb9217674cb90b1a11cbe17fd18d Mon Sep 17 00:00:00 2001
+From: Andres Salomon <dilinger@queued.net>
+Date: Tue, 21 Dec 2010 13:04:52 -0800
+Subject: cs5535-gpio: handle GPIO regs where higher (clear) bits are set
+
+From: Andres Salomon <dilinger@queued.net>
+
+commit 44658a11f312fb9217674cb90b1a11cbe17fd18d upstream.
+
+The default for non-READ_BACK GPIO regs is to have the clear bits set;
+this means that our original errata fix was too simplistic. This
+changes it to the following behavior:
+
+ - when setting GPIOs, ignore the higher order bits (they're for
+ clearing, we don't need to care about them).
+
+ - when clearing GPIOs, keep all the bits, but unset (via XOR) the
+ lower order bit that negates the clear bit that we care about. That
+ is, if we're clearing GPIO 26 (val = 0x04000000), we first XOR what's
+ currently in the register with 0x0400 (GPIO 26's SET bit), and then
+ OR that with the GPIO 26's CLEAR bit.
+
+Tested-by: Daniel Drake <dsd@laptop.org>
+Signed-off-by: Andres Salomon <dilinger@queued.net>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpio/cs5535-gpio.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpio/cs5535-gpio.c
++++ b/drivers/gpio/cs5535-gpio.c
+@@ -70,8 +70,12 @@ static void errata_outl(struct cs5535_gp
+ * Don't apply this errata to the edge status GPIOs, as writing
+ * to their lower bits will clear them.
+ */
+- if (reg != GPIO_POSITIVE_EDGE_STS && reg != GPIO_NEGATIVE_EDGE_STS)
+- val |= inl(addr);
++ if (reg != GPIO_POSITIVE_EDGE_STS && reg != GPIO_NEGATIVE_EDGE_STS) {
++ if (val & 0xffff)
++ val |= (inl(addr) & 0xffff); /* ignore the high bits */
++ else
++ val |= (inl(addr) ^ (val >> 16));
++ }
+ outl(val, addr);
+ }
+
--- /dev/null
+From 4ef9e11d6867f88951e30db910fa015300e31871 Mon Sep 17 00:00:00 2001
+From: Hillf Danton <dhillf@gmail.com>
+Date: Wed, 29 Dec 2010 21:55:28 +0800
+Subject: fix freeing user_struct in user cache
+
+From: Hillf Danton <dhillf@gmail.com>
+
+commit 4ef9e11d6867f88951e30db910fa015300e31871 upstream.
+
+When racing on adding into user cache, the new allocated from mm slab
+is freed without putting user namespace.
+
+Since the user namespace is already operated by getting, putting has
+to be issued.
+
+Signed-off-by: Hillf Danton <dhillf@gmail.com>
+Acked-by: Serge Hallyn <serge@hallyn.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/user.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/user.c
++++ b/kernel/user.c
+@@ -157,6 +157,7 @@ struct user_struct *alloc_uid(struct use
+ spin_lock_irq(&uidhash_lock);
+ up = uid_hash_find(uid, hashent);
+ if (up) {
++ put_user_ns(ns);
+ key_put(new->uid_keyring);
+ key_put(new->session_keyring);
+ kmem_cache_free(uid_cachep, new);
--- /dev/null
+From fa6469cb5b2d16703464c344b943e2c025cb7858 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <florian@openwrt.org>
+Date: Fri, 26 Nov 2010 10:39:54 +0100
+Subject: gpio: Fix null pointer dereference while accessing rdc321x platform_data
+
+From: Florian Fainelli <florian@openwrt.org>
+
+commit fa6469cb5b2d16703464c344b943e2c025cb7858 upstream.
+
+rdc321x-gpio currently fetches its driver specific data by using the
+platform_device->platform_data pointer, this is wrong because the mfd
+device which registers our platform_device has been added using
+mfd_add_device() which sets the platform_device->driver_data pointer
+instead.
+
+Signed-off-by: Florian Fainelli <florian@openwrt.org>
+Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpio/rdc321x-gpio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpio/rdc321x-gpio.c
++++ b/drivers/gpio/rdc321x-gpio.c
+@@ -135,7 +135,7 @@ static int __devinit rdc321x_gpio_probe(
+ struct rdc321x_gpio *rdc321x_gpio_dev;
+ struct rdc321x_gpio_pdata *pdata;
+
+- pdata = pdev->dev.platform_data;
++ pdata = platform_get_drvdata(pdev);
+ if (!pdata) {
+ dev_err(&pdev->dev, "no platform data supplied\n");
+ return -ENODEV;
--- /dev/null
+From a2255ff45143001fecbc5e5a4b58fcb999d393ae Mon Sep 17 00:00:00 2001
+From: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
+Date: Thu, 25 Nov 2010 12:11:51 +0200
+Subject: mmc: at91_mci: fix multiblock SDIO transfers
+
+From: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
+
+commit a2255ff45143001fecbc5e5a4b58fcb999d393ae upstream.
+
+The AT91 MCI has special SDIO transfer types: SDIO block and SDIO byte
+transfers, but at91_mci driver doesn't use them and handles all SDIO
+transfers as ordinary MMC block transfers. This causes problems for
+multiple-block SDIO transfers (in particular for 256-bytes blocks).
+
+Fix this situation by checking the opcode for SDIO CMD53 and setting
+the transfer type in the AT91_MCI_CMDR register properly.
+
+This patch was tested with libertas SDIO driver: problem with TX
+timeouts on big packets was eliminated.
+
+Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
+Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+Signed-off-by: Chris Ball <cjb@laptop.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-at91/include/mach/at91_mci.h | 2 ++
+ drivers/mmc/host/at91_mci.c | 13 +++++++++----
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+--- a/arch/arm/mach-at91/include/mach/at91_mci.h
++++ b/arch/arm/mach-at91/include/mach/at91_mci.h
+@@ -74,6 +74,8 @@
+ #define AT91_MCI_TRTYP_BLOCK (0 << 19)
+ #define AT91_MCI_TRTYP_MULTIPLE (1 << 19)
+ #define AT91_MCI_TRTYP_STREAM (2 << 19)
++#define AT91_MCI_TRTYP_SDIO_BYTE (4 << 19)
++#define AT91_MCI_TRTYP_SDIO_BLOCK (5 << 19)
+
+ #define AT91_MCI_BLKR 0x18 /* Block Register */
+ #define AT91_MCI_BLKR_BCNT(n) ((0xffff & (n)) << 0) /* Block count */
+--- a/drivers/mmc/host/at91_mci.c
++++ b/drivers/mmc/host/at91_mci.c
+@@ -69,6 +69,7 @@
+ #include <linux/highmem.h>
+
+ #include <linux/mmc/host.h>
++#include <linux/mmc/sdio.h>
+
+ #include <asm/io.h>
+ #include <asm/irq.h>
+@@ -493,10 +494,14 @@ static void at91_mci_send_command(struct
+ else if (data->flags & MMC_DATA_WRITE)
+ cmdr |= AT91_MCI_TRCMD_START;
+
+- if (data->flags & MMC_DATA_STREAM)
+- cmdr |= AT91_MCI_TRTYP_STREAM;
+- if (data->blocks > 1)
+- cmdr |= AT91_MCI_TRTYP_MULTIPLE;
++ if (cmd->opcode == SD_IO_RW_EXTENDED) {
++ cmdr |= AT91_MCI_TRTYP_SDIO_BLOCK;
++ } else {
++ if (data->flags & MMC_DATA_STREAM)
++ cmdr |= AT91_MCI_TRTYP_STREAM;
++ if (data->blocks > 1)
++ cmdr |= AT91_MCI_TRTYP_MULTIPLE;
++ }
+ }
+ else {
+ block_length = 0;
--- /dev/null
+From 2f1d791882d21a4002a719fb016a1ac21c8bd6b7 Mon Sep 17 00:00:00 2001
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+Date: Fri, 10 Dec 2010 19:14:32 +0100
+Subject: mmc: atmel-mci: fix multiblock SDIO transfers
+
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+
+commit 2f1d791882d21a4002a719fb016a1ac21c8bd6b7 upstream.
+
+Based on report made by Yauhen in:
+"MMC: Fix multiblock SDIO transfers in AT91 MCI" patch,
+I report those changes to the brother driver: atmel-mci.
+
+So, this patch sets SDIO transfer types: SDIO block and SDIO byte
+transfers instead of using ordinary MMC block transfers.
+It is checking opcode for SDIO CMD53 and setting transfer
+type in MCI_CMDR register properly.
+
+Reported-by: Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
+Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+Signed-off-by: Chris Ball <cjb@laptop.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/mmc/host/atmel-mci.c | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+--- a/drivers/mmc/host/atmel-mci.c
++++ b/drivers/mmc/host/atmel-mci.c
+@@ -26,6 +26,7 @@
+ #include <linux/stat.h>
+
+ #include <linux/mmc/host.h>
++#include <linux/mmc/sdio.h>
+
+ #include <mach/atmel-mci.h>
+ #include <linux/atmel-mci.h>
+@@ -532,12 +533,17 @@ static u32 atmci_prepare_command(struct
+ data = cmd->data;
+ if (data) {
+ cmdr |= MCI_CMDR_START_XFER;
+- if (data->flags & MMC_DATA_STREAM)
+- cmdr |= MCI_CMDR_STREAM;
+- else if (data->blocks > 1)
+- cmdr |= MCI_CMDR_MULTI_BLOCK;
+- else
+- cmdr |= MCI_CMDR_BLOCK;
++
++ if (cmd->opcode == SD_IO_RW_EXTENDED) {
++ cmdr |= MCI_CMDR_SDIO_BLOCK;
++ } else {
++ if (data->flags & MMC_DATA_STREAM)
++ cmdr |= MCI_CMDR_STREAM;
++ else if (data->blocks > 1)
++ cmdr |= MCI_CMDR_MULTI_BLOCK;
++ else
++ cmdr |= MCI_CMDR_BLOCK;
++ }
+
+ if (data->flags & MMC_DATA_READ)
+ cmdr |= MCI_CMDR_TRDIR_READ;
--- /dev/null
+From 274476f8fe0b6ac9bac542cc39de12c3dd0f43f6 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Fri, 10 Dec 2010 08:40:31 +0100
+Subject: mmc: Fix re-probing with PM_POST_RESTORE notification
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 274476f8fe0b6ac9bac542cc39de12c3dd0f43f6 upstream.
+
+In the error-path where PM notifies PM_POST_RESTORE, the rescan-blockage
+should be cleared as well. Otherwise it'll be never re-probed.
+
+Also, as a bonus, this fixes a bug in S4 with user-mode suspend in the
+current code, as it sends PM_POST_RESTORE instead of
+PM_POST_HIBERNATION wrongly.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Chris Ball <cjb@laptop.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/mmc/core/core.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/mmc/core/core.c
++++ b/drivers/mmc/core/core.c
+@@ -1720,6 +1720,7 @@ int mmc_pm_notify(struct notifier_block
+
+ case PM_POST_SUSPEND:
+ case PM_POST_HIBERNATION:
++ case PM_POST_RESTORE:
+
+ spin_lock_irqsave(&host->lock, flags);
+ host->rescan_disable = 0;
--- /dev/null
+From be7a7411d63ccad165d66fe8e0b11b2ee336159b Mon Sep 17 00:00:00 2001
+From: Ken Mills <ken.k.mills@intel.com>
+Date: Mon, 13 Dec 2010 15:27:27 +0000
+Subject: n_gsm: Fix message length handling when building header
+
+From: Ken Mills <ken.k.mills@intel.com>
+
+commit be7a7411d63ccad165d66fe8e0b11b2ee336159b upstream.
+
+Fix message length handling when building header
+
+When the message length is greater than 127, the length field in the header
+is built incorrectly. According to the spec, when the length is less than 128
+the length field is a single byte formatted as: bbbbbbb1. When it is greater
+than 127 then the field is two bytes of the format: bbbbbbb0 bbbbbbbb.
+
+Signed-off-by: Ken Mills <ken.k.mills@intel.com>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/n_gsm.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/char/n_gsm.c
++++ b/drivers/char/n_gsm.c
+@@ -716,8 +716,8 @@ static void __gsm_data_queue(struct gsm_
+ if (msg->len < 128)
+ *--dp = (msg->len << 1) | EA;
+ else {
+- *--dp = (msg->len >> 6) | EA;
+- *--dp = (msg->len & 127) << 1;
++ *--dp = (msg->len >> 7); /* bits 7 - 15 */
++ *--dp = (msg->len & 127) << 1; /* bits 0 - 6 */
+ }
+ }
+
--- /dev/null
+From 093d804611b9a38fe59753b37c29f840518406a9 Mon Sep 17 00:00:00 2001
+From: Ken Mills <ken.k.mills@intel.com>
+Date: Mon, 13 Dec 2010 15:28:03 +0000
+Subject: n_gsm: gsm_data_alloc buffer allocation could fail and it is not being checked
+
+From: Ken Mills <ken.k.mills@intel.com>
+
+commit 093d804611b9a38fe59753b37c29f840518406a9 upstream.
+
+gsm_data_alloc buffer allocation could fail and it is not being checked.
+
+Add check for allocated buffer and return if the buffer allocation
+fails.
+
+Signed-off-by: Ken Mills <ken.k.mills@intel.com>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/n_gsm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/char/n_gsm.c
++++ b/drivers/char/n_gsm.c
+@@ -968,6 +968,8 @@ static void gsm_control_reply(struct gsm
+ {
+ struct gsm_msg *msg;
+ msg = gsm_data_alloc(gsm, 0, dlen + 2, gsm->ftype);
++ if (msg == NULL)
++ return;
+ msg->data[0] = (cmd & 0xFE) << 1 | EA; /* Clear C/R */
+ msg->data[1] = (dlen << 1) | EA;
+ memcpy(msg->data + 2, data, dlen);
--- /dev/null
+From 16cad7fba037b34ca32cc0adac65bc089d969fb8 Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey@googlemail.com>
+Date: Sat, 11 Dec 2010 12:19:48 +0100
+Subject: p54usb: add 5 more USBIDs
+
+From: Christian Lamparter <chunkeey@googlemail.com>
+
+commit 16cad7fba037b34ca32cc0adac65bc089d969fb8 upstream.
+
+This patch adds five more USBIDs to the table.
+
+Source:
+http://www.linuxant.com/pipermail/driverloader/2005q3/002307.html
+http://wireless.kernel.org/en/users/Drivers/p54/devices (by M. Davis)
+
+Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/p54/p54usb.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/net/wireless/p54/p54usb.c
++++ b/drivers/net/wireless/p54/p54usb.c
+@@ -43,6 +43,7 @@ MODULE_FIRMWARE("isl3887usb");
+
+ static struct usb_device_id p54u_table[] __devinitdata = {
+ /* Version 1 devices (pci chip + net2280) */
++ {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */
+ {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */
+ {USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */
+ {USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */
+@@ -56,9 +57,12 @@ static struct usb_device_id p54u_table[]
+ {USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */
+ {USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */
+ {USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */
++ {USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */
+ {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */
+ {USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */
++ {USB_DEVICE(0x1435, 0x0210)}, /* Inventel UR054G */
+ {USB_DEVICE(0x1630, 0x0005)}, /* 2Wire 802.11g USB (v1) / Z-Com */
++ {USB_DEVICE(0x182d, 0x096b)}, /* Sitecom WL-107 */
+ {USB_DEVICE(0x1915, 0x2234)}, /* Linksys WUSB54G OEM */
+ {USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */
+ {USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */
+@@ -94,6 +98,7 @@ static struct usb_device_id p54u_table[]
+ {USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */
+ {USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */
+ {USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */
++ {USB_DEVICE(0x2001, 0x3705)}, /* D-Link DWL-G120 rev C1 */
+ {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */
+ {USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */
+ {USB_DEVICE(0x413c, 0x8104)}, /* Cohiba Proto board */
--- /dev/null
+From 56e6417b49132d4f56e9f2241d31942b90b46315 Mon Sep 17 00:00:00 2001
+From: Eduardo Costa <ecosta.tmp@gmail.com>
+Date: Tue, 14 Dec 2010 14:37:59 -0600
+Subject: p54usb: New USB ID for Gemtek WUBI-100GW
+
+From: Eduardo Costa <ecosta.tmp@gmail.com>
+
+commit 56e6417b49132d4f56e9f2241d31942b90b46315 upstream.
+
+This USB ID is for the WUBI-100GW 802.11g Wireless LAN USB Device that
+uses p54usb.
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Eduardo Costa <ecosta.tmp@gmail.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/p54/p54usb.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/p54/p54usb.c
++++ b/drivers/net/wireless/p54/p54usb.c
+@@ -61,6 +61,7 @@ static struct usb_device_id p54u_table[]
+ {USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */
+ {USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */
+ {USB_DEVICE(0x1435, 0x0210)}, /* Inventel UR054G */
++ {USB_DEVICE(0x15a9, 0x0002)}, /* Gemtek WUBI-100GW 802.11g */
+ {USB_DEVICE(0x1630, 0x0005)}, /* 2Wire 802.11g USB (v1) / Z-Com */
+ {USB_DEVICE(0x182d, 0x096b)}, /* Sitecom WL-107 */
+ {USB_DEVICE(0x1915, 0x2234)}, /* Linksys WUSB54G OEM */
--- /dev/null
+From 1873bb8115e678ad9fd0aac9dbbc68383bc36e06 Mon Sep 17 00:00:00 2001
+From: Ahmed S. Darwish <darwish.07@gmail.com>
+Date: Sat, 25 Dec 2010 11:57:09 +0200
+Subject: RAMOOPS: Don't overflow over non-allocated regions
+
+From: Ahmed S. Darwish <darwish.07@gmail.com>
+
+commit 1873bb8115e678ad9fd0aac9dbbc68383bc36e06 upstream.
+
+The current code mis-calculates the ramoops header size, leading to an
+overflow over the next record at best, or over a non-allocated region at
+worst. Fix that calculation.
+
+Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
+Acked-by: Marco Stornelli <marco.stornelli@gmail.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/ramoops.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/drivers/char/ramoops.c
++++ b/drivers/char/ramoops.c
+@@ -27,7 +27,6 @@
+ #include <linux/ioport.h>
+
+ #define RAMOOPS_KERNMSG_HDR "===="
+-#define RAMOOPS_HEADER_SIZE (5 + sizeof(struct timeval))
+
+ #define RECORD_SIZE 4096
+
+@@ -63,8 +62,8 @@ static void ramoops_do_dump(struct kmsg_
+ struct ramoops_context, dump);
+ unsigned long s1_start, s2_start;
+ unsigned long l1_cpy, l2_cpy;
+- int res;
+- char *buf;
++ int res, hdr_size;
++ char *buf, *buf_orig;
+ struct timeval timestamp;
+
+ /* Only dump oopses if dump_oops is set */
+@@ -72,6 +71,8 @@ static void ramoops_do_dump(struct kmsg_
+ return;
+
+ buf = (char *)(cxt->virt_addr + (cxt->count * RECORD_SIZE));
++ buf_orig = buf;
++
+ memset(buf, '\0', RECORD_SIZE);
+ res = sprintf(buf, "%s", RAMOOPS_KERNMSG_HDR);
+ buf += res;
+@@ -79,8 +80,9 @@ static void ramoops_do_dump(struct kmsg_
+ res = sprintf(buf, "%lu.%lu\n", (long)timestamp.tv_sec, (long)timestamp.tv_usec);
+ buf += res;
+
+- l2_cpy = min(l2, (unsigned long)(RECORD_SIZE - RAMOOPS_HEADER_SIZE));
+- l1_cpy = min(l1, (unsigned long)(RECORD_SIZE - RAMOOPS_HEADER_SIZE) - l2_cpy);
++ hdr_size = buf - buf_orig;
++ l2_cpy = min(l2, (unsigned long)(RECORD_SIZE - hdr_size));
++ l1_cpy = min(l1, (unsigned long)(RECORD_SIZE - hdr_size) - l2_cpy);
+
+ s2_start = l2 - l2_cpy;
+ s1_start = l1 - l1_cpy;
--- /dev/null
+From dbb442b85a1d82f91cfe0524c4f9b3a5196a10ca Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Thu, 16 Dec 2010 15:52:30 -0800
+Subject: Revert "USB: gadget: Allow function access to device ID data during bind()"
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+commit dbb442b85a1d82f91cfe0524c4f9b3a5196a10ca upstream.
+
+This reverts commit 1ab83238740ff1e1773d5c13ecac43c60cf4aec4.
+
+Turns out this doesn't allow for the device ids to be overridden
+properly, so we need to revert the thing.
+
+Reported-by: Jef Driesen <jefdriesen@telenet.be>
+Cc: Robert Lukassen <Robert.Lukassen@tomtom.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/composite.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/drivers/usb/gadget/composite.c
++++ b/drivers/usb/gadget/composite.c
+@@ -1083,14 +1083,6 @@ static int composite_bind(struct usb_gad
+ */
+ usb_ep_autoconfig_reset(cdev->gadget);
+
+- /* standardized runtime overrides for device ID data */
+- if (idVendor)
+- cdev->desc.idVendor = cpu_to_le16(idVendor);
+- if (idProduct)
+- cdev->desc.idProduct = cpu_to_le16(idProduct);
+- if (bcdDevice)
+- cdev->desc.bcdDevice = cpu_to_le16(bcdDevice);
+-
+ /* composite gadget needs to assign strings for whole device (like
+ * serial number), register function drivers, potentially update
+ * power state and consumption, etc
+@@ -1102,6 +1094,14 @@ static int composite_bind(struct usb_gad
+ cdev->desc = *composite->dev;
+ cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
+
++ /* standardized runtime overrides for device ID data */
++ if (idVendor)
++ cdev->desc.idVendor = cpu_to_le16(idVendor);
++ if (idProduct)
++ cdev->desc.idProduct = cpu_to_le16(idProduct);
++ if (bcdDevice)
++ cdev->desc.bcdDevice = cpu_to_le16(bcdDevice);
++
+ /* strings can't be assigned before bind() allocates the
+ * releavnt identifiers
+ */
--- /dev/null
+From 118364948fad7b6c0469ef2d3ddaee447d7a0b5f Mon Sep 17 00:00:00 2001
+From: Wolfram Sang <w.sang@pengutronix.de>
+Date: Tue, 21 Dec 2010 17:24:24 -0800
+Subject: rtc: rs5c372: fix buffer size
+
+From: Wolfram Sang <w.sang@pengutronix.de>
+
+commit 118364948fad7b6c0469ef2d3ddaee447d7a0b5f upstream.
+
+Match the buffer size to the amount of initialized values. Before, it was
+one too big and thus destroyed the neighbouring register causing the clock
+to run at false speeds.
+
+Reported-by: Andre van Rooyen <a.v.rooyen@sercom.nl>
+Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
+Cc: Alessandro Zummo <a.zummo@towertech.it>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/rtc/rtc-rs5c372.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/rtc/rtc-rs5c372.c
++++ b/drivers/rtc/rtc-rs5c372.c
+@@ -207,7 +207,7 @@ static int rs5c372_get_datetime(struct i
+ static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
+ {
+ struct rs5c372 *rs5c = i2c_get_clientdata(client);
+- unsigned char buf[8];
++ unsigned char buf[7];
+ int addr;
+
+ dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "
alsa-hda-enable-jack-sense-for-thinkpad-edge-11.patch
input-synaptics-fix-handling-of-2-button-clickpads.patch
install_special_mapping-skips-security_file_mmap-check.patch
+usb-misc-uss720.c-add-another-vendor-product-id.patch
+usb-ftdi_sio-add-d.o.tec-pid.patch
+usb-usb-storage-unusual_devs-entry-for-the-samsung-yp-cp3.patch
+revert-usb-gadget-allow-function-access-to-device-id-data-during-bind.patch
+p54usb-add-5-more-usbids.patch
+p54usb-new-usb-id-for-gemtek-wubi-100gw.patch
+n_gsm-fix-message-length-handling-when-building-header.patch
+n_gsm-gsm_data_alloc-buffer-allocation-could-fail-and-it-is-not-being-checked.patch
+xhci-fix-issue-with-port-array-setup-and-buggy-hosts.patch
+gpio-fix-null-pointer-dereference-while-accessing-rdc321x-platform_data.patch
+cs5535-gpio-don-t-apply-errata-36-to-edge-detect-gpios.patch
+cs5535-gpio-handle-gpio-regs-where-higher-clear-bits-are-set.patch
+mmc-at91_mci-fix-multiblock-sdio-transfers.patch
+mmc-atmel-mci-fix-multiblock-sdio-transfers.patch
+mmc-fix-re-probing-with-pm_post_restore-notification.patch
+fix-freeing-user_struct-in-user-cache.patch
+rtc-rs5c372-fix-buffer-size.patch
+ramoops-don-t-overflow-over-non-allocated-regions.patch
+watchdog-fix-null-pointer-dereference-while-accessing-rdc321x-platform_data.patch
+watchdog-improve-initialisation-error-message-and-documentation.patch
+arch-x86-oprofile-op_model_amd.c-perform-initialisation-on-a-single-cpu.patch
--- /dev/null
+From 5363cdc3c5da9bd431552cf5989ab481596f0c6d Mon Sep 17 00:00:00 2001
+From: Florian Faber <faberman@linuxproaudio.org>
+Date: Wed, 1 Dec 2010 10:11:08 +0100
+Subject: USB: ftdi_sio: Add D.O.Tec PID
+
+From: Florian Faber <faberman@linuxproaudio.org>
+
+commit 5363cdc3c5da9bd431552cf5989ab481596f0c6d upstream.
+
+Add FTDI PID to identify D.O.Tec devices correctly.
+
+Signed-off-by: Florian Faber <faberman@linuxproaudio.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 1 +
+ drivers/usb/serial/ftdi_sio_ids.h | 5 +++++
+ 2 files changed, 6 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -796,6 +796,7 @@ static struct usb_device_id id_table_com
+ { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) },
++ { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) },
+ { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID),
+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+ { }, /* Optional parameter entry */
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -1081,6 +1081,11 @@
+ #define MJSG_HD_RADIO_PID 0x937C
+
+ /*
++ * D.O.Tec products (http://www.directout.eu)
++ */
++#define FTDI_DOTEC_PID 0x9868
++
++/*
+ * Xverve Signalyzer tools (http://www.signalyzer.com/)
+ */
+ #define XVERVE_SIGNALYZER_ST_PID 0xBCA0
--- /dev/null
+From ecc1624a2fff45780959efbcb73ace18fdb3c58d Mon Sep 17 00:00:00 2001
+From: Thomas Sailer <t.sailer@alumni.ethz.ch>
+Date: Tue, 14 Dec 2010 16:04:05 +0100
+Subject: USB: misc: uss720.c: add another vendor/product ID
+
+From: Thomas Sailer <t.sailer@alumni.ethz.ch>
+
+commit ecc1624a2fff45780959efbcb73ace18fdb3c58d upstream.
+
+Fabio Battaglia report that he has another cable that works with this
+driver, so this patch adds its vendor/product ID.
+
+Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/misc/uss720.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/misc/uss720.c
++++ b/drivers/usb/misc/uss720.c
+@@ -3,7 +3,7 @@
+ /*
+ * uss720.c -- USS720 USB Parport Cable.
+ *
+- * Copyright (C) 1999, 2005
++ * Copyright (C) 1999, 2005, 2010
+ * Thomas Sailer (t.sailer@alumni.ethz.ch)
+ *
+ * This program is free software; you can redistribute it and/or modify
+@@ -776,6 +776,8 @@ static const struct usb_device_id uss720
+ { USB_DEVICE(0x0557, 0x2001) },
+ { USB_DEVICE(0x0729, 0x1284) },
+ { USB_DEVICE(0x1293, 0x0002) },
++ { USB_DEVICE(0x1293, 0x0002) },
++ { USB_DEVICE(0x050d, 0x0002) },
+ { } /* Terminating entry */
+ };
+
--- /dev/null
+From d73a9b3001f29271c2e9f2a806b05a431c5d9591 Mon Sep 17 00:00:00 2001
+From: Vitaly Kuznetsov <vitty@altlinux.ru>
+Date: Tue, 14 Dec 2010 10:16:49 -0500
+Subject: USB: usb-storage: unusual_devs entry for the Samsung YP-CP3
+
+From: Vitaly Kuznetsov <vitty@altlinux.ru>
+
+commit d73a9b3001f29271c2e9f2a806b05a431c5d9591 upstream.
+
+Add an unusual_devs entry for the Samsung YP-CP3 MP4 player.
+
+User was getting the following errors in dmesg:
+ usb 2-6: reset high speed USB device using ehci_hcd and address 2
+ usb 2-6: reset high speed USB device using ehci_hcd and address 2
+ usb 2-6: reset high speed USB device using ehci_hcd and address 2
+ usb 2-6: USB disconnect, address 2
+ sd 3:0:0:0: [sdb] Assuming drive cache: write through
+ sdb:<2>ldm_validate_partition_table(): Disk read failed.
+ Dev sdb: unable to read RDB block 0
+ unable to read partition table
+
+Signed-off-by: Vitaly Kuznetsov <vitty@altlinux.ru>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/unusual_devs.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -481,6 +481,13 @@ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_MAX_SECTORS_64),
+
++/* Reported by Vitaly Kuznetsov <vitty@altlinux.ru> */
++UNUSUAL_DEV( 0x04e8, 0x5122, 0x0000, 0x9999,
++ "Samsung",
++ "YP-CP3",
++ US_SC_DEVICE, US_PR_DEVICE, NULL,
++ US_FL_MAX_SECTORS_64 | US_FL_BULK_IGNORE_TAG),
++
+ /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
+ * Device uses standards-violating 32-byte Bulk Command Block Wrappers and
+ * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011.
--- /dev/null
+From 3b3c1f24e96c411a95daabb6af9e09c5381f713b Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <florian@openwrt.org>
+Date: Fri, 26 Nov 2010 10:39:55 +0100
+Subject: watchdog: Fix null pointer dereference while accessing rdc321x platform_data
+
+From: Florian Fainelli <florian@openwrt.org>
+
+commit 3b3c1f24e96c411a95daabb6af9e09c5381f713b upstream.
+
+rdc321x-wdt currently fetches its driver specific data by using the
+platform_device->platform_data pointer, this is wrong because the mfd
+device which registers our platform_device has been added using
+mfd_add_device() which sets the platform_device->driver_data pointer
+instead.
+
+Signed-off-by: Florian Fainelli <florian@openwrt.org>
+Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/watchdog/rdc321x_wdt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/watchdog/rdc321x_wdt.c
++++ b/drivers/watchdog/rdc321x_wdt.c
+@@ -231,7 +231,7 @@ static int __devinit rdc321x_wdt_probe(s
+ struct resource *r;
+ struct rdc321x_wdt_pdata *pdata;
+
+- pdata = pdev->dev.platform_data;
++ pdata = platform_get_drvdata(pdev);
+ if (!pdata) {
+ dev_err(&pdev->dev, "no platform data supplied\n");
+ return -ENODEV;
--- /dev/null
+From 551423748a4eba55f2eb0fc250d757986471f187 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sun, 2 Jan 2011 23:02:42 +0000
+Subject: watchdog: Improve initialisation error message and documentation
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+commit 551423748a4eba55f2eb0fc250d757986471f187 upstream.
+
+The error message 'NMI watchdog failed to create perf event...'
+does not make it clear that this is a fatal error for the
+watchdog. It also currently prints the error value as a
+pointer, rather than extracting the error code with PTR_ERR().
+Fix that.
+
+Add a note to the description of the 'nowatchdog' kernel
+parameter to associate it with this message.
+
+Reported-by: Cesare Leonardi <celeonar@gmail.com>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: 599368@bugs.debian.org
+Cc: 608138@bugs.debian.org
+Cc: Don Zickus <dzickus@redhat.com>
+Cc: Frederic Weisbecker <fweisbec@gmail.com>
+LKML-Reference: <1294009362.3167.126.camel@localhost>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/kernel-parameters.txt | 2 +-
+ kernel/watchdog.c | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -1745,7 +1745,7 @@ and is between 256 and 4096 characters.
+
+ nousb [USB] Disable the USB subsystem
+
+- nowatchdog [KNL] Disable the lockup detector.
++ nowatchdog [KNL] Disable the lockup detector (NMI watchdog).
+
+ nowb [ARM]
+
+--- a/kernel/watchdog.c
++++ b/kernel/watchdog.c
+@@ -377,7 +377,8 @@ static int watchdog_nmi_enable(int cpu)
+ goto out_save;
+ }
+
+- printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event);
++ printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
++ cpu, PTR_ERR(event));
+ return -1;
+
+ /* success path */
--- /dev/null
+From f8bbeabc34aa945ab4275abc9a4dfde0aea798ca Mon Sep 17 00:00:00 2001
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Date: Thu, 9 Dec 2010 10:29:00 -0800
+Subject: xhci: Fix issue with port array setup and buggy hosts.
+
+From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+
+commit f8bbeabc34aa945ab4275abc9a4dfde0aea798ca upstream.
+
+Fix two bugs with the port array setup.
+
+The first bug will only show up with broken xHCI hosts with Extended
+Capabilities registers that have duplicate port speed entries for the same
+port. The idea with the original code was to set the port_array entry to
+-1 if the duplicate port speed entry said the port was a different speed
+than the original port speed entry. That would mean that later, the port
+would not be exposed to the USB core. Unfortunately, I forgot a continue
+statement, and the port_array entry would just be overwritten in the next
+line.
+
+The second bug would happen if there are conflicting port speed registers
+(so that some entry in port_array is -1), or one of the hardware port
+registers was not described in the port speed registers (so that some
+entry in port_array is 0). The code that sets up the usb2_ports array
+would accidentally claim those ports. That wouldn't really cause any
+user-visible issues, but it is a bug.
+
+This patch should go into the stable trees that have the port array and
+USB 3.0 port disabling prevention patches.
+
+Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/xhci-mem.c | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+--- a/drivers/usb/host/xhci-mem.c
++++ b/drivers/usb/host/xhci-mem.c
+@@ -1677,6 +1677,7 @@ static void xhci_add_in_port(struct xhci
+ xhci->port_array[i] = (u8) -1;
+ }
+ /* FIXME: Should we disable the port? */
++ continue;
+ }
+ xhci->port_array[i] = major_revision;
+ if (major_revision == 0x03)
+@@ -1755,16 +1756,20 @@ static int xhci_setup_port_arrays(struct
+ return -ENOMEM;
+
+ port_index = 0;
+- for (i = 0; i < num_ports; i++)
+- if (xhci->port_array[i] != 0x03) {
+- xhci->usb2_ports[port_index] =
+- &xhci->op_regs->port_status_base +
+- NUM_PORT_REGS*i;
+- xhci_dbg(xhci, "USB 2.0 port at index %u, "
+- "addr = %p\n", i,
+- xhci->usb2_ports[port_index]);
+- port_index++;
+- }
++ for (i = 0; i < num_ports; i++) {
++ if (xhci->port_array[i] == 0x03 ||
++ xhci->port_array[i] == 0 ||
++ xhci->port_array[i] == -1)
++ continue;
++
++ xhci->usb2_ports[port_index] =
++ &xhci->op_regs->port_status_base +
++ NUM_PORT_REGS*i;
++ xhci_dbg(xhci, "USB 2.0 port at index %u, "
++ "addr = %p\n", i,
++ xhci->usb2_ports[port_index]);
++ port_index++;
++ }
+ }
+ if (xhci->num_usb3_ports) {
+ xhci->usb3_ports = kmalloc(sizeof(*xhci->usb3_ports)*