--- /dev/null
+From c084ca704a3661bf77690a05bc6bd2c305d87c34 Mon Sep 17 00:00:00 2001
+From: Xiaotian Feng <dfeng@redhat.com>
+Date: Thu, 10 Dec 2009 19:56:45 +0800
+Subject: ACPI: don't cond_resched if irq is disabled
+
+From: Xiaotian Feng <dfeng@redhat.com>
+
+commit c084ca704a3661bf77690a05bc6bd2c305d87c34 upstream.
+
+commit 8bd108d adds preemption point after each opcode parse, then
+a sleeping function called from invalid context bug was founded
+during suspend/resume stage. this was fixed in commit abe1dfa by
+don't cond_resched when irq_disabled. But recent commit 138d156 changes
+the behaviour to don't cond_resched when in_atomic. This makes the
+sleeping function called from invalid context bug happen again, which
+is reported in http://lkml.org/lkml/2009/12/1/371.
+
+This patch also fixes http://bugzilla.kernel.org/show_bug.cgi?id=14483
+
+Reported-and-bisected-by: Larry Finger <Larry.Finger@lwfinger.net>
+Reported-and-bisected-by: Justin P. Mattock <justinmattock@gmail.com>
+Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
+Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/acpi/platform/aclinux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/acpi/platform/aclinux.h
++++ b/include/acpi/platform/aclinux.h
+@@ -152,7 +152,7 @@ static inline void *acpi_os_acquire_obje
+ #include <linux/hardirq.h>
+ #define ACPI_PREEMPTION_POINT() \
+ do { \
+- if (!in_atomic_preempt_off()) \
++ if (!in_atomic_preempt_off() && !irqs_disabled()) \
+ cond_resched(); \
+ } while (0)
+
--- /dev/null
+From 15295380f45aa0d35665f6e5596ac98c081d95b9 Mon Sep 17 00:00:00 2001
+From: Thomas Klute <thomas2.klute@uni-dortmund.de>
+Date: Tue, 17 Nov 2009 11:58:18 +0100
+Subject: ar9170: Add support for D-Link DWA 160 A2
+
+From: Thomas Klute <thomas2.klute@uni-dortmund.de>
+
+commit 15295380f45aa0d35665f6e5596ac98c081d95b9 upstream.
+
+At least two revisions of the D-Link DWA 160 exist, called A1 and A2. A1
+(USB-ID 07d1:3c10) is already listed in usb.c as D-Link DWA 160A. A2
+(USB-ID 07d1:3a09) works if added to ar9170_usb_ids. I didn't do much
+testing until now, but I was able to connect to APs using WPA or WEP and
+transmit data.
+
+Summary:
+
+* Add model revision number to the comment for D-Link DWA 160 A1 (07d1:3c10)
+* Add support for D-Link DWA 160 A2 (07d1:3a09)
+
+Signed-off-by: Thomas Klute <thomas2.klute@uni-dortmund.de>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ath/ar9170/usb.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath/ar9170/usb.c
++++ b/drivers/net/wireless/ath/ar9170/usb.c
+@@ -68,8 +68,10 @@ static struct usb_device_id ar9170_usb_i
+ { USB_DEVICE(0x0cf3, 0x1002) },
+ /* Cace Airpcap NX */
+ { USB_DEVICE(0xcace, 0x0300) },
+- /* D-Link DWA 160A */
++ /* D-Link DWA 160 A1 */
+ { USB_DEVICE(0x07d1, 0x3c10) },
++ /* D-Link DWA 160 A2 */
++ { USB_DEVICE(0x07d1, 0x3a09) },
+ /* Netgear WNDA3100 */
+ { USB_DEVICE(0x0846, 0x9010) },
+ /* Netgear WN111 v2 */
--- /dev/null
+From 12d7ea2c5a5c87834daf9fcd920aab80ff6248b1 Mon Sep 17 00:00:00 2001
+From: Ajit Khaparde <ajitk@serverengines.com>
+Date: Fri, 16 Oct 2009 18:02:12 -0700
+Subject: be2net: Add support for next generation of BladeEngine device.
+
+From: Ajit Khaparde <ajitk@serverengines.com>
+
+commit 12d7ea2c5a5c87834daf9fcd920aab80ff6248b1 upstream.
+
+Add new PCI ids to support next generation of BladeEngine device.
+
+Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/benet/be.h | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/benet/be.h
++++ b/drivers/net/benet/be.h
+@@ -35,20 +35,31 @@
+ #define DRV_VER "2.101.205"
+ #define DRV_NAME "be2net"
+ #define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC"
++#define BE3_NAME "ServerEngines BladeEngine3 10Gbps NIC"
+ #define OC_NAME "Emulex OneConnect 10Gbps NIC"
++#define OC_NAME1 "Emulex OneConnect 10Gbps NIC (be3)"
+ #define DRV_DESC BE_NAME "Driver"
+
+ #define BE_VENDOR_ID 0x19a2
+ #define BE_DEVICE_ID1 0x211
++#define BE_DEVICE_ID2 0x221
+ #define OC_DEVICE_ID1 0x700
+ #define OC_DEVICE_ID2 0x701
++#define OC_DEVICE_ID3 0x710
+
+ static inline char *nic_name(struct pci_dev *pdev)
+ {
+- if (pdev->device == OC_DEVICE_ID1 || pdev->device == OC_DEVICE_ID2)
++ switch (pdev->device) {
++ case OC_DEVICE_ID1:
++ case OC_DEVICE_ID2:
+ return OC_NAME;
+- else
++ case OC_DEVICE_ID3:
++ return OC_NAME1;
++ case BE_DEVICE_ID2:
++ return BE3_NAME;
++ default:
+ return BE_NAME;
++ }
+ }
+
+ /* Number of bytes of an RX frame that are copied to skb->data */
--- /dev/null
+From 59fd5d87a4243a992f3a3e69f3627cf4c509608e Mon Sep 17 00:00:00 2001
+From: Ajit Khaparde <ajitk@serverengines.com>
+Date: Thu, 29 Oct 2009 01:11:06 -0700
+Subject: be2net: Add the new PCI IDs to PCI_DEVICE_TABLE.
+
+From: Ajit Khaparde <ajitk@serverengines.com>
+
+commit 59fd5d87a4243a992f3a3e69f3627cf4c509608e upstream.
+
+This patch adds the PCI IDs for the next generation chip to the
+PCI_DEVICE_ID table.
+
+Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/benet/be_main.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/benet/be_main.c
++++ b/drivers/net/benet/be_main.c
+@@ -31,8 +31,10 @@ MODULE_PARM_DESC(rx_frag_size, "Size of
+
+ static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = {
+ { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) },
++ { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID2) },
+ { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) },
+ { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) },
++ { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID3) },
+ { 0 }
+ };
+ MODULE_DEVICE_TABLE(pci, be_dev_ids);
--- /dev/null
+From ea9d8e3f45404d411c00ae67b45cc35c58265bb7 Mon Sep 17 00:00:00 2001
+From: Xiaotian Feng <dfeng@redhat.com>
+Date: Thu, 7 Jan 2010 11:22:44 +0800
+Subject: clockevent: Don't remove broadcast device when cpu is dead
+
+From: Xiaotian Feng <dfeng@redhat.com>
+
+commit ea9d8e3f45404d411c00ae67b45cc35c58265bb7 upstream.
+
+Marc reported that the BUG_ON in clockevents_notify() triggers on his
+system. This happens because the kernel tries to remove an active
+clock event device (used for broadcasting) from the device list.
+
+The handling of devices which can be used as per cpu device and as a
+global broadcast device is suboptimal.
+
+The simplest solution for now (and for stable) is to check whether the
+device is used as global broadcast device, but this needs to be
+revisited.
+
+[ tglx: restored the cpuweight check and massaged the changelog ]
+
+Reported-by: Marc Dionne <marc.c.dionne@gmail.com>
+Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
+Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
+LKML-Reference: <1262834564-13033-1-git-send-email-dfeng@redhat.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/time/clockevents.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/kernel/time/clockevents.c
++++ b/kernel/time/clockevents.c
+@@ -258,7 +258,8 @@ void clockevents_notify(unsigned long re
+ cpu = *((int *)arg);
+ list_for_each_entry_safe(dev, tmp, &clockevent_devices, list) {
+ if (cpumask_test_cpu(cpu, dev->cpumask) &&
+- cpumask_weight(dev->cpumask) == 1) {
++ cpumask_weight(dev->cpumask) == 1 &&
++ !tick_is_broadcast_device(dev)) {
+ BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
+ list_del(&dev->list);
+ }
--- /dev/null
+From 8e1a928a2ed7e8d5cad97c8e985294b4caedd168 Mon Sep 17 00:00:00 2001
+From: H Hartley Sweeten <hartleys@visionengravers.com>
+Date: Fri, 16 Oct 2009 18:19:01 -0400
+Subject: clockevents: Add missing include to pacify sparse
+
+From: H Hartley Sweeten <hartleys@visionengravers.com>
+
+commit 8e1a928a2ed7e8d5cad97c8e985294b4caedd168 upstream.
+
+Include "tick-internal.h" in order to pick up the extern function
+prototype for clockevents_shutdown(). This quiets the following sparse
+build noise:
+
+ warning: symbol 'clockevents_shutdown' was not declared. Should it be static?
+
+Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
+LKML-Reference: <BD79186B4FD85F4B8E60E381CAEE190901E24550@mi8nycmail19.Mi8.com>
+Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
+Cc: johnstul@us.ibm.com
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/time/clockevents.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/kernel/time/clockevents.c
++++ b/kernel/time/clockevents.c
+@@ -20,6 +20,8 @@
+ #include <linux/sysdev.h>
+ #include <linux/tick.h>
+
++#include "tick-internal.h"
++
+ /* The registered clock event devices */
+ static LIST_HEAD(clockevent_devices);
+ static LIST_HEAD(clockevents_released);
--- /dev/null
+From f63dd12da29f47c37bbc093abec098538e04357c Mon Sep 17 00:00:00 2001
+From: Hemant Pedanekar <hemantp@ti.com>
+Date: Wed, 2 Sep 2009 16:49:35 +0530
+Subject: davinci: dm646x: Add support for 3.x silicon revision
+
+From: Hemant Pedanekar <hemantp@ti.com>
+
+commit f63dd12da29f47c37bbc093abec098538e04357c upstream.
+
+DM6467 silicon revisions 3.x have variant field in JTAGID register as '1'.
+This path adds entry for the same in dm646x_ids to be able to boot on boards
+with 3.x revision chips.
+
+Also modifies name for 'variant=0' (revisions 1.0, 1.1).
+
+Signed-off-by: Hemant Pedanekar <hemantp@ti.com>
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-davinci/dm646x.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/mach-davinci/dm646x.c
++++ b/arch/arm/mach-davinci/dm646x.c
+@@ -789,7 +789,14 @@ static struct davinci_id dm646x_ids[] =
+ .part_no = 0xb770,
+ .manufacturer = 0x017,
+ .cpu_id = DAVINCI_CPU_ID_DM6467,
+- .name = "dm6467",
++ .name = "dm6467_rev1.x",
++ },
++ {
++ .variant = 0x1,
++ .part_no = 0xb770,
++ .manufacturer = 0x017,
++ .cpu_id = DAVINCI_CPU_ID_DM6467,
++ .name = "dm6467_rev3.x",
+ },
+ };
+
--- /dev/null
+From 03d673e6af6490371aaf64dfe1f84c658c48b71d Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay.sievers@vrfy.org>
+Date: Fri, 30 Oct 2009 12:48:32 +0100
+Subject: Driver-Core: devtmpfs - set root directory mode to 0755
+
+From: Kay Sievers <kay.sievers@vrfy.org>
+
+commit 03d673e6af6490371aaf64dfe1f84c658c48b71d upstream.
+
+Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
+Cc: Mark Rosenstand <rosenstand@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/devtmpfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/base/devtmpfs.c
++++ b/drivers/base/devtmpfs.c
+@@ -361,7 +361,7 @@ int __init devtmpfs_init(void)
+ return err;
+ }
+
+- mnt = kern_mount(&dev_fs_type);
++ mnt = kern_mount_data(&dev_fs_type, "mode=0755");
+ if (IS_ERR(mnt)) {
+ err = PTR_ERR(mnt);
+ printk(KERN_ERR "devtmpfs: unable to create devtmpfs %i\n", err);
--- /dev/null
+From adi@hexapodia.org Mon Jan 25 11:19:41 2010
+From: Sebastian Kapfer <sebastian_kapfer@gmx.net>
+Date: Fri, 15 Jan 2010 10:11:22 -0800
+Subject: Input: ALPS - add interleaved protocol support (Dell E6x00 series)
+To: stable@kernel.org
+Cc: Dmitry Torokhov <dtor@mail.ru>, kernel-team@lists.ubuntu.com, Sebastian Kapfer <sebastian_kapfer@gmx.net>, 296610@bugs.launchpad.net
+Message-ID: <20100115181122.GA11414@hexapodia.org>
+Content-Disposition: inline
+
+From: Sebastian Kapfer <sebastian_kapfer@gmx.net>
+
+commit 1d9f26262aef6d63ff65eba0fd5f1583f342b69b upstream
+
+Properly handle version of the protocol where standard PS/2 packets
+from trackpoint are stuffed into middle (byte 3-6) of the standard
+ALPS packets when both the touchpad and trackpoint are used together.
+
+The patch is based on work done by Matthew Chapman and additional
+research done by David Kubicek and Erik Osterholm:
+
+ https://bugs.launchpad.net/ubuntu/+source/linux/+bug/296610
+
+Many thanks to David Kubicek for his efforts in researching fine points
+of this new version of the protocol, especially interaction between pad
+and stick in these models.
+
+Cc: Andy Isaacson <adi@hexapodia.org>
+Signed-off-by: Sebastian Kapfer <sebastian_kapfer@gmx.net>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/mouse/alps.c | 252 ++++++++++++++++++++++++++++++++++++++++-----
+ drivers/input/mouse/alps.h | 1
+ 2 files changed, 228 insertions(+), 25 deletions(-)
+
+--- a/drivers/input/mouse/alps.c
++++ b/drivers/input/mouse/alps.c
+@@ -5,6 +5,7 @@
+ * Copyright (c) 2003-2005 Peter Osterlund <petero2@telia.com>
+ * Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
+ * Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz>
++ * Copyright (c) 2009 Sebastian Kapfer <sebastian_kapfer@gmx.net>
+ *
+ * ALPS detection, tap switching and status querying info is taken from
+ * tpconfig utility (by C. Scott Ananian and Bruce Kall).
+@@ -35,6 +36,8 @@
+ #define ALPS_OLDPROTO 0x10
+ #define ALPS_PASS 0x20
+ #define ALPS_FW_BK_2 0x40
++#define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with
++ 6-byte ALPS packet */
+
+ static const struct alps_model_info alps_model_data[] = {
+ { { 0x32, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
+@@ -55,7 +58,9 @@ static const struct alps_model_info alps
+ { { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
+ { { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
+ { { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
+- { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude E6500 */
++ /* Dell Latitude E5500, E6400, E6500, Precision M4400 */
++ { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf,
++ ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
+ { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 }, /* Dell Vostro 1400 */
+ };
+
+@@ -66,20 +71,88 @@ static const struct alps_model_info alps
+ */
+
+ /*
+- * ALPS abolute Mode - new format
++ * PS/2 packet format
++ *
++ * byte 0: 0 0 YSGN XSGN 1 M R L
++ * byte 1: X7 X6 X5 X4 X3 X2 X1 X0
++ * byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
++ *
++ * Note that the device never signals overflow condition.
++ *
++ * ALPS absolute Mode - new format
+ *
+ * byte 0: 1 ? ? ? 1 ? ? ?
+ * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
+- * byte 2: 0 x10 x9 x8 x7 ? fin ges
++ * byte 2: 0 x10 x9 x8 x7 ? fin ges
+ * byte 3: 0 y9 y8 y7 1 M R L
+ * byte 4: 0 y6 y5 y4 y3 y2 y1 y0
+ * byte 5: 0 z6 z5 z4 z3 z2 z1 z0
+ *
++ * Dualpoint device -- interleaved packet format
++ *
++ * byte 0: 1 1 0 0 1 1 1 1
++ * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
++ * byte 2: 0 x10 x9 x8 x7 0 fin ges
++ * byte 3: 0 0 YSGN XSGN 1 1 1 1
++ * byte 4: X7 X6 X5 X4 X3 X2 X1 X0
++ * byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
++ * byte 6: 0 y9 y8 y7 1 m r l
++ * byte 7: 0 y6 y5 y4 y3 y2 y1 y0
++ * byte 8: 0 z6 z5 z4 z3 z2 z1 z0
++ *
++ * CAPITALS = stick, miniscules = touchpad
++ *
+ * ?'s can have different meanings on different models,
+ * such as wheel rotation, extra buttons, stick buttons
+ * on a dualpoint, etc.
+ */
+
++static bool alps_is_valid_first_byte(const struct alps_model_info *model,
++ unsigned char data)
++{
++ return (data & model->mask0) == model->byte0;
++}
++
++static void alps_report_buttons(struct psmouse *psmouse,
++ struct input_dev *dev1, struct input_dev *dev2,
++ int left, int right, int middle)
++{
++ struct alps_data *priv = psmouse->private;
++ const struct alps_model_info *model = priv->i;
++
++ if (model->flags & ALPS_PS2_INTERLEAVED) {
++ struct input_dev *dev;
++
++ /*
++ * If shared button has already been reported on the
++ * other device (dev2) then this event should be also
++ * sent through that device.
++ */
++ dev = test_bit(BTN_LEFT, dev2->key) ? dev2 : dev1;
++ input_report_key(dev, BTN_LEFT, left);
++
++ dev = test_bit(BTN_RIGHT, dev2->key) ? dev2 : dev1;
++ input_report_key(dev, BTN_RIGHT, right);
++
++ dev = test_bit(BTN_MIDDLE, dev2->key) ? dev2 : dev1;
++ input_report_key(dev, BTN_MIDDLE, middle);
++
++ /*
++ * Sync the _other_ device now, we'll do the first
++ * device later once we report the rest of the events.
++ */
++ input_sync(dev2);
++ } else {
++ /*
++ * For devices with non-interleaved packets we know what
++ * device buttons belong to so we can simply report them.
++ */
++ input_report_key(dev1, BTN_LEFT, left);
++ input_report_key(dev1, BTN_RIGHT, right);
++ input_report_key(dev1, BTN_MIDDLE, middle);
++ }
++}
++
+ static void alps_process_packet(struct psmouse *psmouse)
+ {
+ struct alps_data *priv = psmouse->private;
+@@ -89,18 +162,6 @@ static void alps_process_packet(struct p
+ int x, y, z, ges, fin, left, right, middle;
+ int back = 0, forward = 0;
+
+- if ((packet[0] & 0xc8) == 0x08) { /* 3-byte PS/2 packet */
+- input_report_key(dev2, BTN_LEFT, packet[0] & 1);
+- input_report_key(dev2, BTN_RIGHT, packet[0] & 2);
+- input_report_key(dev2, BTN_MIDDLE, packet[0] & 4);
+- input_report_rel(dev2, REL_X,
+- packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0);
+- input_report_rel(dev2, REL_Y,
+- packet[2] ? ((packet[0] << 3) & 0x100) - packet[2] : 0);
+- input_sync(dev2);
+- return;
+- }
+-
+ if (priv->i->flags & ALPS_OLDPROTO) {
+ left = packet[2] & 0x10;
+ right = packet[2] & 0x08;
+@@ -136,18 +197,13 @@ static void alps_process_packet(struct p
+ input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x));
+ input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y));
+
+- input_report_key(dev2, BTN_LEFT, left);
+- input_report_key(dev2, BTN_RIGHT, right);
+- input_report_key(dev2, BTN_MIDDLE, middle);
++ alps_report_buttons(psmouse, dev2, dev, left, right, middle);
+
+- input_sync(dev);
+ input_sync(dev2);
+ return;
+ }
+
+- input_report_key(dev, BTN_LEFT, left);
+- input_report_key(dev, BTN_RIGHT, right);
+- input_report_key(dev, BTN_MIDDLE, middle);
++ alps_report_buttons(psmouse, dev, dev2, left, right, middle);
+
+ /* Convert hardware tap to a reasonable Z value */
+ if (ges && !fin) z = 40;
+@@ -188,25 +244,168 @@ static void alps_process_packet(struct p
+ input_sync(dev);
+ }
+
++static void alps_report_bare_ps2_packet(struct psmouse *psmouse,
++ unsigned char packet[],
++ bool report_buttons)
++{
++ struct alps_data *priv = psmouse->private;
++ struct input_dev *dev2 = priv->dev2;
++
++ if (report_buttons)
++ alps_report_buttons(psmouse, dev2, psmouse->dev,
++ packet[0] & 1, packet[0] & 2, packet[0] & 4);
++
++ input_report_rel(dev2, REL_X,
++ packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0);
++ input_report_rel(dev2, REL_Y,
++ packet[2] ? ((packet[0] << 3) & 0x100) - packet[2] : 0);
++
++ input_sync(dev2);
++}
++
++static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse)
++{
++ struct alps_data *priv = psmouse->private;
++
++ if (psmouse->pktcnt < 6)
++ return PSMOUSE_GOOD_DATA;
++
++ if (psmouse->pktcnt == 6) {
++ /*
++ * Start a timer to flush the packet if it ends up last
++ * 6-byte packet in the stream. Timer needs to fire
++ * psmouse core times out itself. 20 ms should be enough
++ * to decide if we are getting more data or not.
++ */
++ mod_timer(&priv->timer, jiffies + msecs_to_jiffies(20));
++ return PSMOUSE_GOOD_DATA;
++ }
++
++ del_timer(&priv->timer);
++
++ if (psmouse->packet[6] & 0x80) {
++
++ /*
++ * Highest bit is set - that means we either had
++ * complete ALPS packet and this is start of the
++ * next packet or we got garbage.
++ */
++
++ if (((psmouse->packet[3] |
++ psmouse->packet[4] |
++ psmouse->packet[5]) & 0x80) ||
++ (!alps_is_valid_first_byte(priv->i, psmouse->packet[6]))) {
++ dbg("refusing packet %x %x %x %x "
++ "(suspected interleaved ps/2)\n",
++ psmouse->packet[3], psmouse->packet[4],
++ psmouse->packet[5], psmouse->packet[6]);
++ return PSMOUSE_BAD_DATA;
++ }
++
++ alps_process_packet(psmouse);
++
++ /* Continue with the next packet */
++ psmouse->packet[0] = psmouse->packet[6];
++ psmouse->pktcnt = 1;
++
++ } else {
++
++ /*
++ * High bit is 0 - that means that we indeed got a PS/2
++ * packet in the middle of ALPS packet.
++ *
++ * There is also possibility that we got 6-byte ALPS
++ * packet followed by 3-byte packet from trackpoint. We
++ * can not distinguish between these 2 scenarios but
++ * becase the latter is unlikely to happen in course of
++ * normal operation (user would need to press all
++ * buttons on the pad and start moving trackpoint
++ * without touching the pad surface) we assume former.
++ * Even if we are wrong the wost thing that would happen
++ * the cursor would jump but we should not get protocol
++ * desynchronization.
++ */
++
++ alps_report_bare_ps2_packet(psmouse, &psmouse->packet[3],
++ false);
++
++ /*
++ * Continue with the standard ALPS protocol handling,
++ * but make sure we won't process it as an interleaved
++ * packet again, which may happen if all buttons are
++ * pressed. To avoid this let's reset the 4th bit which
++ * is normally 1.
++ */
++ psmouse->packet[3] = psmouse->packet[6] & 0xf7;
++ psmouse->pktcnt = 4;
++ }
++
++ return PSMOUSE_GOOD_DATA;
++}
++
++static void alps_flush_packet(unsigned long data)
++{
++ struct psmouse *psmouse = (struct psmouse *)data;
++
++ serio_pause_rx(psmouse->ps2dev.serio);
++
++ if (psmouse->pktcnt == 6) {
++
++ /*
++ * We did not any more data in reasonable amount of time.
++ * Validate the last 3 bytes and process as a standard
++ * ALPS packet.
++ */
++ if ((psmouse->packet[3] |
++ psmouse->packet[4] |
++ psmouse->packet[5]) & 0x80) {
++ dbg("refusing packet %x %x %x "
++ "(suspected interleaved ps/2)\n",
++ psmouse->packet[3], psmouse->packet[4],
++ psmouse->packet[5]);
++ } else {
++ alps_process_packet(psmouse);
++ }
++ psmouse->pktcnt = 0;
++ }
++
++ serio_continue_rx(psmouse->ps2dev.serio);
++}
++
+ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
+ {
+ struct alps_data *priv = psmouse->private;
++ const struct alps_model_info *model = priv->i;
+
+ if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */
+ if (psmouse->pktcnt == 3) {
+- alps_process_packet(psmouse);
++ alps_report_bare_ps2_packet(psmouse, psmouse->packet,
++ true);
+ return PSMOUSE_FULL_PACKET;
+ }
+ return PSMOUSE_GOOD_DATA;
+ }
+
+- if ((psmouse->packet[0] & priv->i->mask0) != priv->i->byte0)
++ /* Check for PS/2 packet stuffed in the middle of ALPS packet. */
++
++ if ((model->flags & ALPS_PS2_INTERLEAVED) &&
++ psmouse->pktcnt >= 4 && (psmouse->packet[3] & 0x0f) == 0x0f) {
++ return alps_handle_interleaved_ps2(psmouse);
++ }
++
++ if (!alps_is_valid_first_byte(model, psmouse->packet[0])) {
++ dbg("refusing packet[0] = %x (mask0 = %x, byte0 = %x)\n",
++ psmouse->packet[0], model->mask0, model->byte0);
+ return PSMOUSE_BAD_DATA;
++ }
+
+ /* Bytes 2 - 6 should have 0 in the highest bit */
+ if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
+- (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
++ (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) {
++ dbg("refusing packet[%i] = %x\n",
++ psmouse->pktcnt - 1, psmouse->packet[psmouse->pktcnt - 1]);
+ return PSMOUSE_BAD_DATA;
++ }
+
+ if (psmouse->pktcnt == 6) {
+ alps_process_packet(psmouse);
+@@ -445,6 +644,7 @@ static void alps_disconnect(struct psmou
+ struct alps_data *priv = psmouse->private;
+
+ psmouse_reset(psmouse);
++ del_timer_sync(&priv->timer);
+ input_unregister_device(priv->dev2);
+ kfree(priv);
+ }
+@@ -461,6 +661,8 @@ int alps_init(struct psmouse *psmouse)
+ goto init_fail;
+
+ priv->dev2 = dev2;
++ setup_timer(&priv->timer, alps_flush_packet, (unsigned long)psmouse);
++
+ psmouse->private = priv;
+
+ if (alps_hw_init(psmouse, &version))
+--- a/drivers/input/mouse/alps.h
++++ b/drivers/input/mouse/alps.h
+@@ -23,6 +23,7 @@ struct alps_data {
+ char phys[32]; /* Phys */
+ const struct alps_model_info *i;/* Info */
+ int prev_fin; /* Finger bit from previous packet */
++ struct timer_list timer;
+ };
+
+ #ifdef CONFIG_MOUSE_PS2_ALPS
--- /dev/null
+From db27136a89d061bf9dceb28953a61a8ef862ca7f Mon Sep 17 00:00:00 2001
+From: Kashyap, Desai <kashyap.desai@lsi.com>
+Date: Wed, 23 Sep 2009 17:24:27 +0530
+Subject: [SCSI] mpt2sas: New device SAS2208 support is added
+
+From: Kashyap, Desai <kashyap.desai@lsi.com>
+
+commit db27136a89d061bf9dceb28953a61a8ef862ca7f upstream.
+
+Added device ids range for { 0x80 - 87 } , modified mpi/mpi2_cnfg.h containing
+MPI2_MFGPAGE_DEVID_SAS2208_X.
+
+Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
+Signed-off-by: Eric Moore <Eric.moore@lsi.com>
+Signed-off-by: James Bottomley <James.Bottomley@suse.de>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h | 8 ++++++++
+ drivers/scsi/mpt2sas/mpt2sas_scsih.c | 18 ++++++++++++++++++
+ 2 files changed, 26 insertions(+)
+
+--- a/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h
++++ b/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h
+@@ -348,6 +348,14 @@ typedef struct _MPI2_CONFIG_REPLY
+ #define MPI2_MFGPAGE_DEVID_SAS2108_3 (0x0077)
+ #define MPI2_MFGPAGE_DEVID_SAS2116_1 (0x0064)
+ #define MPI2_MFGPAGE_DEVID_SAS2116_2 (0x0065)
++#define MPI2_MFGPAGE_DEVID_SAS2208_1 (0x0080)
++#define MPI2_MFGPAGE_DEVID_SAS2208_2 (0x0081)
++#define MPI2_MFGPAGE_DEVID_SAS2208_3 (0x0082)
++#define MPI2_MFGPAGE_DEVID_SAS2208_4 (0x0083)
++#define MPI2_MFGPAGE_DEVID_SAS2208_5 (0x0084)
++#define MPI2_MFGPAGE_DEVID_SAS2208_6 (0x0085)
++#define MPI2_MFGPAGE_DEVID_SAS2208_7 (0x0086)
++#define MPI2_MFGPAGE_DEVID_SAS2208_8 (0x0087)
+
+
+ /* Manufacturing Page 0 */
+--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
++++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+@@ -196,10 +196,28 @@ static struct pci_device_id scsih_pci_ta
+ PCI_ANY_ID, PCI_ANY_ID },
+ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2108_3,
+ PCI_ANY_ID, PCI_ANY_ID },
++ /* Meteor ~ 2116 */
+ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2116_1,
+ PCI_ANY_ID, PCI_ANY_ID },
+ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2116_2,
+ PCI_ANY_ID, PCI_ANY_ID },
++ /* Thunderbolt ~ 2208 */
++ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_1,
++ PCI_ANY_ID, PCI_ANY_ID },
++ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_2,
++ PCI_ANY_ID, PCI_ANY_ID },
++ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_3,
++ PCI_ANY_ID, PCI_ANY_ID },
++ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_4,
++ PCI_ANY_ID, PCI_ANY_ID },
++ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_5,
++ PCI_ANY_ID, PCI_ANY_ID },
++ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_6,
++ PCI_ANY_ID, PCI_ANY_ID },
++ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_7,
++ PCI_ANY_ID, PCI_ANY_ID },
++ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2208_8,
++ PCI_ANY_ID, PCI_ANY_ID },
+ {0} /* Terminating entry */
+ };
+ MODULE_DEVICE_TABLE(pci, scsih_pci_table);
--- /dev/null
+From ben@decadent.org.uk Mon Jan 25 11:18:10 2010
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 23 Jan 2010 14:27:55 +0000
+Subject: [stable] [PATCH] powerpc/fsl: Add PCI device ids for new QoirQ chips
+To: stable@kernel.org
+Cc: Kumar Gala <galak@kernel.crashing.org>
+Message-ID: <1264256875.373.41.camel@localhost>
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+commit a3f62bd2b20c769ddc989b242ddd274179e19ee6 upstream by
+Kumar Gala <galak@kernel.crashing.org>. I have adjusted the patch
+context for 2.6.32.
+
+Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/sysdev/fsl_pci.c | 14 ++++++++++++++
+ include/linux/pci_ids.h | 14 ++++++++++++++
+ 2 files changed, 28 insertions(+)
+
+--- a/arch/powerpc/sysdev/fsl_pci.c
++++ b/arch/powerpc/sysdev/fsl_pci.c
+@@ -392,8 +392,22 @@ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEV
+ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header);
+ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
+ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1011E, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1011, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1013E, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1013, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1020E, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1020, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1022E, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P1022, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P2010E, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P2010, quirk_fsl_pcie_header);
+ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P2020E, quirk_fsl_pcie_header);
+ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P2020, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P4040E, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P4040, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P4080E, quirk_fsl_pcie_header);
++DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_P4080, quirk_fsl_pcie_header);
+ #endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
+
+ #if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x)
+--- a/include/linux/pci_ids.h
++++ b/include/linux/pci_ids.h
+@@ -2290,6 +2290,20 @@
+ #define PCI_DEVICE_ID_MPC8536 0x0051
+ #define PCI_DEVICE_ID_P2020E 0x0070
+ #define PCI_DEVICE_ID_P2020 0x0071
++#define PCI_DEVICE_ID_P2010E 0x0078
++#define PCI_DEVICE_ID_P2010 0x0079
++#define PCI_DEVICE_ID_P1020E 0x0100
++#define PCI_DEVICE_ID_P1020 0x0101
++#define PCI_DEVICE_ID_P1011E 0x0108
++#define PCI_DEVICE_ID_P1011 0x0109
++#define PCI_DEVICE_ID_P1022E 0x0110
++#define PCI_DEVICE_ID_P1022 0x0111
++#define PCI_DEVICE_ID_P1013E 0x0118
++#define PCI_DEVICE_ID_P1013 0x0119
++#define PCI_DEVICE_ID_P4080E 0x0400
++#define PCI_DEVICE_ID_P4080 0x0401
++#define PCI_DEVICE_ID_P4040E 0x0408
++#define PCI_DEVICE_ID_P4040 0x0409
+ #define PCI_DEVICE_ID_MPC8641 0x7010
+ #define PCI_DEVICE_ID_MPC8641D 0x7011
+ #define PCI_DEVICE_ID_MPC8610 0x7018
--- /dev/null
+clockevent-don-t-remove-broadcast-device-when-cpu-is-dead.patch
+clockevents-add-missing-include-to-pacify-sparse.patch
+acpi-don-t-cond_resched-if-irq-is-disabled.patch
+sfc-fix-dma-mapping-cleanup-in-case-of-an-error-in-tso.patch
+be2net-add-support-for-next-generation-of-bladeengine-device.patch
+be2net-add-the-new-pci-ids-to-pci_device_table.patch
+mpt2sas-new-device-sas2208-support-is-added.patch
+ar9170-add-support-for-d-link-dwa-160-a2.patch
+powerpc-fsl-add-pci-device-ids-for-new-qoirq-chips.patch
+davinci-dm646x-add-support-for-3.x-silicon-revision.patch
+input-alps-add-interleaved-protocol-support-dell-e6x00-series.patch
+driver-core-devtmpfs-set-root-directory-mode-to-0755.patch
--- /dev/null
+From a7ebd27a13757248863cd61e541af7fa9e7727ee Mon Sep 17 00:00:00 2001
+From: Neil Turton <nturton@solarflare.com>
+Date: Wed, 23 Dec 2009 13:47:13 +0000
+Subject: sfc: Fix DMA mapping cleanup in case of an error in TSO
+
+From: Neil Turton <nturton@solarflare.com>
+
+commit a7ebd27a13757248863cd61e541af7fa9e7727ee upstream.
+
+We need buffer->len to remain valid to work out the correct address to
+be unmapped. We therefore need to clear buffer->len after the unmap
+operation.
+
+Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/sfc/tx.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/sfc/tx.c
++++ b/drivers/net/sfc/tx.c
+@@ -821,8 +821,6 @@ static void efx_enqueue_unwind(struct ef
+ tx_queue->efx->type->txd_ring_mask];
+ efx_tsoh_free(tx_queue, buffer);
+ EFX_BUG_ON_PARANOID(buffer->skb);
+- buffer->len = 0;
+- buffer->continuation = true;
+ if (buffer->unmap_len) {
+ unmap_addr = (buffer->dma_addr + buffer->len -
+ buffer->unmap_len);
+@@ -836,6 +834,8 @@ static void efx_enqueue_unwind(struct ef
+ PCI_DMA_TODEVICE);
+ buffer->unmap_len = 0;
+ }
++ buffer->len = 0;
++ buffer->continuation = true;
+ }
+ }
+