--- /dev/null
+From e2434dc1c19412639dd047a4d4eff8ed0e5d0d50 Mon Sep 17 00:00:00 2001
+From: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
+Date: Mon, 22 Jun 2009 16:51:49 +0100
+Subject: parport_pc: after superio probing restore original register values
+
+From: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
+
+commit e2434dc1c19412639dd047a4d4eff8ed0e5d0d50 upstream.
+
+CONFIG_PARPORT_PC_SUPERIO probes for various superio chips by writing
+byte sequences to a set of different potential I/O ranges. But the
+probed ranges are not exclusive to parallel ports. Some of our boards
+just happen to have a watchdog in one of them. Took us almost a week
+to figure out why some distros reboot without warning after running
+flawlessly for 3 hours. For exactly 170 = 0xAA minutes, that is ...
+
+Fixed by restoring original values after probing. Also fixed too small
+request_region() in detect_and_report_it87().
+
+Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Acked-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/parport/parport_pc.c | 31 +++++++++++++++++++++++++------
+ 1 file changed, 25 insertions(+), 6 deletions(-)
+
+--- a/drivers/parport/parport_pc.c
++++ b/drivers/parport/parport_pc.c
+@@ -1413,11 +1413,13 @@ static void __devinit decode_smsc(int ef
+
+ static void __devinit winbond_check(int io, int key)
+ {
+- int devid,devrev,oldid,x_devid,x_devrev,x_oldid;
++ int origval, devid, devrev, oldid, x_devid, x_devrev, x_oldid;
+
+ if (!request_region(io, 3, __func__))
+ return;
+
++ origval = inb(io); /* Save original value */
++
+ /* First probe without key */
+ outb(0x20,io);
+ x_devid=inb(io+1);
+@@ -1437,6 +1439,8 @@ static void __devinit winbond_check(int
+ oldid=inb(io+1);
+ outb(0xaa,io); /* Magic Seal */
+
++ outb(origval, io); /* in case we poked some entirely different hardware */
++
+ if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid))
+ goto out; /* protection against false positives */
+
+@@ -1447,11 +1451,15 @@ out:
+
+ static void __devinit winbond_check2(int io,int key)
+ {
+- int devid,devrev,oldid,x_devid,x_devrev,x_oldid;
++ int origval[3], devid, devrev, oldid, x_devid, x_devrev, x_oldid;
+
+ if (!request_region(io, 3, __func__))
+ return;
+
++ origval[0] = inb(io); /* Save original values */
++ origval[1] = inb(io + 1);
++ origval[2] = inb(io + 2);
++
+ /* First probe without the key */
+ outb(0x20,io+2);
+ x_devid=inb(io+2);
+@@ -1470,6 +1478,10 @@ static void __devinit winbond_check2(int
+ oldid=inb(io+2);
+ outb(0xaa,io); /* Magic Seal */
+
++ outb(origval[0], io); /* in case we poked some entirely different hardware */
++ outb(origval[1], io + 1);
++ outb(origval[2], io + 2);
++
+ if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid))
+ goto out; /* protection against false positives */
+
+@@ -1480,11 +1492,13 @@ out:
+
+ static void __devinit smsc_check(int io, int key)
+ {
+- int id,rev,oldid,oldrev,x_id,x_rev,x_oldid,x_oldrev;
++ int origval, id, rev, oldid, oldrev, x_id, x_rev, x_oldid, x_oldrev;
+
+ if (!request_region(io, 3, __func__))
+ return;
+
++ origval = inb(io); /* Save original value */
++
+ /* First probe without the key */
+ outb(0x0d,io);
+ x_oldid=inb(io+1);
+@@ -1508,6 +1522,8 @@ static void __devinit smsc_check(int io,
+ rev=inb(io+1);
+ outb(0xaa,io); /* Magic Seal */
+
++ outb(origval, io); /* in case we poked some entirely different hardware */
++
+ if ((x_id == id) && (x_oldrev == oldrev) &&
+ (x_oldid == oldid) && (x_rev == rev))
+ goto out; /* protection against false positives */
+@@ -1544,11 +1560,12 @@ static void __devinit detect_and_report_
+ static void __devinit detect_and_report_it87(void)
+ {
+ u16 dev;
+- u8 r;
++ u8 origval, r;
+ if (verbose_probing)
+ printk(KERN_DEBUG "IT8705 Super-IO detection, now testing port 2E ...\n");
+- if (!request_region(0x2e, 1, __func__))
++ if (!request_region(0x2e, 2, __func__))
+ return;
++ origval = inb(0x2e); /* Save original value */
+ outb(0x87, 0x2e);
+ outb(0x01, 0x2e);
+ outb(0x55, 0x2e);
+@@ -1568,8 +1585,10 @@ static void __devinit detect_and_report_
+ outb(r | 8, 0x2F);
+ outb(0x02, 0x2E); /* Lock */
+ outb(0x02, 0x2F);
++ } else {
++ outb(origval, 0x2e); /* Oops, sorry to disturb */
+ }
+- release_region(0x2e, 1);
++ release_region(0x2e, 2);
+ }
+ #endif /* CONFIG_PARPORT_PC_SUPERIO */
+
--- /dev/null
+From dfa7c4d869b7d3d37b70f1de856f2901b6ebfcf0 Mon Sep 17 00:00:00 2001
+From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+Date: Mon, 22 Jun 2009 16:54:27 +0100
+Subject: parport_pc: set properly the dma_mask for parport_pc device
+
+From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+
+commit dfa7c4d869b7d3d37b70f1de856f2901b6ebfcf0 upstream.
+
+parport_pc_probe_port() creates the own 'parport_pc' device if the
+device argument is NULL. Then parport_pc_probe_port() doesn't
+initialize the dma_mask and coherent_dma_mask of the device and calls
+dma_alloc_coherent with it. dma_alloc_coherent fails because
+dma_alloc_coherent() doesn't accept the uninitialized dma_mask:
+
+http://lkml.org/lkml/2009/6/16/150
+
+Long ago, X86_32 and X86_64 had the own dma_alloc_coherent
+implementations; X86_32 accepted a device having dma_mask that is not
+initialized however X86_64 didn't. When we merged them, we chose to
+prohibit a device having dma_mask that is not initialized. I think
+that it's good to require drivers to set up dma_mask (and
+coherent_dma_mask) properly if the drivers want DMA.
+
+Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+Reported-by: Malcom Blaney <malcolm.blaney@maptek.com.au>
+Tested-by: Malcom Blaney <malcolm.blaney@maptek.com.au>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Acked-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/parport/parport_pc.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/parport/parport_pc.c
++++ b/drivers/parport/parport_pc.c
+@@ -2211,6 +2211,9 @@ struct parport *parport_pc_probe_port (u
+ if (IS_ERR(pdev))
+ return NULL;
+ dev = &pdev->dev;
++
++ dev->coherent_dma_mask = DMA_BIT_MASK(24);
++ dev->dma_mask = &dev->coherent_dma_mask;
+ }
+
+ ops = kmalloc(sizeof (struct parport_operations), GFP_KERNEL);
--- /dev/null
+From d2abdf62882d982c58e7a6b09ecdcfcc28075e2e Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Sun, 14 Jun 2009 21:25:02 +0200
+Subject: PCI PM: Fix handling of devices without PM support by pci_target_state()
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit d2abdf62882d982c58e7a6b09ecdcfcc28075e2e upstream.
+
+If a PCI device is not power-manageable either by the platform, or
+with the help of the native PCI PM interface, pci_target_state() will
+return either PCI_D3hot, or PCI_POWER_ERROR for it, depending on
+whether or not the device is configured to wake up the system. Alas,
+none of these return values is correct, because each of them causes
+pci_prepare_to_sleep() to return error code, although it should
+complete successfully in such a case.
+
+Fix this problem by making pci_target_state() always return PCI_D0
+for devices that cannot be power managed.
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/pci.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/drivers/pci/pci.c
++++ b/drivers/pci/pci.c
+@@ -1196,15 +1196,14 @@ pci_power_t pci_target_state(struct pci_
+ default:
+ target_state = state;
+ }
++ } else if (!dev->pm_cap) {
++ target_state = PCI_D0;
+ } else if (device_may_wakeup(&dev->dev)) {
+ /*
+ * Find the deepest state from which the device can generate
+ * wake-up events, make it the target state and enable device
+ * to generate PME#.
+ */
+- if (!dev->pm_cap)
+- return PCI_POWER_ERROR;
+-
+ if (dev->pme_support) {
+ while (target_state
+ && !(dev->pme_support & (1 << target_state)))
--- /dev/null
+From f62795f1e892ca9269849fa83de97621da7e02c0 Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Mon, 18 May 2009 22:51:12 +0200
+Subject: PCI PM: Follow PCI_PM_CTRL_NO_SOFT_RESET during transitions from D3
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit f62795f1e892ca9269849fa83de97621da7e02c0 upstream.
+
+According to the PCI PM specification (PCI Bus Power Management
+Interface Specification, Rev. 1.2, Section 5.4.1) we are supposed to
+reinitialize devices that have PCI_PM_CTRL_NO_SOFT_RESET clear during
+all transitions from PCI_D3hot to PCI_D0, but we only do it if the
+device's current_state field is equal to PCI_UNKNOWN.
+
+This may lead to problems if a device with PCI_PM_CTRL_NO_SOFT_RESET
+unset is put into PCI_D3hot at run time by its driver and
+pci_set_power_state() is used to put it back into PCI_D0, because in
+that case the device will remain uninitialized after
+pci_set_power_state() has returned. Prevent that from happening by
+modifying pci_raw_set_power_state() to reinitialize devices with
+PCI_PM_CTRL_NO_SOFT_RESET unset during all transitions from D3 to D0.
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/pci.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/pci/pci.c
++++ b/drivers/pci/pci.c
+@@ -479,6 +479,8 @@ pci_raw_set_power_state(struct pci_dev *
+ pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
+ pmcsr |= state;
+ break;
++ case PCI_D3hot:
++ case PCI_D3cold:
+ case PCI_UNKNOWN: /* Boot-up */
+ if ((pmcsr & PCI_PM_CTRL_STATE_MASK) == PCI_D3hot
+ && !(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET)) {
--- /dev/null
+From 69ae59d7d8df14413cf0a97b3e372d7dc8352563 Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jirislaby@gmail.com>
+Date: Mon, 22 Jun 2009 18:42:10 +0100
+Subject: pcmcia/cm4000: fix lock imbalance
+
+From: Jiri Slaby <jirislaby@gmail.com>
+
+commit 69ae59d7d8df14413cf0a97b3e372d7dc8352563 upstream.
+
+Don't return from switch/case, break instead, so that we unlock BKL.
+
+Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
+Signed-off-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/pcmcia/cm4000_cs.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/char/pcmcia/cm4000_cs.c
++++ b/drivers/char/pcmcia/cm4000_cs.c
+@@ -1575,7 +1575,8 @@ static long cmm_ioctl(struct file *filp,
+ clear_bit(LOCK_IO, &dev->flags);
+ wake_up_interruptible(&dev->ioq);
+
+- return 0;
++ rc = 0;
++ break;
+ case CM_IOCSPTS:
+ {
+ struct ptsreq krnptsreq;
--- /dev/null
+From e18e963b7e533149676b5d387d0a56160df9f111 Mon Sep 17 00:00:00 2001
+From: Andrew Vasquez <andrew.vasquez@qlogic.com>
+Date: Wed, 17 Jun 2009 10:30:31 -0700
+Subject: qla2xxx: Correct (again) overflow during dump-processing on large-memory ISP23xx parts.
+
+From: Andrew Vasquez <andrew.vasquez@qlogic.com>
+
+commit e18e963b7e533149676b5d387d0a56160df9f111 upstream.
+
+Commit 7b867cf76fbcc8d77867cbec6f509f71dce8a98f ([SCSI] qla2xxx:
+Refactor qla data structures) inadvertently reverted
+e792121ec85672c1fa48f79d13986a3f4f56c590 ([SCSI] qla2xxx: Correct
+overflow during dump-processing on large-memory ISP23xx parts.).
+
+Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
+Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/qla2xxx/qla_dbg.c
++++ b/drivers/scsi/qla2xxx/qla_dbg.c
+@@ -218,7 +218,7 @@ qla24xx_soft_reset(struct qla_hw_data *h
+
+ static int
+ qla2xxx_dump_ram(struct qla_hw_data *ha, uint32_t addr, uint16_t *ram,
+- uint16_t ram_words, void **nxt)
++ uint32_t ram_words, void **nxt)
+ {
+ int rval;
+ uint32_t cnt, stat, timer, words, idx;
md-raid5-add-missing-call-to-schedule-after-prepare_to_wait.patch
vt_ioctl-fix-lock-imbalance.patch
x86-set-cpu_llc_id-on-amd-cpus.patch
+parport_pc-after-superio-probing-restore-original-register-values.patch
+parport_pc-set-properly-the-dma_mask-for-parport_pc-device.patch
+pci-pm-fix-handling-of-devices-without-pm-support-by-pci_target_state.patch
+pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3.patch
+pcmcia-cm4000-fix-lock-imbalance.patch
+qla2xxx-correct-overflow-during-dump-processing-on-large-memory-isp23xx-parts.patch
+sound-seq_midi_event-fix-decoding-of-rpn-events.patch
--- /dev/null
+From 6423f9ea8035138d70bae1a278d3b57b743f8b3e Mon Sep 17 00:00:00 2001
+From: Clemens Ladisch <clemens@ladisch.de>
+Date: Mon, 22 Jun 2009 10:01:59 +0200
+Subject: sound: seq_midi_event: fix decoding of (N)RPN events
+
+From: Clemens Ladisch <clemens@ladisch.de>
+
+commit 6423f9ea8035138d70bae1a278d3b57b743f8b3e upstream.
+
+When decoding (N)RPN sequencer events into raw MIDI commands, the
+extra_decode_xrpn() function had accidentally swapped the MSB and LSB
+controller values of both the parameter number and the data value.
+
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/core/seq/seq_midi_event.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/sound/core/seq/seq_midi_event.c
++++ b/sound/core/seq/seq_midi_event.c
+@@ -504,10 +504,10 @@ static int extra_decode_xrpn(struct snd_
+ if (dev->nostat && count < 12)
+ return -ENOMEM;
+ cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f);
+- bytes[0] = ev->data.control.param & 0x007f;
+- bytes[1] = (ev->data.control.param & 0x3f80) >> 7;
+- bytes[2] = ev->data.control.value & 0x007f;
+- bytes[3] = (ev->data.control.value & 0x3f80) >> 7;
++ bytes[0] = (ev->data.control.param & 0x3f80) >> 7;
++ bytes[1] = ev->data.control.param & 0x007f;
++ bytes[2] = (ev->data.control.value & 0x3f80) >> 7;
++ bytes[3] = ev->data.control.value & 0x007f;
+ if (cmd != dev->lastcmd && !dev->nostat) {
+ if (count < 9)
+ return -ENOMEM;