]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.27 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 30 Jun 2009 18:04:56 +0000 (11:04 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 30 Jun 2009 18:04:56 +0000 (11:04 -0700)
queue-2.6.27/mm-fix-handling-of-pagesets-for-downed-cpus.patch [new file with mode: 0644]
queue-2.6.27/parport_pc-after-superio-probing-restore-original-register-values.patch [new file with mode: 0644]
queue-2.6.27/parport_pc-set-properly-the-dma_mask-for-parport_pc-device.patch [new file with mode: 0644]
queue-2.6.27/pci-pm-fix-handling-of-devices-without-pm-support-by-pci_target_state.patch [new file with mode: 0644]
queue-2.6.27/pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3.patch [new file with mode: 0644]
queue-2.6.27/pcmcia-cm4000-fix-lock-imbalance.patch [new file with mode: 0644]
queue-2.6.27/series
queue-2.6.27/sound-seq_midi_event-fix-decoding-of-rpn-events.patch [new file with mode: 0644]

diff --git a/queue-2.6.27/mm-fix-handling-of-pagesets-for-downed-cpus.patch b/queue-2.6.27/mm-fix-handling-of-pagesets-for-downed-cpus.patch
new file mode 100644 (file)
index 0000000..e7c8f2b
--- /dev/null
@@ -0,0 +1,62 @@
+From 364df0ebfbbb1330bfc6ca159f4d6020efc15a12 Mon Sep 17 00:00:00 2001
+From: Dimitri Sivanich <sivanich@sgi.com>
+Date: Tue, 23 Jun 2009 12:37:04 -0700
+Subject: mm: fix handling of pagesets for downed cpus
+
+From: Dimitri Sivanich <sivanich@sgi.com>
+
+commit 364df0ebfbbb1330bfc6ca159f4d6020efc15a12 upstream.
+
+After downing/upping a cpu, an attempt to set
+/proc/sys/vm/percpu_pagelist_fraction results in an oops in
+percpu_pagelist_fraction_sysctl_handler().
+
+If a processor is downed then we need to set the pageset pointer back to
+the boot pageset.
+
+Updates of the high water marks should not access pagesets of unpopulated
+zones (those pointer go to the boot pagesets which would be no longer
+functional if their size would be increased beyond zero).
+
+Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
+Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
+Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Cc: Nick Piggin <nickpiggin@yahoo.com.au>
+Cc: Mel Gorman <mel@csn.ul.ie>
+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>
+
+---
+ mm/page_alloc.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -2764,7 +2764,7 @@ bad:
+               if (dzone == zone)
+                       break;
+               kfree(zone_pcp(dzone, cpu));
+-              zone_pcp(dzone, cpu) = NULL;
++              zone_pcp(dzone, cpu) = &boot_pageset[cpu];
+       }
+       return -ENOMEM;
+ }
+@@ -2779,7 +2779,7 @@ static inline void free_zone_pagesets(in
+               /* Free per_cpu_pageset if it is slab allocated */
+               if (pset != &boot_pageset[cpu])
+                       kfree(pset);
+-              zone_pcp(zone, cpu) = NULL;
++              zone_pcp(zone, cpu) = &boot_pageset[cpu];
+       }
+ }
+@@ -4409,6 +4409,8 @@ int percpu_pagelist_fraction_sysctl_hand
+       if (!write || (ret == -EINVAL))
+               return ret;
+       for_each_zone(zone) {
++              if (!populated_zone(zone))
++                      continue;
+               for_each_online_cpu(cpu) {
+                       unsigned long  high;
+                       high = zone->present_pages / percpu_pagelist_fraction;
diff --git a/queue-2.6.27/parport_pc-after-superio-probing-restore-original-register-values.patch b/queue-2.6.27/parport_pc-after-superio-probing-restore-original-register-values.patch
new file mode 100644 (file)
index 0000000..1be032a
--- /dev/null
@@ -0,0 +1,134 @@
+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 */
diff --git a/queue-2.6.27/parport_pc-set-properly-the-dma_mask-for-parport_pc-device.patch b/queue-2.6.27/parport_pc-set-properly-the-dma_mask-for-parport_pc-device.patch
new file mode 100644 (file)
index 0000000..1d3f409
--- /dev/null
@@ -0,0 +1,48 @@
+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);
diff --git a/queue-2.6.27/pci-pm-fix-handling-of-devices-without-pm-support-by-pci_target_state.patch b/queue-2.6.27/pci-pm-fix-handling-of-devices-without-pm-support-by-pci_target_state.patch
new file mode 100644 (file)
index 0000000..44c0376
--- /dev/null
@@ -0,0 +1,48 @@
+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
+@@ -1184,15 +1184,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)))
diff --git a/queue-2.6.27/pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3.patch b/queue-2.6.27/pci-pm-follow-pci_pm_ctrl_no_soft_reset-during-transitions-from-d3.patch
new file mode 100644 (file)
index 0000000..2904ac5
--- /dev/null
@@ -0,0 +1,42 @@
+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
+@@ -473,6 +473,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))
diff --git a/queue-2.6.27/pcmcia-cm4000-fix-lock-imbalance.patch b/queue-2.6.27/pcmcia-cm4000-fix-lock-imbalance.patch
new file mode 100644 (file)
index 0000000..138209c
--- /dev/null
@@ -0,0 +1,32 @@
+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;
index d2cd4c967cf3e3d19f27a8b7383a60d9c7926190..2e9fd557c9ac539d1bd25f0551f93d70464d9e1f 100644 (file)
@@ -19,3 +19,10 @@ lockdep-select-frame-pointers-on-x86.patch
 send_sigio_to_task-sanitize-the-usage-of-fown-signum.patch
 md-raid5-add-missing-call-to-schedule-after-prepare_to_wait.patch
 tcp-advertise-mss-requested-by-user.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
+sound-seq_midi_event-fix-decoding-of-rpn-events.patch
+mm-fix-handling-of-pagesets-for-downed-cpus.patch
diff --git a/queue-2.6.27/sound-seq_midi_event-fix-decoding-of-rpn-events.patch b/queue-2.6.27/sound-seq_midi_event-fix-decoding-of-rpn-events.patch
new file mode 100644 (file)
index 0000000..ea8caec
--- /dev/null
@@ -0,0 +1,38 @@
+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;