]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .27 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 4 Nov 2008 22:16:43 +0000 (14:16 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 4 Nov 2008 22:16:43 +0000 (14:16 -0800)
20 files changed:
queue-2.6.27/acpi-always-report-a-sync-event-after-a-lid-state-change.patch [new file with mode: 0644]
queue-2.6.27/alsa-use-correct-lock-in-snd_ctl_dev_disconnect.patch [new file with mode: 0644]
queue-2.6.27/dvb-s5h1411-bugfix-setting-serial-or-parallel-mode-could-destroy-bits.patch [new file with mode: 0644]
queue-2.6.27/dvb-s5h1411-perform-s5h1411-soft-reset-after-tuning.patch [new file with mode: 0644]
queue-2.6.27/dvb-s5h1411-power-down-s5h1411-when-not-in-use.patch [new file with mode: 0644]
queue-2.6.27/firewire-fix-ioctl-return-code.patch [new file with mode: 0644]
queue-2.6.27/firewire-fix-setting-tag-and-sy-in-iso-transmission.patch [new file with mode: 0644]
queue-2.6.27/firewire-fix-struct-fw_node-memory-leak.patch [new file with mode: 0644]
queue-2.6.27/firewire-fw-sbp2-delay-first-login-to-avoid-retries.patch [new file with mode: 0644]
queue-2.6.27/firewire-fw-sbp2-fix-races.patch [new file with mode: 0644]
queue-2.6.27/firewire-survive-more-than-256-bus-resets.patch [new file with mode: 0644]
queue-2.6.27/i2c-the-i2c-mailing-list-is-moving.patch [new file with mode: 0644]
queue-2.6.27/pci-fix-64-vbit-prefetchable-memory-resource-bars.patch [new file with mode: 0644]
queue-2.6.27/powerpc-don-t-use-a-16g-page-if-beyond-mem-limits.patch [new file with mode: 0644]
queue-2.6.27/powerpc-fix-i2c-on-ppc-linkstation-kurobox-machines.patch [new file with mode: 0644]
queue-2.6.27/powerpc-numa-make-memory-reserve-code-more-robust.patch [new file with mode: 0644]
queue-2.6.27/powerpc-reserve-in-bootmem-lmb-reserved-regions-that-cross-numa-nodes.patch [new file with mode: 0644]
queue-2.6.27/scx200_i2c-add-missing-class-parameter.patch [new file with mode: 0644]
queue-2.6.27/series
queue-2.6.27/v4l-pvrusb2-keep-mpeg-ptss-from-drifting-away.patch [new file with mode: 0644]

diff --git a/queue-2.6.27/acpi-always-report-a-sync-event-after-a-lid-state-change.patch b/queue-2.6.27/acpi-always-report-a-sync-event-after-a-lid-state-change.patch
new file mode 100644 (file)
index 0000000..574326d
--- /dev/null
@@ -0,0 +1,46 @@
+From lenb@kernel.org  Tue Nov  4 13:59:20 2008
+From: Guillem Jover <guillem.jover@nokia.com>
+Date: Tue, 28 Oct 2008 01:34:27 -0400 (EDT)
+Subject: ACPI: Always report a sync event after a lid state change
+To: stable@kernel.org
+Cc: linux-acpi@vger.kernel.org
+Message-ID: <alpine.LFD.2.00.0810280131390.24123@localhost.localdomain>
+
+From: Guillem Jover <guillem.jover@nokia.com>
+
+upstream commit df316e939100e789b3c5d4d102619ccf5834bd00
+
+Currently not always an EV_SYN event is reported to userland
+after the EV_SW SW_LID event has been sent. This is easy to verify
+by using “input-events” from input-utils and just closing and opening
+the lid.
+
+Signed-off-by: Guillem Jover <guillem.jover@nokia.com>
+Acked-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/button.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/acpi/button.c
++++ b/drivers/acpi/button.c
+@@ -262,6 +262,7 @@ static int acpi_lid_send_state(struct ac
+               return -ENODEV;
+       /* input layer checks if event is redundant */
+       input_report_switch(button->input, SW_LID, !state);
++      input_sync(button->input);
+       return 0;
+ }
+@@ -285,8 +286,8 @@ static void acpi_button_notify(acpi_hand
+                       input_report_key(input, keycode, 1);
+                       input_sync(input);
+                       input_report_key(input, keycode, 0);
++                      input_sync(input);
+               }
+-              input_sync(input);
+               acpi_bus_generate_proc_event(button->device, event,
+                                       ++button->pushed);
diff --git a/queue-2.6.27/alsa-use-correct-lock-in-snd_ctl_dev_disconnect.patch b/queue-2.6.27/alsa-use-correct-lock-in-snd_ctl_dev_disconnect.patch
new file mode 100644 (file)
index 0000000..845b291
--- /dev/null
@@ -0,0 +1,40 @@
+From d8009882e9f5e1a76986c741f071edd2ad760c97 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sun, 7 Sep 2008 12:51:13 +0200
+Subject: ALSA: use correct lock in snd_ctl_dev_disconnect()
+Message-ID: <20081031164425.GA10625@puku.stupidest.org>
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit d8009882e9f5e1a76986c741f071edd2ad760c97 upstream
+
+The lock used in snd_ctl_dev_disconnect() should be card->ctl_files_rwlock
+for protection of card->ctl_files entries, instead of card->controls_rwsem.
+
+Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+Cc: Chris Wedgwood <cw@f00f.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/core/control.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/core/control.c
++++ b/sound/core/control.c
+@@ -1427,12 +1427,12 @@ static int snd_ctl_dev_disconnect(struct
+       cardnum = card->number;
+       snd_assert(cardnum >= 0 && cardnum < SNDRV_CARDS, return -ENXIO);
+-      down_read(&card->controls_rwsem);
++      read_lock(&card->ctl_files_rwlock);
+       list_for_each_entry(ctl, &card->ctl_files, list) {
+               wake_up(&ctl->change_sleep);
+               kill_fasync(&ctl->fasync, SIGIO, POLL_ERR);
+       }
+-      up_read(&card->controls_rwsem);
++      read_unlock(&card->ctl_files_rwlock);
+       if ((err = snd_unregister_device(SNDRV_DEVICE_TYPE_CONTROL,
+                                        card, -1)) < 0)
diff --git a/queue-2.6.27/dvb-s5h1411-bugfix-setting-serial-or-parallel-mode-could-destroy-bits.patch b/queue-2.6.27/dvb-s5h1411-bugfix-setting-serial-or-parallel-mode-could-destroy-bits.patch
new file mode 100644 (file)
index 0000000..b97a0fe
--- /dev/null
@@ -0,0 +1,61 @@
+From mkrufky@linuxtv.org  Tue Nov  4 14:13:20 2008
+From: Steven Toth <stoth@linuxtv.org>
+Date: Sun, 02 Nov 2008 23:04:44 -0500
+Subject: DVB: s5h1411: bugfix: Setting serial or parallel mode could destroy bits
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Steven Toth <stoth@linuxtv.org>, Mauro Carvalho Chehab <mchehab@redhat.com>
+Message-ID: <490E785C.6080105@linuxtv.org>
+
+From: Steven Toth <stoth@linuxtv.org>
+
+cherry picked from commit 1af46b450fa49c57d73764d66f267335ccd807e2
+
+DVB: s5h1411: bugfix: Setting serial or parallel mode could destroy bits
+
+Adding a serialmode function to read/and/or/write the register for safety.
+
+Signed-off-by: Steven Toth <stoth@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/dvb/frontends/s5h1411.c |   18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/dvb/frontends/s5h1411.c
++++ b/drivers/media/dvb/frontends/s5h1411.c
+@@ -471,6 +471,20 @@ static int s5h1411_set_spectralinversion
+       return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x24, val);
+ }
++static int s5h1411_set_serialmode(struct dvb_frontend *fe, int serial)
++{
++      struct s5h1411_state *state = fe->demodulator_priv;
++      u16 val;
++
++      dprintk("%s(%d)\n", __func__, serial);
++      val = s5h1411_readreg(state, S5H1411_I2C_TOP_ADDR, 0xbd) & ~0x100;
++
++      if (serial == 1)
++              val |= 0x100;
++
++      return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, val);
++}
++
+ static int s5h1411_enable_modulation(struct dvb_frontend *fe,
+                                    fe_modulation_t m)
+ {
+@@ -612,10 +626,10 @@ static int s5h1411_init(struct dvb_front
+       if (state->config->output_mode == S5H1411_SERIAL_OUTPUT)
+               /* Serial */
+-              s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, 0x1101);
++              s5h1411_set_serialmode(fe, 1);
+       else
+               /* Parallel */
+-              s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xbd, 0x1001);
++              s5h1411_set_serialmode(fe, 0);
+       s5h1411_set_spectralinversion(fe, state->config->inversion);
+       s5h1411_set_if_freq(fe, state->config->vsb_if);
diff --git a/queue-2.6.27/dvb-s5h1411-perform-s5h1411-soft-reset-after-tuning.patch b/queue-2.6.27/dvb-s5h1411-perform-s5h1411-soft-reset-after-tuning.patch
new file mode 100644 (file)
index 0000000..4ac5829
--- /dev/null
@@ -0,0 +1,53 @@
+From mkrufky@linuxtv.org  Tue Nov  4 14:13:46 2008
+From: Devin Heitmueller <devin.heitmueller@gmail.com>
+Date: Sun, 02 Nov 2008 23:04:47 -0500
+Subject: DVB: s5h1411: Perform s5h1411 soft reset after tuning
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Steven Toth <stoth@linuxtv.org>, Devin Heitmueller <devin.heitmueller@gmail.com>, Mauro Carvalho Chehab <mchehab@redhat.com>
+Message-ID: <490E785F.1080606@linuxtv.org>
+
+
+From: Devin Heitmueller <devin.heitmueller@gmail.com>
+
+cherry picked from commit f0d041e50bc6c8a677922d72b010f80af9b23b18
+
+DVB: s5h1411: Perform s5h1411 soft reset after tuning
+
+If you instruct the tuner to change frequencies, it can take up to 2500ms to
+get a demod lock.  By performing a soft reset after the tuning call (which
+is consistent with how the Pinnacle 801e Windows driver behaves), you get
+a demod lock inside of 300ms
+
+Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Acked-by: Steven Toth <stoth@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/dvb/frontends/s5h1411.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/media/dvb/frontends/s5h1411.c
++++ b/drivers/media/dvb/frontends/s5h1411.c
+@@ -588,9 +588,6 @@ static int s5h1411_set_frontend(struct d
+       s5h1411_enable_modulation(fe, p->u.vsb.modulation);
+-      /* Allow the demod to settle */
+-      msleep(100);
+-
+       if (fe->ops.tuner_ops.set_params) {
+               if (fe->ops.i2c_gate_ctrl)
+                       fe->ops.i2c_gate_ctrl(fe, 1);
+@@ -601,6 +598,10 @@ static int s5h1411_set_frontend(struct d
+                       fe->ops.i2c_gate_ctrl(fe, 0);
+       }
++      /* Issue a reset to the demod so it knows to resync against the
++         newly tuned frequency */
++      s5h1411_softreset(fe);
++
+       return 0;
+ }
diff --git a/queue-2.6.27/dvb-s5h1411-power-down-s5h1411-when-not-in-use.patch b/queue-2.6.27/dvb-s5h1411-power-down-s5h1411-when-not-in-use.patch
new file mode 100644 (file)
index 0000000..e51e836
--- /dev/null
@@ -0,0 +1,69 @@
+From mkrufky@linuxtv.org  Tue Nov  4 14:14:09 2008
+From: Devin Heitmueller <devin.heitmueller@gmail.com>
+Date: Sun, 02 Nov 2008 23:04:50 -0500
+Subject: DVB: s5h1411: Power down s5h1411 when not in use
+To: stable@kernel.org
+Cc: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Steven Toth <stoth@linuxtv.org>, Devin Heitmueller <devin.heitmueller@gmail.com>, Mauro Carvalho Chehab <mchehab@redhat.com>
+Message-ID: <490E7862.2080109@linuxtv.org>
+
+
+From: Devin Heitmueller <devin.heitmueller@gmail.com>
+
+cherry picked from commit 11fc9a4a440112b5afc1a99d86ba92d70205a688
+
+DVB: s5h1411: Power down s5h1411 when not in use
+
+Power down the s5h1411 demodulator when not in use
+(on the Pinnacle 801e, this brings idle power from
+123ma down to 84ma).
+
+Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
+Acked-by: Steven Toth <stoth@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/dvb/frontends/s5h1411.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/dvb/frontends/s5h1411.c
++++ b/drivers/media/dvb/frontends/s5h1411.c
+@@ -549,7 +549,7 @@ static int s5h1411_set_gpio(struct dvb_f
+               return s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0xe0, val);
+ }
+-static int s5h1411_sleep(struct dvb_frontend *fe, int enable)
++static int s5h1411_set_powerstate(struct dvb_frontend *fe, int enable)
+ {
+       struct s5h1411_state *state = fe->demodulator_priv;
+@@ -565,6 +565,11 @@ static int s5h1411_sleep(struct dvb_fron
+       return 0;
+ }
++static int s5h1411_sleep(struct dvb_frontend *fe)
++{
++      return s5h1411_set_powerstate(fe, 1);
++}
++
+ static int s5h1411_register_reset(struct dvb_frontend *fe)
+ {
+       struct s5h1411_state *state = fe->demodulator_priv;
+@@ -614,7 +619,7 @@ static int s5h1411_init(struct dvb_front
+       dprintk("%s()\n", __func__);
+-      s5h1411_sleep(fe, 0);
++      s5h1411_set_powerstate(fe, 0);
+       s5h1411_register_reset(fe);
+       for (i = 0; i < ARRAY_SIZE(init_tab); i++)
+@@ -878,6 +883,7 @@ static struct dvb_frontend_ops s5h1411_o
+       },
+       .init                 = s5h1411_init,
++      .sleep                = s5h1411_sleep,
+       .i2c_gate_ctrl        = s5h1411_i2c_gate_ctrl,
+       .set_frontend         = s5h1411_set_frontend,
+       .get_frontend         = s5h1411_get_frontend,
diff --git a/queue-2.6.27/firewire-fix-ioctl-return-code.patch b/queue-2.6.27/firewire-fix-ioctl-return-code.patch
new file mode 100644 (file)
index 0000000..b33c540
--- /dev/null
@@ -0,0 +1,37 @@
+From stefanr@s5r6.in-berlin.de  Tue Nov  4 13:55:39 2008
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Date: Mon, 27 Oct 2008 23:26:35 +0100 (CET)
+Subject: firewire: fix ioctl() return code
+To: stable@kernel.org
+Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
+Message-ID: <tkrat.509dbd5216c80cfd@s5r6.in-berlin.de>
+Content-Disposition: INLINE
+
+
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+
+commit 99692f71ee04c6f249d0bf6a581359f32f409a38 upstream
+
+Reported by Jay Fenlason:  ioctl() did not return as intended
+  - the size of data read into ioctl_send_request,
+  - the number of datagrams enqueued by ioctl_queue_iso.
+
+
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/firewire/fw-cdev.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/firewire/fw-cdev.c
++++ b/drivers/firewire/fw-cdev.c
+@@ -913,7 +913,7 @@ dispatch_ioctl(struct client *client, un
+                       return -EFAULT;
+       }
+-      return 0;
++      return retval;
+ }
+ static long
diff --git a/queue-2.6.27/firewire-fix-setting-tag-and-sy-in-iso-transmission.patch b/queue-2.6.27/firewire-fix-setting-tag-and-sy-in-iso-transmission.patch
new file mode 100644 (file)
index 0000000..a8008f3
--- /dev/null
@@ -0,0 +1,36 @@
+From stefanr@s5r6.in-berlin.de  Tue Nov  4 13:54:50 2008
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Date: Mon, 27 Oct 2008 23:26:00 +0100 (CET)
+Subject: firewire: fix setting tag and sy in iso transmission
+To: stable@kernel.org
+Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
+Message-ID: <tkrat.c6c9e197bd5d3af2@s5r6.in-berlin.de>
+Content-Disposition: INLINE
+
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+
+commit 7a1003449c693f0d57443c8786bbf19717921ae0 upstream
+
+Reported by Jay Fenlason:
+The iso packet control accessors in fw-cdev.c had bogus masks.
+
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/firewire/fw-cdev.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/firewire/fw-cdev.c
++++ b/drivers/firewire/fw-cdev.c
+@@ -720,8 +720,8 @@ static int ioctl_create_iso_context(stru
+ #define GET_PAYLOAD_LENGTH(v) ((v) & 0xffff)
+ #define GET_INTERRUPT(v)      (((v) >> 16) & 0x01)
+ #define GET_SKIP(v)           (((v) >> 17) & 0x01)
+-#define GET_TAG(v)            (((v) >> 18) & 0x02)
+-#define GET_SY(v)             (((v) >> 20) & 0x04)
++#define GET_TAG(v)            (((v) >> 18) & 0x03)
++#define GET_SY(v)             (((v) >> 20) & 0x0f)
+ #define GET_HEADER_LENGTH(v)  (((v) >> 24) & 0xff)
+ static int ioctl_queue_iso(struct client *client, void *buffer)
diff --git a/queue-2.6.27/firewire-fix-struct-fw_node-memory-leak.patch b/queue-2.6.27/firewire-fix-struct-fw_node-memory-leak.patch
new file mode 100644 (file)
index 0000000..fbd83a6
--- /dev/null
@@ -0,0 +1,46 @@
+From stefanr@s5r6.in-berlin.de  Tue Nov  4 13:57:03 2008
+From: Jay Fenlason <fenlason@redhat.com>
+Date: Mon, 27 Oct 2008 23:28:14 +0100 (CET)
+Subject: firewire: fix struct fw_node memory leak
+To: stable@kernel.org
+Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
+Message-ID: <tkrat.e499a05eaa0ec529@s5r6.in-berlin.de>
+Content-Disposition: INLINE
+
+From: Jay Fenlason <fenlason@redhat.com>
+
+commit 77e557191701afa55ae7320d42ad6458a2ad292e upstream
+
+With the bus_resets patch applied, it is easy to see this memory leak
+by repeatedly resetting the firewire bus while running slabtop in
+another window.  Just watch kmalloc-32 grow and grow...
+
+Signed-off-by: Jay Fenlason <fenlason@redhat.com>
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+
+---
+ drivers/firewire/fw-topology.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/firewire/fw-topology.c
++++ b/drivers/firewire/fw-topology.c
+@@ -413,7 +413,7 @@ static void
+ update_tree(struct fw_card *card, struct fw_node *root)
+ {
+       struct list_head list0, list1;
+-      struct fw_node *node0, *node1;
++      struct fw_node *node0, *node1, *next1;
+       int i, event;
+       INIT_LIST_HEAD(&list0);
+@@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct
+               }
+               node0 = fw_node(node0->link.next);
+-              node1 = fw_node(node1->link.next);
++              next1 = fw_node(node1->link.next);
++              fw_node_put(node1);
++              node1 = next1;
+       }
+ }
diff --git a/queue-2.6.27/firewire-fw-sbp2-delay-first-login-to-avoid-retries.patch b/queue-2.6.27/firewire-fw-sbp2-delay-first-login-to-avoid-retries.patch
new file mode 100644 (file)
index 0000000..b9bc8fc
--- /dev/null
@@ -0,0 +1,50 @@
+From stefanr@s5r6.in-berlin.de  Tue Nov  4 13:57:36 2008
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Date: Mon, 27 Oct 2008 23:29:00 +0100 (CET)
+Subject: firewire: fw-sbp2: delay first login to avoid retries
+To: stable@kernel.org
+Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
+Message-ID: <tkrat.9bc21c3b6a97bebe@s5r6.in-berlin.de>
+Content-Disposition: INLINE
+
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+
+commit 0dcfeb7e3c8695c5aa3677dda8efb9bef2e7e64d upstream
+
+This optimizes firewire-sbp2's device probe for the case that the local
+node and the SBP-2 node were discovered at the same time.  In this case,
+fw-core's bus management work and fw-sbp2's login and SCSI probe work
+are scheduled in parallel (in the globally shared workqueue and in
+fw-sbp2's workqueue, respectively).  The bus reset from fw-core may then
+disturb and extremely delay the login and SCSI probe because the latter
+fails with several command timeouts and retries and has to be retried
+from scratch.
+
+We avoid this particular situation of sbp2_login() and fw_card_bm_work()
+running in parallel by delaying the first sbp2_login() a little bit.
+
+This is meant to be a short-term fix for
+https://bugzilla.redhat.com/show_bug.cgi?id=466679.  In the long run,
+the SCSI probe, i.e. fw-sbp2's call of __scsi_add_device(), should be
+parallelized with sbp2_reconnect().
+
+Problem reported and fix tested and confirmed by Alex Kanavin.
+
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/firewire/fw-sbp2.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/firewire/fw-sbp2.c
++++ b/drivers/firewire/fw-sbp2.c
+@@ -1158,7 +1158,7 @@ static int sbp2_probe(struct device *dev
+       /* Do the login in a workqueue so we can easily reschedule retries. */
+       list_for_each_entry(lu, &tgt->lu_list, link)
+-              sbp2_queue_work(lu, 0);
++              sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5));
+       return 0;
+  fail_tgt_put:
diff --git a/queue-2.6.27/firewire-fw-sbp2-fix-races.patch b/queue-2.6.27/firewire-fw-sbp2-fix-races.patch
new file mode 100644 (file)
index 0000000..19e150c
--- /dev/null
@@ -0,0 +1,104 @@
+From stefanr@s5r6.in-berlin.de  Tue Nov  4 13:58:11 2008
+From: Jay Fenlason <fenlason@redhat.com>
+Date: Mon, 27 Oct 2008 23:29:32 +0100 (CET)
+Subject: firewire: fw-sbp2: fix races
+To: stable@kernel.org
+Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
+Message-ID: <tkrat.84265bc39337ceb3@s5r6.in-berlin.de>
+
+From: Jay Fenlason <fenlason@redhat.com>
+
+Same as commit cd1f70fdb4823c97328a1f151f328eb36fafd579 upstream
+
+1: There is a small race between queue_delayed_work() and its
+   corresponding kref_get().  Do the kref_get first, and _put it again
+   if the queue_delayed_work() failed, so there is no chance of the
+   kref going to zero while the work is scheduled.
+2: An SBP2_LOGOUT_REQUEST could be sent out with a login_id full of
+   garbage.  Initialize it to an invalid value so we can tell if we
+   ever got a valid login_id.
+3: The node ID and generation may have changed but the new values may
+   not yet have been recorded in lu and tgt when the final logout is
+   attempted.  Use the latest values from the device in
+   sbp2_release_target().
+
+Signed-off-by: Jay Fenlason <fenlason@redhat.com>
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/firewire/fw-sbp2.c |   36 ++++++++++++++++++++++++++----------
+ 1 file changed, 26 insertions(+), 10 deletions(-)
+
+--- a/drivers/firewire/fw-sbp2.c
++++ b/drivers/firewire/fw-sbp2.c
+@@ -172,6 +172,9 @@ struct sbp2_target {
+       int blocked;    /* ditto */
+ };
++/* Impossible login_id, to detect logout attempt before successful login */
++#define INVALID_LOGIN_ID 0x10000
++
+ /*
+  * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be
+  * provided in the config rom. Most devices do provide a value, which
+@@ -791,9 +794,20 @@ static void sbp2_release_target(struct k
+                       scsi_remove_device(sdev);
+                       scsi_device_put(sdev);
+               }
+-              sbp2_send_management_orb(lu, tgt->node_id, lu->generation,
+-                              SBP2_LOGOUT_REQUEST, lu->login_id, NULL);
+-
++              if (lu->login_id != INVALID_LOGIN_ID) {
++                      int generation, node_id;
++                      /*
++                       * tgt->node_id may be obsolete here if we failed
++                       * during initial login or after a bus reset where
++                       * the topology changed.
++                       */
++                      generation = device->generation;
++                      smp_rmb(); /* node_id vs. generation */
++                      node_id    = device->node_id;
++                      sbp2_send_management_orb(lu, node_id, generation,
++                                               SBP2_LOGOUT_REQUEST,
++                                               lu->login_id, NULL);
++              }
+               fw_core_remove_address_handler(&lu->address_handler);
+               list_del(&lu->link);
+               kfree(lu);
+@@ -808,19 +822,20 @@ static void sbp2_release_target(struct k
+ static struct workqueue_struct *sbp2_wq;
++static void sbp2_target_put(struct sbp2_target *tgt)
++{
++      kref_put(&tgt->kref, sbp2_release_target);
++}
++
+ /*
+  * Always get the target's kref when scheduling work on one its units.
+  * Each workqueue job is responsible to call sbp2_target_put() upon return.
+  */
+ static void sbp2_queue_work(struct sbp2_logical_unit *lu, unsigned long delay)
+ {
+-      if (queue_delayed_work(sbp2_wq, &lu->work, delay))
+-              kref_get(&lu->tgt->kref);
+-}
+-
+-static void sbp2_target_put(struct sbp2_target *tgt)
+-{
+-      kref_put(&tgt->kref, sbp2_release_target);
++      kref_get(&lu->tgt->kref);
++      if (!queue_delayed_work(sbp2_wq, &lu->work, delay))
++              sbp2_target_put(lu->tgt);
+ }
+ static void
+@@ -993,6 +1008,7 @@ static int sbp2_add_logical_unit(struct 
+       lu->tgt      = tgt;
+       lu->lun      = lun_entry & 0xffff;
++      lu->login_id = INVALID_LOGIN_ID;
+       lu->retries  = 0;
+       lu->has_sdev = false;
+       lu->blocked  = false;
diff --git a/queue-2.6.27/firewire-survive-more-than-256-bus-resets.patch b/queue-2.6.27/firewire-survive-more-than-256-bus-resets.patch
new file mode 100644 (file)
index 0000000..7044c9c
--- /dev/null
@@ -0,0 +1,41 @@
+From stefanr@s5r6.in-berlin.de  Tue Nov  4 13:56:10 2008
+From: Jay Fenlason <fenlason@redhat.com>
+Date: Mon, 27 Oct 2008 23:27:37 +0100 (CET)
+Subject: firewire: Survive more than 256 bus resets
+To: stable@kernel.org
+Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
+Message-ID: <tkrat.6faab57f3da8f9b9@s5r6.in-berlin.de>
+Content-Disposition: INLINE
+
+From: Jay Fenlason <fenlason@redhat.com>
+
+Same as commit 4f9740d4f5a17fa6a1b097fa3ccdfb7246660307 upstream
+
+The "color" is used during the topology building after a bus reset,
+hovever in "struct fw_node"s it is stored in a u8, but in struct fw_card
+it is stored in an int.  When the value wraps in one struct, but not
+the other, disaster strikes.
+
+Fixes http://bugzilla.kernel.org/show_bug.cgi?id=10922 -
+machine locks up solid if a series of bus resets occurs.
+
+
+Signed-off-by: Jay Fenlason <fenlason@redhat.com>
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/firewire/fw-transaction.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/firewire/fw-transaction.h
++++ b/drivers/firewire/fw-transaction.h
+@@ -248,7 +248,7 @@ struct fw_card {
+       struct fw_node *local_node;
+       struct fw_node *root_node;
+       struct fw_node *irm_node;
+-      int color;
++      u8 color; /* must be u8 to match the definition in struct fw_node */
+       int gap_count;
+       bool beta_repeaters_present;
diff --git a/queue-2.6.27/i2c-the-i2c-mailing-list-is-moving.patch b/queue-2.6.27/i2c-the-i2c-mailing-list-is-moving.patch
new file mode 100644 (file)
index 0000000..b3508e8
--- /dev/null
@@ -0,0 +1,126 @@
+From khali@linux-fr.org  Tue Nov  4 14:07:59 2008
+From: Jean Delvare <khali@linux-fr.org>
+Date: Fri, 31 Oct 2008 09:21:46 +0100
+Subject: [stable] [PATCH] i2c: The i2c mailing list is moving
+To: stable@kernel.org
+Message-ID: <20081031092146.33db7367@hyperion.delvare>
+
+From: Jean Delvare <khali@linux-fr.org>
+
+commit 846557d3ceb6c7493e090921db5d6158ec237228 upstream
+
+Replace all references to the old i2c mailing list.
+
+This isn't a bug fix, but I would hate to miss bug reports because
+they're sent to a dead mailing list.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/i2c/busses/i2c-sis96x |    2 +-
+ MAINTAINERS                         |   20 ++++++++++----------
+ 2 files changed, 11 insertions(+), 11 deletions(-)
+
+--- a/Documentation/i2c/busses/i2c-sis96x
++++ b/Documentation/i2c/busses/i2c-sis96x
+@@ -42,7 +42,7 @@ I suspect that this driver could be made
+ chipsets as well: 635, and 635T. If anyone owns a board with those chips
+ AND is willing to risk crashing & burning an otherwise well-behaved kernel
+ in the name of progress... please contact me at <mhoffman@lightlink.com> or
+-via the project's mailing list: <i2c@lm-sensors.org>.  Please send bug
++via the linux-i2c mailing list: <linux-i2c@vger.kernel.org>.  Please send bug
+ reports and/or success stories as well.
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -360,7 +360,7 @@ S: Maintained
+ ALI1563 I2C DRIVER
+ P:    Rudolf Marek
+ M:    r.marek@assembler.cz
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ S:    Maintained
+ ALPHA PORT
+@@ -1681,7 +1681,7 @@ FREESCALE I2C CPM DRIVER
+ P:    Jochen Friedrich
+ M:    jochen@scram.de
+ L:    linuxppc-dev@ozlabs.org
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ S:    Maintained
+ FREESCALE SOC FS_ENET DRIVER
+@@ -1982,7 +1982,7 @@ S:       Maintained
+ I2C/SMBUS STUB DRIVER
+ P:    Mark M. Hoffman
+ M:    mhoffman@lightlink.com
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ S:    Maintained
+ I2C SUBSYSTEM
+@@ -1990,14 +1990,14 @@ P:     Jean Delvare (PC drivers, core)
+ M:    khali@linux-fr.org
+ P:    Ben Dooks (embedded platforms)
+ M:    ben-linux@fluff.org
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ T:    quilt http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/
+ S:    Maintained
+ I2C-TINY-USB DRIVER
+ P:    Till Harbaum
+ M:    till@harbaum.org
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ T:    http://www.harbaum.org/till/i2c_tiny_usb
+ S:    Maintained
+@@ -3070,7 +3070,7 @@ S:       Maintained
+ OPENCORES I2C BUS DRIVER
+ P:    Peter Korsgaard
+ M:    jacmet@sunsite.dk
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ S:    Maintained
+ ORACLE CLUSTER FILESYSTEM 2 (OCFS2)
+@@ -3144,7 +3144,7 @@ S:       Maintained
+ PA SEMI SMBUS DRIVER
+ P:    Olof Johansson
+ M:    olof@lixom.net
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ S:    Maintained
+ PARALLEL PORT SUPPORT
+@@ -3280,7 +3280,7 @@ S:       Maintained
+ PNXxxxx I2C DRIVER
+ P:    Vitaly Wool
+ M:    vitalywool@gmail.com
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ S:    Maintained
+ PPP PROTOCOL DRIVERS AND COMPRESSORS
+@@ -3725,7 +3725,7 @@ S:       Maintained
+ SIS 96X I2C/SMBUS DRIVER
+ P:    Mark M. Hoffman
+ M:    mhoffman@lightlink.com
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ S:    Maintained
+ SIS FRAMEBUFFER DRIVER
+@@ -4445,7 +4445,7 @@ S:       Maintained
+ VIAPRO SMBUS DRIVER
+ P:    Jean Delvare
+ M:    khali@linux-fr.org
+-L:    i2c@lm-sensors.org
++L:    linux-i2c@vger.kernel.org
+ S:    Maintained
+ VIA VELOCITY NETWORK DRIVER
diff --git a/queue-2.6.27/pci-fix-64-vbit-prefetchable-memory-resource-bars.patch b/queue-2.6.27/pci-fix-64-vbit-prefetchable-memory-resource-bars.patch
new file mode 100644 (file)
index 0000000..915f2b4
--- /dev/null
@@ -0,0 +1,40 @@
+From e354597cce8d219d135d65e585dc4f30323486b9 Mon Sep 17 00:00:00 2001
+From: Peter Chubb <peterc@gelato.unsw.edu.au>
+Date: Mon, 13 Oct 2008 11:49:04 +1100
+Subject: PCI: fix 64-vbit prefetchable memory resource BARs
+
+From: Peter Chubb <peterc@gelato.unsw.edu.au>
+
+commit e354597cce8d219d135d65e585dc4f30323486b9 upstream.
+
+Since patch 6ac665c63dcac8fcec534a1d224ecbb8b867ad59 my infiniband
+controller hasn't worked.  This is because it has 64-bit prefetchable
+memory, which was mistakenly being  taken to be 32-bit memory.  The
+resource flags in this case are PCI_BASE_ADDRESS_MEM_TYPE_64 |
+PCI_BASE_ADDRESS_MEM_PREFETCH.
+
+This patch checks only for the PCI_BASE_ADDRESS_MEM_TYPE_64 bit; thus
+whether the region is prefetchable or not is ignored.  This fixes my
+Infiniband.
+
+Reviewed-by: Matthew Wilcox <matthew@wil.cx>
+Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
+Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/probe.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/pci/probe.c
++++ b/drivers/pci/probe.c
+@@ -219,7 +219,7 @@ static inline enum pci_bar_type decode_b
+       res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK;
+-      if (res->flags == PCI_BASE_ADDRESS_MEM_TYPE_64)
++      if (res->flags & PCI_BASE_ADDRESS_MEM_TYPE_64)
+               return pci_bar_mem64;
+       return pci_bar_mem32;
+ }
diff --git a/queue-2.6.27/powerpc-don-t-use-a-16g-page-if-beyond-mem-limits.patch b/queue-2.6.27/powerpc-don-t-use-a-16g-page-if-beyond-mem-limits.patch
new file mode 100644 (file)
index 0000000..be27827
--- /dev/null
@@ -0,0 +1,36 @@
+From 4792adbac9eb41cea77a45ab76258ea10d411173 Mon Sep 17 00:00:00 2001
+From: Jon Tollefson <kniht@us.ibm.com>
+Date: Tue, 21 Oct 2008 15:27:36 +0000
+Subject: powerpc: Don't use a 16G page if beyond mem= limits
+
+From: Jon Tollefson <kniht@us.ibm.com>
+
+commit 4792adbac9eb41cea77a45ab76258ea10d411173 upstream
+
+If mem= is used on the boot command line to limit memory then the memory block where a 16G page resides may not be available.
+
+Thanks to Michael Ellerman for finding the problem.
+
+Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/mm/hash_utils_64.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/arch/powerpc/mm/hash_utils_64.c
++++ b/arch/powerpc/mm/hash_utils_64.c
+@@ -381,8 +381,10 @@ static int __init htab_dt_scan_hugepage_
+       printk(KERN_INFO "Huge page(16GB) memory: "
+                       "addr = 0x%lX size = 0x%lX pages = %d\n",
+                       phys_addr, block_size, expected_pages);
+-      lmb_reserve(phys_addr, block_size * expected_pages);
+-      add_gpage(phys_addr, block_size, expected_pages);
++      if (phys_addr + (16 * GB) <= lmb_end_of_DRAM()) {
++              lmb_reserve(phys_addr, block_size * expected_pages);
++              add_gpage(phys_addr, block_size, expected_pages);
++      }
+       return 0;
+ }
diff --git a/queue-2.6.27/powerpc-fix-i2c-on-ppc-linkstation-kurobox-machines.patch b/queue-2.6.27/powerpc-fix-i2c-on-ppc-linkstation-kurobox-machines.patch
new file mode 100644 (file)
index 0000000..1e1331e
--- /dev/null
@@ -0,0 +1,83 @@
+From 22e181ba7f09197dd6f35a48013cb86289644eb6 Mon Sep 17 00:00:00 2001
+From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+Date: Fri, 24 Oct 2008 01:05:56 +0200
+Subject: powerpc: fix i2c on PPC linkstation / kurobox machines
+Message-ID: <Pine.LNX.4.64.0810281526470.7705@axis700.grange>
+
+From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+
+commit 22e181ba7f09197dd6f35a48013cb86289644eb6 upstream.
+
+The i2c bus defn is broken on linkstation / kurobox machines since at
+least 2.6.27. Fix it. Also remove CONFIG_SERIAL_OF_PLATFORM, which, if
+enabled, breaks the serial console after the
+"console handover: boot [udbg0] -> real [ttyS1]" message.
+
+Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/configs/linkstation_defconfig       |    7 +++----
+ arch/powerpc/platforms/embedded6xx/linkstation.c |   14 ++++++++++++++
+ 2 files changed, 17 insertions(+), 4 deletions(-)
+
+--- a/arch/powerpc/configs/linkstation_defconfig
++++ b/arch/powerpc/configs/linkstation_defconfig
+@@ -1,7 +1,7 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.27-rc4
+-# Thu Aug 21 00:52:05 2008
++# Linux kernel version: 2.6.27
++# Fri Oct 24 00:42:39 2008
+ #
+ # CONFIG_PPC64 is not set
+@@ -934,7 +934,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+ CONFIG_SERIAL_CORE=y
+ CONFIG_SERIAL_CORE_CONSOLE=y
+ # CONFIG_SERIAL_JSM is not set
+-CONFIG_SERIAL_OF_PLATFORM=y
++# CONFIG_SERIAL_OF_PLATFORM is not set
+ CONFIG_UNIX98_PTYS=y
+ CONFIG_LEGACY_PTYS=y
+ CONFIG_LEGACY_PTY_COUNT=256
+@@ -1211,7 +1211,6 @@ CONFIG_USB_STORAGE=m
+ # CONFIG_USB_STORAGE_ALAUDA is not set
+ # CONFIG_USB_STORAGE_ONETOUCH is not set
+ # CONFIG_USB_STORAGE_KARMA is not set
+-# CONFIG_USB_STORAGE_SIERRA is not set
+ # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+ # CONFIG_USB_LIBUSUAL is not set
+--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
++++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
+@@ -13,6 +13,7 @@
+ #include <linux/kernel.h>
+ #include <linux/initrd.h>
+ #include <linux/mtd/physmap.h>
++#include <linux/of_platform.h>
+ #include <asm/time.h>
+ #include <asm/prom.h>
+@@ -54,6 +55,19 @@ static struct mtd_partition linkstation_
+       },
+ };
++static __initdata struct of_device_id of_bus_ids[] = {
++      { .type = "soc", },
++      { .compatible = "simple-bus", },
++      {},
++};
++
++static int __init declare_of_platform_devices(void)
++{
++      of_platform_bus_probe(NULL, of_bus_ids, NULL);
++      return 0;
++}
++machine_device_initcall(linkstation, declare_of_platform_devices);
++
+ static int __init linkstation_add_bridge(struct device_node *dev)
+ {
+ #ifdef CONFIG_PCI
diff --git a/queue-2.6.27/powerpc-numa-make-memory-reserve-code-more-robust.patch b/queue-2.6.27/powerpc-numa-make-memory-reserve-code-more-robust.patch
new file mode 100644 (file)
index 0000000..f6703f7
--- /dev/null
@@ -0,0 +1,74 @@
+From e81703724a966120ace6504c993bda9e084cbf3e Mon Sep 17 00:00:00 2001
+From: Jon Tollefson <kniht@us.ibm.com>
+Date: Thu, 16 Oct 2008 18:59:43 +0000
+Subject: powerpc/numa: Make memory reserve code more robust
+
+From: Jon Tollefson <kniht@us.ibm.com>
+
+commit e81703724a966120ace6504c993bda9e084cbf3e upstream.
+
+Adjust amount to reserve based on previous nodes for reserves spanning
+multiple nodes. Check if the node active range is empty before attempting
+to pass the reserve to bootmem.  In practice the range shouldn't be empty,
+but to be sure we check.
+
+Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/mm/numa.c |   15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/arch/powerpc/mm/numa.c
++++ b/arch/powerpc/mm/numa.c
+@@ -116,6 +116,7 @@ static int __init get_active_region_work
+ /*
+  * get_node_active_region - Return active region containing start_pfn
++ * Active range returned is empty if none found.
+  * @start_pfn: The page to return the region for.
+  * @node_ar: Returned set to the active region containing start_pfn
+  */
+@@ -126,6 +127,7 @@ static void __init get_node_active_regio
+       node_ar->nid = nid;
+       node_ar->start_pfn = start_pfn;
++      node_ar->end_pfn = start_pfn;
+       work_with_active_regions(nid, get_active_region_work_fn, node_ar);
+ }
+@@ -888,18 +890,20 @@ void __init do_init_bootmem(void)
+               struct node_active_region node_ar;
+               get_node_active_region(start_pfn, &node_ar);
+-              while (start_pfn < end_pfn) {
++              while (start_pfn < end_pfn &&
++                      node_ar.start_pfn < node_ar.end_pfn) {
++                      unsigned long reserve_size = size;
+                       /*
+                        * if reserved region extends past active region
+                        * then trim size to active region
+                        */
+                       if (end_pfn > node_ar.end_pfn)
+-                              size = (node_ar.end_pfn << PAGE_SHIFT)
++                              reserve_size = (node_ar.end_pfn << PAGE_SHIFT)
+                                       - (start_pfn << PAGE_SHIFT);
+-                      dbg("reserve_bootmem %lx %lx nid=%d\n", physbase, size,
+-                              node_ar.nid);
++                      dbg("reserve_bootmem %lx %lx nid=%d\n", physbase,
++                              reserve_size, node_ar.nid);
+                       reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase,
+-                                              size, BOOTMEM_DEFAULT);
++                                              reserve_size, BOOTMEM_DEFAULT);
+                       /*
+                        * if reserved region is contained in the active region
+                        * then done.
+@@ -914,6 +918,7 @@ void __init do_init_bootmem(void)
+                        */
+                       start_pfn = node_ar.end_pfn;
+                       physbase = start_pfn << PAGE_SHIFT;
++                      size = size - reserve_size;
+                       get_node_active_region(start_pfn, &node_ar);
+               }
diff --git a/queue-2.6.27/powerpc-reserve-in-bootmem-lmb-reserved-regions-that-cross-numa-nodes.patch b/queue-2.6.27/powerpc-reserve-in-bootmem-lmb-reserved-regions-that-cross-numa-nodes.patch
new file mode 100644 (file)
index 0000000..659e679
--- /dev/null
@@ -0,0 +1,189 @@
+From 8f64e1f2d1e09267ac926e15090fd505c1c0cbcb Mon Sep 17 00:00:00 2001
+From: Jon Tollefson <kniht@linux.vnet.ibm.com>
+Date: Thu, 9 Oct 2008 10:18:40 +0000
+Subject: powerpc: Reserve in bootmem lmb reserved regions that cross NUMA nodes
+
+From: Jon Tollefson <kniht@linux.vnet.ibm.com>
+
+commit 8f64e1f2d1e09267ac926e15090fd505c1c0cbcb upstream
+
+If there are multiple reserved memory blocks via lmb_reserve() that are
+contiguous addresses and on different NUMA nodes we are losing track of which
+address ranges to reserve in bootmem on which node.  I discovered this
+when I recently got to try 16GB huge pages on a system with more then 2 nodes.
+
+When scanning the device tree in early boot we call lmb_reserve() with
+the addresses of the 16G pages that we find so that the memory doesn't
+get used for something else.  For example the addresses for the pages
+could be 4000000000, 4400000000, 4800000000, 4C00000000, etc - 8 pages,
+one on each of eight nodes.  In the lmb after all the pages have been
+reserved it will look something like the following:
+
+lmb_dump_all:
+    memory.cnt            = 0x2
+    memory.size           = 0x3e80000000
+    memory.region[0x0].base       = 0x0
+                      .size     = 0x1e80000000
+    memory.region[0x1].base       = 0x4000000000
+                      .size     = 0x2000000000
+    reserved.cnt          = 0x5
+    reserved.size         = 0x3e80000000
+    reserved.region[0x0].base       = 0x0
+                      .size     = 0x7b5000
+    reserved.region[0x1].base       = 0x2a00000
+                      .size     = 0x78c000
+    reserved.region[0x2].base       = 0x328c000
+                      .size     = 0x43000
+    reserved.region[0x3].base       = 0xf4e8000
+                      .size     = 0xb18000
+    reserved.region[0x4].base       = 0x4000000000
+                      .size     = 0x2000000000
+
+The reserved.region[0x4] contains the 16G pages.  In
+arch/powerpc/mm/num.c: do_init_bootmem() we loop through each of the
+node numbers looking for the reserved regions that belong to the
+particular node.  It is not able to identify region 0x4 as being a part
+of each of the 8 nodes.  It is assuming that a reserved region is only
+on a single node.
+
+This patch takes out the reserved region loop from inside
+the loop that goes over each node.  It looks up the active region containing
+the start of the reserved region.  If it extends past that active region then
+it adjusts the size and gets the next active region containing it.
+
+Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/mm/numa.c |  108 ++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 80 insertions(+), 28 deletions(-)
+
+--- a/arch/powerpc/mm/numa.c
++++ b/arch/powerpc/mm/numa.c
+@@ -89,6 +89,46 @@ static int __cpuinit fake_numa_create_ne
+       return 0;
+ }
++/*
++ * get_active_region_work_fn - A helper function for get_node_active_region
++ *    Returns datax set to the start_pfn and end_pfn if they contain
++ *    the initial value of datax->start_pfn between them
++ * @start_pfn: start page(inclusive) of region to check
++ * @end_pfn: end page(exclusive) of region to check
++ * @datax: comes in with ->start_pfn set to value to search for and
++ *    goes out with active range if it contains it
++ * Returns 1 if search value is in range else 0
++ */
++static int __init get_active_region_work_fn(unsigned long start_pfn,
++                                      unsigned long end_pfn, void *datax)
++{
++      struct node_active_region *data;
++      data = (struct node_active_region *)datax;
++
++      if (start_pfn <= data->start_pfn && end_pfn > data->start_pfn) {
++              data->start_pfn = start_pfn;
++              data->end_pfn = end_pfn;
++              return 1;
++      }
++      return 0;
++
++}
++
++/*
++ * get_node_active_region - Return active region containing start_pfn
++ * @start_pfn: The page to return the region for.
++ * @node_ar: Returned set to the active region containing start_pfn
++ */
++static void __init get_node_active_region(unsigned long start_pfn,
++                     struct node_active_region *node_ar)
++{
++      int nid = early_pfn_to_nid(start_pfn);
++
++      node_ar->nid = nid;
++      node_ar->start_pfn = start_pfn;
++      work_with_active_regions(nid, get_active_region_work_fn, node_ar);
++}
++
+ static void __cpuinit map_cpu_to_node(int cpu, int node)
+ {
+       numa_cpu_lookup_table[cpu] = node;
+@@ -837,38 +877,50 @@ void __init do_init_bootmem(void)
+                                 start_pfn, end_pfn);
+               free_bootmem_with_active_regions(nid, end_pfn);
++      }
+-              /* Mark reserved regions on this node */
+-              for (i = 0; i < lmb.reserved.cnt; i++) {
+-                      unsigned long physbase = lmb.reserved.region[i].base;
+-                      unsigned long size = lmb.reserved.region[i].size;
+-                      unsigned long start_paddr = start_pfn << PAGE_SHIFT;
+-                      unsigned long end_paddr = end_pfn << PAGE_SHIFT;
+-
+-                      if (early_pfn_to_nid(physbase >> PAGE_SHIFT) != nid &&
+-                          early_pfn_to_nid((physbase+size-1) >> PAGE_SHIFT) != nid)
+-                              continue;
+-
+-                      if (physbase < end_paddr &&
+-                          (physbase+size) > start_paddr) {
+-                              /* overlaps */
+-                              if (physbase < start_paddr) {
+-                                      size -= start_paddr - physbase;
+-                                      physbase = start_paddr;
+-                              }
+-
+-                              if (size > end_paddr - physbase)
+-                                      size = end_paddr - physbase;
+-
+-                              dbg("reserve_bootmem %lx %lx\n", physbase,
+-                                  size);
+-                              reserve_bootmem_node(NODE_DATA(nid), physbase,
+-                                                   size, BOOTMEM_DEFAULT);
+-                      }
++      /* Mark reserved regions */
++      for (i = 0; i < lmb.reserved.cnt; i++) {
++              unsigned long physbase = lmb.reserved.region[i].base;
++              unsigned long size = lmb.reserved.region[i].size;
++              unsigned long start_pfn = physbase >> PAGE_SHIFT;
++              unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT);
++              struct node_active_region node_ar;
++
++              get_node_active_region(start_pfn, &node_ar);
++              while (start_pfn < end_pfn) {
++                      /*
++                       * if reserved region extends past active region
++                       * then trim size to active region
++                       */
++                      if (end_pfn > node_ar.end_pfn)
++                              size = (node_ar.end_pfn << PAGE_SHIFT)
++                                      - (start_pfn << PAGE_SHIFT);
++                      dbg("reserve_bootmem %lx %lx nid=%d\n", physbase, size,
++                              node_ar.nid);
++                      reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase,
++                                              size, BOOTMEM_DEFAULT);
++                      /*
++                       * if reserved region is contained in the active region
++                       * then done.
++                       */
++                      if (end_pfn <= node_ar.end_pfn)
++                              break;
++
++                      /*
++                       * reserved region extends past the active region
++                       *   get next active region that contains this
++                       *   reserved region
++                       */
++                      start_pfn = node_ar.end_pfn;
++                      physbase = start_pfn << PAGE_SHIFT;
++                      get_node_active_region(start_pfn, &node_ar);
+               }
+-              sparse_memory_present_with_active_regions(nid);
+       }
++
++      for_each_online_node(nid)
++              sparse_memory_present_with_active_regions(nid);
+ }
+ void __init paging_init(void)
diff --git a/queue-2.6.27/scx200_i2c-add-missing-class-parameter.patch b/queue-2.6.27/scx200_i2c-add-missing-class-parameter.patch
new file mode 100644 (file)
index 0000000..401477f
--- /dev/null
@@ -0,0 +1,36 @@
+From khali@linux-fr.org  Tue Nov  4 14:08:54 2008
+From: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
+Date: Fri, 31 Oct 2008 09:25:39 +0100
+Subject: scx200_i2c: Add missing class parameter
+To: stable@kernel.org
+Cc: Len Sorensen <lsorense@csclub.uwaterloo.ca>
+Message-ID: <20081031092539.5e6be075@hyperion.delvare>
+
+
+From: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
+
+commit 4a029abee0f1d69cb0445657d6fa5a38597bd17d upstream
+
+The scx200_i2c driver is missing the .class parameter, which means no
+i2c drivers are willing to probe for devices on the bus and attach to
+them.
+
+Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/i2c/busses/scx200_i2c.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/i2c/busses/scx200_i2c.c
++++ b/drivers/i2c/busses/scx200_i2c.c
+@@ -81,6 +81,7 @@ static struct i2c_algo_bit_data scx200_i
+ static struct i2c_adapter scx200_i2c_ops = {
+       .owner             = THIS_MODULE,
++      .class             = I2C_CLASS_HWMON | I2C_CLASS_SPD,
+       .id                = I2C_HW_B_SCX200,
+       .algo_data         = &scx200_i2c_data,
+       .name   = "NatSemi SCx200 I2C",
index b8b6c883b16b9f0064320aa3b64b78f51a08f64b..23bcd3789ed468895707b5db31c1b7873ab4b8e5 100644 (file)
@@ -17,3 +17,22 @@ libata-initialize-port_task-when-config_ata_sff.patch
 0004-pkt_sched-sch_generic-Fix-oops-in-sch_teql.patch
 0001-sparc64-Fix-race-in-arch-sparc64-kernel-trampoline.patch
 0002-math-emu-Fix-signalling-of-underflow-and-inexact-wh.patch
+firewire-fix-setting-tag-and-sy-in-iso-transmission.patch
+firewire-fix-ioctl-return-code.patch
+firewire-survive-more-than-256-bus-resets.patch
+firewire-fix-struct-fw_node-memory-leak.patch
+firewire-fw-sbp2-delay-first-login-to-avoid-retries.patch
+firewire-fw-sbp2-fix-races.patch
+acpi-always-report-a-sync-event-after-a-lid-state-change.patch
+powerpc-fix-i2c-on-ppc-linkstation-kurobox-machines.patch
+powerpc-reserve-in-bootmem-lmb-reserved-regions-that-cross-numa-nodes.patch
+powerpc-numa-make-memory-reserve-code-more-robust.patch
+powerpc-don-t-use-a-16g-page-if-beyond-mem-limits.patch
+i2c-the-i2c-mailing-list-is-moving.patch
+scx200_i2c-add-missing-class-parameter.patch
+alsa-use-correct-lock-in-snd_ctl_dev_disconnect.patch
+v4l-pvrusb2-keep-mpeg-ptss-from-drifting-away.patch
+dvb-s5h1411-bugfix-setting-serial-or-parallel-mode-could-destroy-bits.patch
+dvb-s5h1411-perform-s5h1411-soft-reset-after-tuning.patch
+dvb-s5h1411-power-down-s5h1411-when-not-in-use.patch
+pci-fix-64-vbit-prefetchable-memory-resource-bars.patch
diff --git a/queue-2.6.27/v4l-pvrusb2-keep-mpeg-ptss-from-drifting-away.patch b/queue-2.6.27/v4l-pvrusb2-keep-mpeg-ptss-from-drifting-away.patch
new file mode 100644 (file)
index 0000000..dc51767
--- /dev/null
@@ -0,0 +1,40 @@
+From mkrufky@linuxtv.org  Tue Nov  4 14:12:51 2008
+From: Boris Dores <babal@via.ecp.fr>
+Date: Sun, 02 Nov 2008 23:04:42 -0500
+Subject: V4L: pvrusb2: Keep MPEG PTSs from drifting away
+To: stable@kernel.org
+Cc: Boris Dores <babal@via.ecp.fr>, v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>, Mike Isely <isely@pobox.com>, Mauro Carvalho Chehab <mchehab@redhat.com>
+Message-ID: <490E785A.4020302@linuxtv.org>
+
+
+From: Boris Dores <babal@via.ecp.fr>
+
+cherry picked from commit 3f93d1adca658201c64251c43a147cc79d468c3f
+
+V4L: pvrusb2: Keep MPEG PTSs from drifting away
+
+This change was empirically figured out by Boris Dores after
+empirically comparing against behavior in the Windows driver.
+
+Signed-off-by: Mike Isely <isely@pobox.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/pvrusb2/pvrusb2-encoder.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c
++++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+@@ -402,6 +402,10 @@ static int pvr2_encoder_prep_config(stru
+       ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 0,3,0,0);
+       ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4,15,0,0,0);
++      /* prevent the PTSs from slowly drifting away in the generated
++         MPEG stream */
++      ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC, 2, 4, 1);
++
+       return ret;
+ }