summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-07-18 21:47:34 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-18 21:47:34 +0200
commitd28b00decba05032cc0fd66ee057c86bc90da434 (patch)
tree2f7213236fc58a97538b11a9e7ade844fd0b47c6
parent14ca8419bc482ff643942bc379d912ead40ce058 (diff)
downloadstable-queue-d28b00decba05032cc0fd66ee057c86bc90da434.tar.gz
.39 patches
-rw-r--r--queue-2.6.39/arm-6989-1-perf-do-not-start-the-pmu-when-no-events-are.patch50
-rw-r--r--queue-2.6.39/arm-pxa-fix-pgsr-register-address-calculation.patch35
-rw-r--r--queue-2.6.39/arm-pxa168-correct-nand-pmu-setting.patch35
-rw-r--r--queue-2.6.39/arm-pxa910-correct-nand-pmu-setting.patch31
-rw-r--r--queue-2.6.39/asoc-ak4642-fixup-snd_soc_update_bits-mask-for-pw_mgmt2.patch31
-rw-r--r--queue-2.6.39/asoc-ensure-we-delay-long-enough-for-wm8994-fll-to-lock.patch30
-rw-r--r--queue-2.6.39/asoc-fix-blackfin-i2s-_pointer-implementation-return-in.patch49
-rw-r--r--queue-2.6.39/ath5k-fix-incorrect-use-of-drvdata-in-pci-suspend-resume.patch40
-rw-r--r--queue-2.6.39/ath5k-fix-incorrect-use-of-drvdata-in-sysfs-code.patch49
-rw-r--r--queue-2.6.39/ath9k-fix-tx-throughput-drops-for-ar9003-chips-with-aes.patch34
-rw-r--r--queue-2.6.39/bttv-fix-s_tuner-for-radio.patch32
-rw-r--r--queue-2.6.39/carl9170-add-nec-wl300nu-ag-usbid.patch29
-rw-r--r--queue-2.6.39/drm-radeon-fix-oops-in-ttm-reserve-when-pageflipping-v2.patch71
-rw-r--r--queue-2.6.39/drm-radeon-kms-add-new-ni-pci-ids.patch35
-rw-r--r--queue-2.6.39/drm-radeon-kms-clean-up-multiple-crtc-handling-for.patch329
-rw-r--r--queue-2.6.39/drm-radeon-kms-fix-backend-map-typo-on-juniper.patch30
-rw-r--r--queue-2.6.39/drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch3
-rw-r--r--queue-2.6.39/firewire-ohci-do-not-bind-to-pinnacle-cards-avert-panic.patch45
-rw-r--r--queue-2.6.39/fs-partitions-efi.c-corrupted-guid-partition-tables-can-cause-kernel-oops.patch61
-rw-r--r--queue-2.6.39/gfs2-make-sure-fallocate-bytes-is-a-multiple-of-blksize.patch66
-rw-r--r--queue-2.6.39/hwmon-lm95241-fix-chip-detection-code.patch34
-rw-r--r--queue-2.6.39/hwmon-lm95241-fix-negative-temperature-results.patch63
-rw-r--r--queue-2.6.39/hwmon-pmbus-auto-detect-temp2-and-temp3.patch32
-rw-r--r--queue-2.6.39/hwmon-pmbus-drop-check-for-pmbus-revision-register-in.patch40
-rw-r--r--queue-2.6.39/hwmon-pmbus-improve-auto-detection-of-temperature-status.patch45
-rw-r--r--queue-2.6.39/hwmon-pmbus-improve-fan-detection.patch40
-rw-r--r--queue-2.6.39/hwmon-pmbus-use-long-variables-for-register-to-data.patch87
-rw-r--r--queue-2.6.39/mac80211-fix-tkip-replay-vulnerability.patch92
-rw-r--r--queue-2.6.39/mm-vmscan-correct-check-for-kswapd-sleeping-in.patch3
-rw-r--r--queue-2.6.39/mm-vmscan-evaluate-the-watermarks-against-the-correct.patch3
-rw-r--r--queue-2.6.39/nfsv4.1-update-nfs4_fattr_bitmap_maxsz.patch31
-rw-r--r--queue-2.6.39/pvrusb2-fix-g-s_tuner-support.patch45
-rw-r--r--queue-2.6.39/revert-dell-laptop-toggle-the-unsupported-hardware.patch64
-rw-r--r--queue-2.6.39/rtlwifi-rtl8192cu-add-new-usb-id-for-netgear-wna1000m.patch28
-rw-r--r--queue-2.6.39/series36
-rw-r--r--queue-2.6.39/sunrpc-fix-a-race-between-work-queue-and-rpc_killall_tasks.patch65
-rw-r--r--queue-2.6.39/sunrpc-fix-use-of-static-variable-in-rpcb_getport_async.patch37
-rw-r--r--queue-2.6.39/tuner-core-fix-s_std-and-s_tuner.patch159
-rw-r--r--queue-2.6.39/tuner-core-fix-tuner_resume-use-t-mode-instead-of-t-type.patch31
-rw-r--r--queue-2.6.39/v4l2-ioctl.c-prefill-tuner-type-for-g_frequency-and.patch55
40 files changed, 2069 insertions, 6 deletions
diff --git a/queue-2.6.39/arm-6989-1-perf-do-not-start-the-pmu-when-no-events-are.patch b/queue-2.6.39/arm-6989-1-perf-do-not-start-the-pmu-when-no-events-are.patch
new file mode 100644
index 0000000000..2e275c8248
--- /dev/null
+++ b/queue-2.6.39/arm-6989-1-perf-do-not-start-the-pmu-when-no-events-are.patch
@@ -0,0 +1,50 @@
+From f4f38430c94c38187db73a2cf3892cc8b12a2713 Mon Sep 17 00:00:00 2001
+From: Will Deacon <will.deacon@arm.com>
+Date: Fri, 1 Jul 2011 14:38:12 +0100
+Subject: ARM: 6989/1: perf: do not start the PMU when no events are present
+
+From: Will Deacon <will.deacon@arm.com>
+
+commit f4f38430c94c38187db73a2cf3892cc8b12a2713 upstream.
+
+armpmu_enable can be called in situations where no events are present
+(for example, from the event rotation tick after a profiled task has
+exited). In this case, we currently start the PMU anyway which may
+leave it active inevitably without any events being monitored.
+
+This patch adds a simple check to the enabling code so that we avoid
+starting the PMU when no events are present.
+
+Reported-by: Ashwin Chaugle <ashwinc@codeaurora.org>
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/kernel/perf_event.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/kernel/perf_event.c
++++ b/arch/arm/kernel/perf_event.c
+@@ -588,7 +588,7 @@ static int armpmu_event_init(struct perf
+ static void armpmu_enable(struct pmu *pmu)
+ {
+ /* Enable all of the perf events on hardware. */
+- int idx;
++ int idx, enabled = 0;
+ struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
+
+ if (!armpmu)
+@@ -601,9 +601,11 @@ static void armpmu_enable(struct pmu *pm
+ continue;
+
+ armpmu->enable(&event->hw, idx);
++ enabled = 1;
+ }
+
+- armpmu->start();
++ if (enabled)
++ armpmu->start();
+ }
+
+ static void armpmu_disable(struct pmu *pmu)
diff --git a/queue-2.6.39/arm-pxa-fix-pgsr-register-address-calculation.patch b/queue-2.6.39/arm-pxa-fix-pgsr-register-address-calculation.patch
new file mode 100644
index 0000000000..75a70495a1
--- /dev/null
+++ b/queue-2.6.39/arm-pxa-fix-pgsr-register-address-calculation.patch
@@ -0,0 +1,35 @@
+From beb0c9b056b1c23d2029b46a425362e9ccbeba01 Mon Sep 17 00:00:00 2001
+From: Paul Parsons <lost.distance@yahoo.com>
+Date: Sun, 8 May 2011 01:54:33 +0000
+Subject: ARM: pxa: fix PGSR register address calculation
+
+From: Paul Parsons <lost.distance@yahoo.com>
+
+commit beb0c9b056b1c23d2029b46a425362e9ccbeba01 upstream.
+
+The file mfp-pxa2xx.c defines a macro, PGSR(), which translates a gpio
+bank number to a PGSR register address. The function pxa2xx_mfp_suspend()
+erroneously passed in a gpio number instead of a gpio bank number.
+
+Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
+Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-pxa/mfp-pxa2xx.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
++++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
+@@ -347,9 +347,9 @@ static int pxa2xx_mfp_suspend(struct sys
+ if ((gpio_desc[i].config & MFP_LPM_KEEP_OUTPUT) &&
+ (GPDR(i) & GPIO_bit(i))) {
+ if (GPLR(i) & GPIO_bit(i))
+- PGSR(i) |= GPIO_bit(i);
++ PGSR(gpio_to_bank(i)) |= GPIO_bit(i);
+ else
+- PGSR(i) &= ~GPIO_bit(i);
++ PGSR(gpio_to_bank(i)) &= ~GPIO_bit(i);
+ }
+ }
+
diff --git a/queue-2.6.39/arm-pxa168-correct-nand-pmu-setting.patch b/queue-2.6.39/arm-pxa168-correct-nand-pmu-setting.patch
new file mode 100644
index 0000000000..6d08d77c32
--- /dev/null
+++ b/queue-2.6.39/arm-pxa168-correct-nand-pmu-setting.patch
@@ -0,0 +1,35 @@
+From 6662498e132dfa758925a160fd5ef80a083651c3 Mon Sep 17 00:00:00 2001
+From: Lei Wen <leiwen@marvell.com>
+Date: Tue, 21 Jun 2011 05:37:47 -0700
+Subject: ARM: pxa168: correct nand pmu setting
+
+From: Lei Wen <leiwen@marvell.com>
+
+commit 6662498e132dfa758925a160fd5ef80a083651c3 upstream.
+
+The original pair of <0x01db, 208000000> is invalid. Correct it to
+the valid value.
+
+The 6th bit of the NFC APMU register indicates NFC works whether
+at 156Mhz or 78Mhz. So 0x19b indicates NFC works at 156Mhz, and
+0x1db indicates it works at 78Mhz.
+
+Signed-off-by: Lei Wen <leiwen@marvell.com>
+Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-mmp/pxa168.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/mach-mmp/pxa168.c
++++ b/arch/arm/mach-mmp/pxa168.c
+@@ -79,7 +79,7 @@ static APBC_CLK(ssp4, PXA168_SSP4, 4, 0)
+ static APBC_CLK(ssp5, PXA168_SSP5, 4, 0);
+ static APBC_CLK(keypad, PXA168_KPC, 0, 32000);
+
+-static APMU_CLK(nand, NAND, 0x01db, 208000000);
++static APMU_CLK(nand, NAND, 0x19b, 156000000);
+ static APMU_CLK(lcd, LCD, 0x7f, 312000000);
+
+ /* device and clock bindings */
diff --git a/queue-2.6.39/arm-pxa910-correct-nand-pmu-setting.patch b/queue-2.6.39/arm-pxa910-correct-nand-pmu-setting.patch
new file mode 100644
index 0000000000..5a0852bc96
--- /dev/null
+++ b/queue-2.6.39/arm-pxa910-correct-nand-pmu-setting.patch
@@ -0,0 +1,31 @@
+From d204b2c5b16df935fa9a546c528e168859fddcc0 Mon Sep 17 00:00:00 2001
+From: Lei Wen <leiwen@marvell.com>
+Date: Tue, 21 Jun 2011 02:54:18 -0700
+Subject: ARM: pxa910: correct nand pmu setting
+
+From: Lei Wen <leiwen@marvell.com>
+
+commit d204b2c5b16df935fa9a546c528e168859fddcc0 upstream.
+
+The original pair of <0x01db, 208000000> is invalid.
+Correct to the valid value.
+
+Signed-off-by: Lei Wen <leiwen@marvell.com>
+Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-mmp/pxa910.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/mach-mmp/pxa910.c
++++ b/arch/arm/mach-mmp/pxa910.c
+@@ -110,7 +110,7 @@ static APBC_CLK(pwm2, PXA910_PWM2, 1, 13
+ static APBC_CLK(pwm3, PXA910_PWM3, 1, 13000000);
+ static APBC_CLK(pwm4, PXA910_PWM4, 1, 13000000);
+
+-static APMU_CLK(nand, NAND, 0x01db, 208000000);
++static APMU_CLK(nand, NAND, 0x19b, 156000000);
+ static APMU_CLK(u2o, USB, 0x1b, 480000000);
+
+ /* device and clock bindings */
diff --git a/queue-2.6.39/asoc-ak4642-fixup-snd_soc_update_bits-mask-for-pw_mgmt2.patch b/queue-2.6.39/asoc-ak4642-fixup-snd_soc_update_bits-mask-for-pw_mgmt2.patch
new file mode 100644
index 0000000000..551160ea2c
--- /dev/null
+++ b/queue-2.6.39/asoc-ak4642-fixup-snd_soc_update_bits-mask-for-pw_mgmt2.patch
@@ -0,0 +1,31 @@
+From bd7fdbcaa2d06d446577fd3c9b81847b04469e01 Mon Sep 17 00:00:00 2001
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Date: Wed, 6 Jul 2011 17:58:56 -0700
+Subject: ASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2
+
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+commit bd7fdbcaa2d06d446577fd3c9b81847b04469e01 upstream.
+
+mask didn't cover update-data
+
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Acked-by: Liam Girdwood <lrg@ti.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/soc/codecs/ak4642.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/codecs/ak4642.c
++++ b/sound/soc/codecs/ak4642.c
+@@ -357,7 +357,7 @@ static int ak4642_dai_set_fmt(struct snd
+ default:
+ return -EINVAL;
+ }
+- snd_soc_update_bits(codec, PW_MGMT2, MS, data);
++ snd_soc_update_bits(codec, PW_MGMT2, MS | MCKO | PMPLL, data);
+ snd_soc_update_bits(codec, MD_CTL1, BCKO_MASK, bcko);
+
+ /* format type */
diff --git a/queue-2.6.39/asoc-ensure-we-delay-long-enough-for-wm8994-fll-to-lock.patch b/queue-2.6.39/asoc-ensure-we-delay-long-enough-for-wm8994-fll-to-lock.patch
new file mode 100644
index 0000000000..b007ea6614
--- /dev/null
+++ b/queue-2.6.39/asoc-ensure-we-delay-long-enough-for-wm8994-fll-to-lock.patch
@@ -0,0 +1,30 @@
+From 8e9ddf811ba021506d2316fcfe619faa0ab3f567 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Fri, 1 Jul 2011 17:24:46 -0700
+Subject: ASoC: Ensure we delay long enough for WM8994 FLL to lock when starting
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit 8e9ddf811ba021506d2316fcfe619faa0ab3f567 upstream.
+
+This delay is very conservative.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Acked-by: Liam Girdwood <lrg@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/soc/codecs/wm8994.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/soc/codecs/wm8994.c
++++ b/sound/soc/codecs/wm8994.c
+@@ -1969,6 +1969,8 @@ static int _wm8994_set_fll(struct snd_so
+ snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1 + reg_offset,
+ WM8994_FLL1_ENA | WM8994_FLL1_FRAC,
+ reg);
++
++ msleep(5);
+ }
+
+ wm8994->fll[id].in = freq_in;
diff --git a/queue-2.6.39/asoc-fix-blackfin-i2s-_pointer-implementation-return-in.patch b/queue-2.6.39/asoc-fix-blackfin-i2s-_pointer-implementation-return-in.patch
new file mode 100644
index 0000000000..cab1c7dca1
--- /dev/null
+++ b/queue-2.6.39/asoc-fix-blackfin-i2s-_pointer-implementation-return-in.patch
@@ -0,0 +1,49 @@
+From e999dc50404d401150a5429b6459473a691fd1a0 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Mon, 13 Jun 2011 12:14:07 +0100
+Subject: ASoC: Fix Blackfin I2S _pointer() implementation return in bounds values
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit e999dc50404d401150a5429b6459473a691fd1a0 upstream.
+
+The Blackfin DMA controller can report one frame beyond the end of the
+buffer in the wraparound case but ALSA requires that the pointer always
+be in the buffer. Do the wraparound to handle this. A similar bug is
+likely to apply to the other Blackfin PCM drivers but the code is less
+obvious to inspection and I don't have a user to test.
+
+Reported-by: Kieran O'Leary <Kieran.O'Leary@wolfsonmicro.com>
+Acked-by: Liam Girdwood <lrg@ti.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/soc/blackfin/bf5xx-i2s-pcm.c | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+--- a/sound/soc/blackfin/bf5xx-i2s-pcm.c
++++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c
+@@ -138,11 +138,20 @@ static snd_pcm_uframes_t bf5xx_pcm_point
+ pr_debug("%s enter\n", __func__);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ diff = sport_curr_offset_tx(sport);
+- frames = bytes_to_frames(substream->runtime, diff);
+ } else {
+ diff = sport_curr_offset_rx(sport);
+- frames = bytes_to_frames(substream->runtime, diff);
+ }
++
++ /*
++ * TX at least can report one frame beyond the end of the
++ * buffer if we hit the wraparound case - clamp to within the
++ * buffer as the ALSA APIs require.
++ */
++ if (diff == snd_pcm_lib_buffer_bytes(substream))
++ diff = 0;
++
++ frames = bytes_to_frames(substream->runtime, diff);
++
+ return frames;
+ }
+
diff --git a/queue-2.6.39/ath5k-fix-incorrect-use-of-drvdata-in-pci-suspend-resume.patch b/queue-2.6.39/ath5k-fix-incorrect-use-of-drvdata-in-pci-suspend-resume.patch
new file mode 100644
index 0000000000..df8ac9fd13
--- /dev/null
+++ b/queue-2.6.39/ath5k-fix-incorrect-use-of-drvdata-in-pci-suspend-resume.patch
@@ -0,0 +1,40 @@
+From 37000b305bff81bb1ee2f7f37b1319b670a08f76 Mon Sep 17 00:00:00 2001
+From: Pavel Roskin <proski@gnu.org>
+Date: Wed, 29 Jun 2011 15:39:43 -0400
+Subject: ath5k: fix incorrect use of drvdata in PCI suspend/resume code
+
+From: Pavel Roskin <proski@gnu.org>
+
+commit 37000b305bff81bb1ee2f7f37b1319b670a08f76 upstream.
+
+Signed-off-by: Pavel Roskin <proski@gnu.org>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ath/ath5k/pci.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath5k/pci.c
++++ b/drivers/net/wireless/ath/ath5k/pci.c
+@@ -265,7 +265,9 @@ ath5k_pci_remove(struct pci_dev *pdev)
+ #ifdef CONFIG_PM_SLEEP
+ static int ath5k_pci_suspend(struct device *dev)
+ {
+- struct ath5k_softc *sc = pci_get_drvdata(to_pci_dev(dev));
++ struct pci_dev *pdev = to_pci_dev(dev);
++ struct ieee80211_hw *hw = pci_get_drvdata(pdev);
++ struct ath5k_softc *sc = hw->priv;
+
+ ath5k_led_off(sc);
+ return 0;
+@@ -274,7 +276,8 @@ static int ath5k_pci_suspend(struct devi
+ static int ath5k_pci_resume(struct device *dev)
+ {
+ struct pci_dev *pdev = to_pci_dev(dev);
+- struct ath5k_softc *sc = pci_get_drvdata(pdev);
++ struct ieee80211_hw *hw = pci_get_drvdata(pdev);
++ struct ath5k_softc *sc = hw->priv;
+
+ /*
+ * Suspend/Resume resets the PCI configuration space, so we have to
diff --git a/queue-2.6.39/ath5k-fix-incorrect-use-of-drvdata-in-sysfs-code.patch b/queue-2.6.39/ath5k-fix-incorrect-use-of-drvdata-in-sysfs-code.patch
new file mode 100644
index 0000000000..990d0f4eb1
--- /dev/null
+++ b/queue-2.6.39/ath5k-fix-incorrect-use-of-drvdata-in-sysfs-code.patch
@@ -0,0 +1,49 @@
+From 95acbd432b4c6498c5b4b2f92e0e05e3c032d4f8 Mon Sep 17 00:00:00 2001
+From: Pavel Roskin <proski@gnu.org>
+Date: Wed, 29 Jun 2011 15:39:37 -0400
+Subject: ath5k: fix incorrect use of drvdata in sysfs code
+
+From: Pavel Roskin <proski@gnu.org>
+
+commit 95acbd432b4c6498c5b4b2f92e0e05e3c032d4f8 upstream.
+
+Signed-off-by: Pavel Roskin <proski@gnu.org>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ath/ath5k/sysfs.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath5k/sysfs.c
++++ b/drivers/net/wireless/ath/ath5k/sysfs.c
+@@ -10,7 +10,8 @@ static ssize_t ath5k_attr_show_##name(st
+ struct device_attribute *attr, \
+ char *buf) \
+ { \
+- struct ath5k_softc *sc = dev_get_drvdata(dev); \
++ struct ieee80211_hw *hw = dev_get_drvdata(dev); \
++ struct ath5k_softc *sc = hw->priv; \
+ return snprintf(buf, PAGE_SIZE, "%d\n", get); \
+ } \
+ \
+@@ -18,7 +19,8 @@ static ssize_t ath5k_attr_store_##name(s
+ struct device_attribute *attr, \
+ const char *buf, size_t count) \
+ { \
+- struct ath5k_softc *sc = dev_get_drvdata(dev); \
++ struct ieee80211_hw *hw = dev_get_drvdata(dev); \
++ struct ath5k_softc *sc = hw->priv; \
+ int val; \
+ \
+ val = (int)simple_strtoul(buf, NULL, 10); \
+@@ -33,7 +35,8 @@ static ssize_t ath5k_attr_show_##name(st
+ struct device_attribute *attr, \
+ char *buf) \
+ { \
+- struct ath5k_softc *sc = dev_get_drvdata(dev); \
++ struct ieee80211_hw *hw = dev_get_drvdata(dev); \
++ struct ath5k_softc *sc = hw->priv; \
+ return snprintf(buf, PAGE_SIZE, "%d\n", get); \
+ } \
+ static DEVICE_ATTR(name, S_IRUGO, ath5k_attr_show_##name, NULL)
diff --git a/queue-2.6.39/ath9k-fix-tx-throughput-drops-for-ar9003-chips-with-aes.patch b/queue-2.6.39/ath9k-fix-tx-throughput-drops-for-ar9003-chips-with-aes.patch
new file mode 100644
index 0000000000..b10aa9c674
--- /dev/null
+++ b/queue-2.6.39/ath9k-fix-tx-throughput-drops-for-ar9003-chips-with-aes.patch
@@ -0,0 +1,34 @@
+From 4f6760b01bda625e9555e16d8e9ba8126a9c9498 Mon Sep 17 00:00:00 2001
+From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+Date: Fri, 1 Jul 2011 18:37:33 +0530
+Subject: ath9k: Fix tx throughput drops for AR9003 chips with AES encryption
+
+From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+
+commit 4f6760b01bda625e9555e16d8e9ba8126a9c9498 upstream.
+
+While sending aggregated frames in AES, the AR5416 chips
+required additional padding b/w subframes. This workaround
+is not needed for edma (AR9003 family) chips. With this patch
+~4Mbps thoughput improvement was observed in clear environment.
+
+Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ath/ath9k/xmit.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -662,7 +662,8 @@ static int ath_compute_num_delims(struct
+ * TODO - this could be improved to be dependent on the rate.
+ * The hardware can keep up at lower rates, but not higher rates
+ */
+- if (fi->keyix != ATH9K_TXKEYIX_INVALID)
++ if ((fi->keyix != ATH9K_TXKEYIX_INVALID) &&
++ !(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA))
+ ndelim += ATH_AGGR_ENCRYPTDELIM;
+
+ /*
diff --git a/queue-2.6.39/bttv-fix-s_tuner-for-radio.patch b/queue-2.6.39/bttv-fix-s_tuner-for-radio.patch
new file mode 100644
index 0000000000..7c53f6aada
--- /dev/null
+++ b/queue-2.6.39/bttv-fix-s_tuner-for-radio.patch
@@ -0,0 +1,32 @@
+From a024c1a6b274e11596d124619e43c25560f64c01 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hans.verkuil@cisco.com>
+Date: Sun, 12 Jun 2011 07:02:43 -0300
+Subject: [media] bttv: fix s_tuner for radio
+
+From: Hans Verkuil <hans.verkuil@cisco.com>
+
+commit a024c1a6b274e11596d124619e43c25560f64c01 upstream.
+
+Fix typo: g_tuner should have been s_tuner.
+
+Tested with a bttv card.
+
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/bt8xx/bttv-driver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/video/bt8xx/bttv-driver.c
++++ b/drivers/media/video/bt8xx/bttv-driver.c
+@@ -3474,7 +3474,7 @@ static int radio_s_tuner(struct file *fi
+ if (0 != t->index)
+ return -EINVAL;
+
+- bttv_call_all(btv, tuner, g_tuner, t);
++ bttv_call_all(btv, tuner, s_tuner, t);
+ return 0;
+ }
+
diff --git a/queue-2.6.39/carl9170-add-nec-wl300nu-ag-usbid.patch b/queue-2.6.39/carl9170-add-nec-wl300nu-ag-usbid.patch
new file mode 100644
index 0000000000..b0076cc33e
--- /dev/null
+++ b/queue-2.6.39/carl9170-add-nec-wl300nu-ag-usbid.patch
@@ -0,0 +1,29 @@
+From 06a86ddbf557cb8a0f7ded54e872e9d456002d52 Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey@googlemail.com>
+Date: Thu, 30 Jun 2011 21:06:17 +0200
+Subject: carl9170: add NEC WL300NU-AG usbid
+
+From: Christian Lamparter <chunkeey@googlemail.com>
+
+commit 06a86ddbf557cb8a0f7ded54e872e9d456002d52 upstream.
+
+Reported-by: Mark Davis
+Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ath/carl9170/usb.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/wireless/ath/carl9170/usb.c
++++ b/drivers/net/wireless/ath/carl9170/usb.c
+@@ -112,6 +112,8 @@ static struct usb_device_id carl9170_usb
+ { USB_DEVICE(0x04bb, 0x093f) },
+ /* NEC WL300NU-G */
+ { USB_DEVICE(0x0409, 0x0249) },
++ /* NEC WL300NU-AG */
++ { USB_DEVICE(0x0409, 0x02b4) },
+ /* AVM FRITZ!WLAN USB Stick N */
+ { USB_DEVICE(0x057c, 0x8401) },
+ /* AVM FRITZ!WLAN USB Stick N 2.4 */
diff --git a/queue-2.6.39/drm-radeon-fix-oops-in-ttm-reserve-when-pageflipping-v2.patch b/queue-2.6.39/drm-radeon-fix-oops-in-ttm-reserve-when-pageflipping-v2.patch
new file mode 100644
index 0000000000..de976e5afa
--- /dev/null
+++ b/queue-2.6.39/drm-radeon-fix-oops-in-ttm-reserve-when-pageflipping-v2.patch
@@ -0,0 +1,71 @@
+From 498c555f56a02ec1059bc150cde84411ba0ac010 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Sun, 29 May 2011 17:48:32 +1000
+Subject: drm/radeon: fix oops in ttm reserve when pageflipping (v2)
+
+From: Dave Airlie <airlied@redhat.com>
+
+commit 498c555f56a02ec1059bc150cde84411ba0ac010 upstream.
+
+We need to take a reference to this object, pinning doesn't take a reference
+so if userspace deletes the object it can disappear even if pinned.
+
+v2: fix error paths to unreference properly also.
+
+should fix:
+https://bugzilla.kernel.org/show_bug.cgi?id=32402
+and
+https://bugzilla.redhat.com/show_bug.cgi?id=680651
+
+Acked-By: Alex Deucher <alexdeucher@gmail.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/radeon/radeon_display.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/radeon_display.c
++++ b/drivers/gpu/drm/radeon/radeon_display.c
+@@ -264,6 +264,8 @@ static void radeon_unpin_work_func(struc
+ radeon_bo_unreserve(work->old_rbo);
+ } else
+ DRM_ERROR("failed to reserve buffer after flip\n");
++
++ drm_gem_object_unreference_unlocked(&work->old_rbo->gem_base);
+ kfree(work);
+ }
+
+@@ -371,6 +373,8 @@ static int radeon_crtc_page_flip(struct
+ new_radeon_fb = to_radeon_framebuffer(fb);
+ /* schedule unpin of the old buffer */
+ obj = old_radeon_fb->obj;
++ /* take a reference to the old object */
++ drm_gem_object_reference(obj);
+ rbo = gem_to_radeon_bo(obj);
+ work->old_rbo = rbo;
+ INIT_WORK(&work->work, radeon_unpin_work_func);
+@@ -378,12 +382,9 @@ static int radeon_crtc_page_flip(struct
+ /* We borrow the event spin lock for protecting unpin_work */
+ spin_lock_irqsave(&dev->event_lock, flags);
+ if (radeon_crtc->unpin_work) {
+- spin_unlock_irqrestore(&dev->event_lock, flags);
+- kfree(work);
+- radeon_fence_unref(&fence);
+-
+ DRM_DEBUG_DRIVER("flip queue: crtc already busy\n");
+- return -EBUSY;
++ r = -EBUSY;
++ goto unlock_free;
+ }
+ radeon_crtc->unpin_work = work;
+ radeon_crtc->deferred_flip_completion = 0;
+@@ -497,6 +498,8 @@ pflip_cleanup1:
+ pflip_cleanup:
+ spin_lock_irqsave(&dev->event_lock, flags);
+ radeon_crtc->unpin_work = NULL;
++unlock_free:
++ drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
+ spin_unlock_irqrestore(&dev->event_lock, flags);
+ radeon_fence_unref(&fence);
+ kfree(work);
diff --git a/queue-2.6.39/drm-radeon-kms-add-new-ni-pci-ids.patch b/queue-2.6.39/drm-radeon-kms-add-new-ni-pci-ids.patch
new file mode 100644
index 0000000000..7ab5c42ca0
--- /dev/null
+++ b/queue-2.6.39/drm-radeon-kms-add-new-ni-pci-ids.patch
@@ -0,0 +1,35 @@
+From e3c1620434ac77b618ce74c024ace3559602ac99 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher@gmail.com>
+Date: Fri, 15 Jul 2011 14:39:10 +0000
+Subject: drm/radeon/kms: add new NI pci ids
+
+From: Alex Deucher <alexdeucher@gmail.com>
+
+commit e3c1620434ac77b618ce74c024ace3559602ac99 upstream.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/drm/drm_pciids.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/include/drm/drm_pciids.h
++++ b/include/drm/drm_pciids.h
+@@ -182,6 +182,7 @@
+ {0x1002, 0x6750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6758, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6759, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
++ {0x1002, 0x675F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6760, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6761, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6762, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
+@@ -192,6 +193,7 @@
+ {0x1002, 0x6767, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6768, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6770, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
++ {0x1002, 0x6778, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6779, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x6888, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \
diff --git a/queue-2.6.39/drm-radeon-kms-clean-up-multiple-crtc-handling-for.patch b/queue-2.6.39/drm-radeon-kms-clean-up-multiple-crtc-handling-for.patch
new file mode 100644
index 0000000000..a51788c22f
--- /dev/null
+++ b/queue-2.6.39/drm-radeon-kms-clean-up-multiple-crtc-handling-for.patch
@@ -0,0 +1,329 @@
+From b7eff394670366a42935bfbaef67a6f7185627d7 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher@gmail.com>
+Date: Fri, 8 Jul 2011 11:44:56 -0400
+Subject: drm/radeon/kms: clean up multiple crtc handling for
+ evergreen+ (v2)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Alex Deucher <alexdeucher@gmail.com>
+
+commit b7eff394670366a42935bfbaef67a6f7185627d7 upstream.
+
+evergreen+ asics have 2-6 crtcs. Don't access crtc registers
+for crtc regs that don't exist as they have very high latency
+and may cause problems on some asics. The previous code missed
+a few cases and was not fine grained enough (missed the 4 crtc
+case for example).
+
+Fixes:
+https://bugs.freedesktop.org/show_bug.cgi?id=38800
+
+v2: fix typo noticed by Chris Bandy <cbandy@jbandy.com>
+
+Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
+Reviewed-by: Michel Dänzer <michel@daenzer.net>
+Tested-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/radeon/evergreen.c | 159 ++++++++++++++++++++++---------------
+ 1 file changed, 98 insertions(+), 61 deletions(-)
+
+--- a/drivers/gpu/drm/radeon/evergreen.c
++++ b/drivers/gpu/drm/radeon/evergreen.c
+@@ -960,17 +960,19 @@ void evergreen_mc_stop(struct radeon_dev
+ {
+ save->vga_control[0] = RREG32(D1VGA_CONTROL);
+ save->vga_control[1] = RREG32(D2VGA_CONTROL);
+- save->vga_control[2] = RREG32(EVERGREEN_D3VGA_CONTROL);
+- save->vga_control[3] = RREG32(EVERGREEN_D4VGA_CONTROL);
+- save->vga_control[4] = RREG32(EVERGREEN_D5VGA_CONTROL);
+- save->vga_control[5] = RREG32(EVERGREEN_D6VGA_CONTROL);
+ save->vga_render_control = RREG32(VGA_RENDER_CONTROL);
+ save->vga_hdp_control = RREG32(VGA_HDP_CONTROL);
+ save->crtc_control[0] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET);
+ save->crtc_control[1] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
++ save->vga_control[2] = RREG32(EVERGREEN_D3VGA_CONTROL);
++ save->vga_control[3] = RREG32(EVERGREEN_D4VGA_CONTROL);
+ save->crtc_control[2] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET);
+ save->crtc_control[3] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET);
++ }
++ if (rdev->num_crtc >= 6) {
++ save->vga_control[4] = RREG32(EVERGREEN_D5VGA_CONTROL);
++ save->vga_control[5] = RREG32(EVERGREEN_D6VGA_CONTROL);
+ save->crtc_control[4] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET);
+ save->crtc_control[5] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET);
+ }
+@@ -979,35 +981,45 @@ void evergreen_mc_stop(struct radeon_dev
+ WREG32(VGA_RENDER_CONTROL, 0);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 1);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 1);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 1);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 1);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 1);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 1);
+ }
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET, 0);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET, 0);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET, 0);
+ }
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 0);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 0);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 0);
+ }
+
+ WREG32(D1VGA_CONTROL, 0);
+ WREG32(D2VGA_CONTROL, 0);
+- WREG32(EVERGREEN_D3VGA_CONTROL, 0);
+- WREG32(EVERGREEN_D4VGA_CONTROL, 0);
+- WREG32(EVERGREEN_D5VGA_CONTROL, 0);
+- WREG32(EVERGREEN_D6VGA_CONTROL, 0);
++ if (rdev->num_crtc >= 4) {
++ WREG32(EVERGREEN_D3VGA_CONTROL, 0);
++ WREG32(EVERGREEN_D4VGA_CONTROL, 0);
++ }
++ if (rdev->num_crtc >= 6) {
++ WREG32(EVERGREEN_D5VGA_CONTROL, 0);
++ WREG32(EVERGREEN_D6VGA_CONTROL, 0);
++ }
+ }
+
+ void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save)
+@@ -1030,7 +1042,7 @@ void evergreen_mc_resume(struct radeon_d
+ WREG32(EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS + EVERGREEN_CRTC1_REGISTER_OFFSET,
+ (u32)rdev->mc.vram_start);
+
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH + EVERGREEN_CRTC2_REGISTER_OFFSET,
+ upper_32_bits(rdev->mc.vram_start));
+ WREG32(EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS_HIGH + EVERGREEN_CRTC2_REGISTER_OFFSET,
+@@ -1048,7 +1060,8 @@ void evergreen_mc_resume(struct radeon_d
+ (u32)rdev->mc.vram_start);
+ WREG32(EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS + EVERGREEN_CRTC3_REGISTER_OFFSET,
+ (u32)rdev->mc.vram_start);
+-
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH + EVERGREEN_CRTC4_REGISTER_OFFSET,
+ upper_32_bits(rdev->mc.vram_start));
+ WREG32(EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS_HIGH + EVERGREEN_CRTC4_REGISTER_OFFSET,
+@@ -1076,31 +1089,41 @@ void evergreen_mc_resume(struct radeon_d
+ /* Restore video state */
+ WREG32(D1VGA_CONTROL, save->vga_control[0]);
+ WREG32(D2VGA_CONTROL, save->vga_control[1]);
+- WREG32(EVERGREEN_D3VGA_CONTROL, save->vga_control[2]);
+- WREG32(EVERGREEN_D4VGA_CONTROL, save->vga_control[3]);
+- WREG32(EVERGREEN_D5VGA_CONTROL, save->vga_control[4]);
+- WREG32(EVERGREEN_D6VGA_CONTROL, save->vga_control[5]);
++ if (rdev->num_crtc >= 4) {
++ WREG32(EVERGREEN_D3VGA_CONTROL, save->vga_control[2]);
++ WREG32(EVERGREEN_D4VGA_CONTROL, save->vga_control[3]);
++ }
++ if (rdev->num_crtc >= 6) {
++ WREG32(EVERGREEN_D5VGA_CONTROL, save->vga_control[4]);
++ WREG32(EVERGREEN_D6VGA_CONTROL, save->vga_control[5]);
++ }
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 1);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 1);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 1);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 1);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 1);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 1);
+ }
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET, save->crtc_control[0]);
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET, save->crtc_control[1]);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET, save->crtc_control[2]);
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET, save->crtc_control[3]);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET, save->crtc_control[4]);
+ WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET, save->crtc_control[5]);
+ }
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 0);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 0);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 0);
+ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 0);
+ }
+@@ -2327,18 +2350,22 @@ void evergreen_disable_interrupt_state(s
+ WREG32(GRBM_INT_CNTL, 0);
+ WREG32(INT_MASK + EVERGREEN_CRTC0_REGISTER_OFFSET, 0);
+ WREG32(INT_MASK + EVERGREEN_CRTC1_REGISTER_OFFSET, 0);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(INT_MASK + EVERGREEN_CRTC2_REGISTER_OFFSET, 0);
+ WREG32(INT_MASK + EVERGREEN_CRTC3_REGISTER_OFFSET, 0);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(INT_MASK + EVERGREEN_CRTC4_REGISTER_OFFSET, 0);
+ WREG32(INT_MASK + EVERGREEN_CRTC5_REGISTER_OFFSET, 0);
+ }
+
+ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET, 0);
+ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET, 0);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET, 0);
+ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET, 0);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET, 0);
+ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET, 0);
+ }
+@@ -2457,19 +2484,25 @@ int evergreen_irq_set(struct radeon_devi
+
+ WREG32(INT_MASK + EVERGREEN_CRTC0_REGISTER_OFFSET, crtc1);
+ WREG32(INT_MASK + EVERGREEN_CRTC1_REGISTER_OFFSET, crtc2);
+- if (!(rdev->flags & RADEON_IS_IGP)) {
++ if (rdev->num_crtc >= 4) {
+ WREG32(INT_MASK + EVERGREEN_CRTC2_REGISTER_OFFSET, crtc3);
+ WREG32(INT_MASK + EVERGREEN_CRTC3_REGISTER_OFFSET, crtc4);
++ }
++ if (rdev->num_crtc >= 6) {
+ WREG32(INT_MASK + EVERGREEN_CRTC4_REGISTER_OFFSET, crtc5);
+ WREG32(INT_MASK + EVERGREEN_CRTC5_REGISTER_OFFSET, crtc6);
+ }
+
+ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET, grph1);
+ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET, grph2);
+- WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET, grph3);
+- WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET, grph4);
+- WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET, grph5);
+- WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET, grph6);
++ if (rdev->num_crtc >= 4) {
++ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET, grph3);
++ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET, grph4);
++ }
++ if (rdev->num_crtc >= 6) {
++ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET, grph5);
++ WREG32(GRPH_INT_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET, grph6);
++ }
+
+ WREG32(DC_HPD1_INT_CONTROL, hpd1);
+ WREG32(DC_HPD2_INT_CONTROL, hpd2);
+@@ -2493,53 +2526,57 @@ static inline void evergreen_irq_ack(str
+ rdev->irq.stat_regs.evergreen.disp_int_cont5 = RREG32(DISP_INTERRUPT_STATUS_CONTINUE5);
+ rdev->irq.stat_regs.evergreen.d1grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC0_REGISTER_OFFSET);
+ rdev->irq.stat_regs.evergreen.d2grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC1_REGISTER_OFFSET);
+- rdev->irq.stat_regs.evergreen.d3grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET);
+- rdev->irq.stat_regs.evergreen.d4grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET);
+- rdev->irq.stat_regs.evergreen.d5grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET);
+- rdev->irq.stat_regs.evergreen.d6grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET);
++ if (rdev->num_crtc >= 4) {
++ rdev->irq.stat_regs.evergreen.d3grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET);
++ rdev->irq.stat_regs.evergreen.d4grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET);
++ }
++ if (rdev->num_crtc >= 6) {
++ rdev->irq.stat_regs.evergreen.d5grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET);
++ rdev->irq.stat_regs.evergreen.d6grph_int = RREG32(GRPH_INT_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET);
++ }
+
+ if (rdev->irq.stat_regs.evergreen.d1grph_int & GRPH_PFLIP_INT_OCCURRED)
+ WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC0_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
+ if (rdev->irq.stat_regs.evergreen.d2grph_int & GRPH_PFLIP_INT_OCCURRED)
+ WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC1_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
+- if (rdev->irq.stat_regs.evergreen.d3grph_int & GRPH_PFLIP_INT_OCCURRED)
+- WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
+- if (rdev->irq.stat_regs.evergreen.d4grph_int & GRPH_PFLIP_INT_OCCURRED)
+- WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
+- if (rdev->irq.stat_regs.evergreen.d5grph_int & GRPH_PFLIP_INT_OCCURRED)
+- WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
+- if (rdev->irq.stat_regs.evergreen.d6grph_int & GRPH_PFLIP_INT_OCCURRED)
+- WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
+-
+ if (rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VBLANK_INTERRUPT)
+ WREG32(VBLANK_STATUS + EVERGREEN_CRTC0_REGISTER_OFFSET, VBLANK_ACK);
+ if (rdev->irq.stat_regs.evergreen.disp_int & LB_D1_VLINE_INTERRUPT)
+ WREG32(VLINE_STATUS + EVERGREEN_CRTC0_REGISTER_OFFSET, VLINE_ACK);
+-
+ if (rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VBLANK_INTERRUPT)
+ WREG32(VBLANK_STATUS + EVERGREEN_CRTC1_REGISTER_OFFSET, VBLANK_ACK);
+ if (rdev->irq.stat_regs.evergreen.disp_int_cont & LB_D2_VLINE_INTERRUPT)
+ WREG32(VLINE_STATUS + EVERGREEN_CRTC1_REGISTER_OFFSET, VLINE_ACK);
+
+- if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT)
+- WREG32(VBLANK_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET, VBLANK_ACK);
+- if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VLINE_INTERRUPT)
+- WREG32(VLINE_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET, VLINE_ACK);
+-
+- if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT)
+- WREG32(VBLANK_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET, VBLANK_ACK);
+- if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VLINE_INTERRUPT)
+- WREG32(VLINE_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET, VLINE_ACK);
+-
+- if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT)
+- WREG32(VBLANK_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET, VBLANK_ACK);
+- if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VLINE_INTERRUPT)
+- WREG32(VLINE_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET, VLINE_ACK);
+-
+- if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT)
+- WREG32(VBLANK_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET, VBLANK_ACK);
+- if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VLINE_INTERRUPT)
+- WREG32(VLINE_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET, VLINE_ACK);
++ if (rdev->num_crtc >= 4) {
++ if (rdev->irq.stat_regs.evergreen.d3grph_int & GRPH_PFLIP_INT_OCCURRED)
++ WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
++ if (rdev->irq.stat_regs.evergreen.d4grph_int & GRPH_PFLIP_INT_OCCURRED)
++ WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
++ if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VBLANK_INTERRUPT)
++ WREG32(VBLANK_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET, VBLANK_ACK);
++ if (rdev->irq.stat_regs.evergreen.disp_int_cont2 & LB_D3_VLINE_INTERRUPT)
++ WREG32(VLINE_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET, VLINE_ACK);
++ if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VBLANK_INTERRUPT)
++ WREG32(VBLANK_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET, VBLANK_ACK);
++ if (rdev->irq.stat_regs.evergreen.disp_int_cont3 & LB_D4_VLINE_INTERRUPT)
++ WREG32(VLINE_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET, VLINE_ACK);
++ }
++
++ if (rdev->num_crtc >= 6) {
++ if (rdev->irq.stat_regs.evergreen.d5grph_int & GRPH_PFLIP_INT_OCCURRED)
++ WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
++ if (rdev->irq.stat_regs.evergreen.d6grph_int & GRPH_PFLIP_INT_OCCURRED)
++ WREG32(GRPH_INT_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET, GRPH_PFLIP_INT_CLEAR);
++ if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VBLANK_INTERRUPT)
++ WREG32(VBLANK_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET, VBLANK_ACK);
++ if (rdev->irq.stat_regs.evergreen.disp_int_cont4 & LB_D5_VLINE_INTERRUPT)
++ WREG32(VLINE_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET, VLINE_ACK);
++ if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VBLANK_INTERRUPT)
++ WREG32(VBLANK_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET, VBLANK_ACK);
++ if (rdev->irq.stat_regs.evergreen.disp_int_cont5 & LB_D6_VLINE_INTERRUPT)
++ WREG32(VLINE_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET, VLINE_ACK);
++ }
+
+ if (rdev->irq.stat_regs.evergreen.disp_int & DC_HPD1_INTERRUPT) {
+ tmp = RREG32(DC_HPD1_INT_CONTROL);
diff --git a/queue-2.6.39/drm-radeon-kms-fix-backend-map-typo-on-juniper.patch b/queue-2.6.39/drm-radeon-kms-fix-backend-map-typo-on-juniper.patch
new file mode 100644
index 0000000000..269a8f0225
--- /dev/null
+++ b/queue-2.6.39/drm-radeon-kms-fix-backend-map-typo-on-juniper.patch
@@ -0,0 +1,30 @@
+From 9a4a0b9c9fa6ad9902f49801d7b770462b69c4d3 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher@gmail.com>
+Date: Mon, 11 Jul 2011 19:45:32 +0000
+Subject: drm/radeon/kms: fix backend map typo on juniper
+
+From: Alex Deucher <alexdeucher@gmail.com>
+
+commit 9a4a0b9c9fa6ad9902f49801d7b770462b69c4d3 upstream.
+
+Don't enable backends that don't exist.
+
+Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/radeon/evergreen.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/radeon/evergreen.c
++++ b/drivers/gpu/drm/radeon/evergreen.c
+@@ -1900,7 +1900,7 @@ static void evergreen_gpu_init(struct ra
+ gb_backend_map = 0x66442200;
+ break;
+ case CHIP_JUNIPER:
+- gb_backend_map = 0x00006420;
++ gb_backend_map = 0x00002200;
+ break;
+ default:
+ gb_backend_map =
diff --git a/queue-2.6.39/drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch b/queue-2.6.39/drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch
index 2787c3af67..463f5a2cce 100644
--- a/queue-2.6.39/drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch
+++ b/queue-2.6.39/drm-radeon-kms-fix-typo-in-evergreen-disp-int-status.patch
@@ -1,8 +1,7 @@
From 37cba6c6f4687e694ac6e3adcf2c2b2974aa3aae Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeucher@gmail.com>
Date: Wed, 6 Jul 2011 19:37:47 +0000
-Subject: drm/radeon/kms: fix typo in evergreen disp int status
- register
+Subject: drm/radeon/kms: fix typo in evergreen disp int status register
From: Alex Deucher <alexdeucher@gmail.com>
diff --git a/queue-2.6.39/firewire-ohci-do-not-bind-to-pinnacle-cards-avert-panic.patch b/queue-2.6.39/firewire-ohci-do-not-bind-to-pinnacle-cards-avert-panic.patch
new file mode 100644
index 0000000000..b197765af0
--- /dev/null
+++ b/queue-2.6.39/firewire-ohci-do-not-bind-to-pinnacle-cards-avert-panic.patch
@@ -0,0 +1,45 @@
+From 7f7e37115a8b6724f26d0637a04e1d35e3c59717 Mon Sep 17 00:00:00 2001
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Date: Sun, 10 Jul 2011 00:23:03 +0200
+Subject: firewire: ohci: do not bind to Pinnacle cards, avert panic
+
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+
+commit 7f7e37115a8b6724f26d0637a04e1d35e3c59717 upstream.
+
+When firewire-ohci is bound to a Pinnacle MovieBoard, eventually a
+"Register access failure" is logged and an interrupt storm or a kernel
+panic happens. https://bugzilla.kernel.org/show_bug.cgi?id=36622
+
+Until this is sorted out (if that is going to succeed at all), let's
+just prevent firewire-ohci from touching these devices.
+
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/firewire/ohci.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/firewire/ohci.c
++++ b/drivers/firewire/ohci.c
+@@ -264,6 +264,7 @@ static char ohci_driver_name[] = KBUILD_
+ #define PCI_DEVICE_ID_AGERE_FW643 0x5901
+ #define PCI_DEVICE_ID_JMICRON_JMB38X_FW 0x2380
+ #define PCI_DEVICE_ID_TI_TSB12LV22 0x8009
++#define PCI_VENDOR_ID_PINNACLE_SYSTEMS 0x11bd
+
+ #define QUIRK_CYCLE_TIMER 1
+ #define QUIRK_RESET_PACKET 2
+@@ -3170,6 +3171,11 @@ static int __devinit pci_probe(struct pc
+ int i, err;
+ size_t size;
+
++ if (dev->vendor == PCI_VENDOR_ID_PINNACLE_SYSTEMS) {
++ dev_err(&dev->dev, "Pinnacle MovieBoard is not yet supported\n");
++ return -ENOSYS;
++ }
++
+ ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
+ if (ohci == NULL) {
+ err = -ENOMEM;
diff --git a/queue-2.6.39/fs-partitions-efi.c-corrupted-guid-partition-tables-can-cause-kernel-oops.patch b/queue-2.6.39/fs-partitions-efi.c-corrupted-guid-partition-tables-can-cause-kernel-oops.patch
new file mode 100644
index 0000000000..06de053338
--- /dev/null
+++ b/queue-2.6.39/fs-partitions-efi.c-corrupted-guid-partition-tables-can-cause-kernel-oops.patch
@@ -0,0 +1,61 @@
+From 3eb8e74ec72736b9b9d728bad30484ec89c91dde Mon Sep 17 00:00:00 2001
+From: Timo Warns <Warns@pre-sense.de>
+Date: Thu, 26 May 2011 16:25:57 -0700
+Subject: fs/partitions/efi.c: corrupted GUID partition tables can cause kernel oops
+
+From: Timo Warns <Warns@pre-sense.de>
+
+commit 3eb8e74ec72736b9b9d728bad30484ec89c91dde upstream.
+
+The kernel automatically evaluates partition tables of storage devices.
+The code for evaluating GUID partitions (in fs/partitions/efi.c) contains
+a bug that causes a kernel oops on certain corrupted GUID partition
+tables.
+
+This bug has security impacts, because it allows, for example, to
+prepare a storage device that crashes a kernel subsystem upon connecting
+the device (e.g., a "USB Stick of (Partial) Death").
+
+ crc = efi_crc32((const unsigned char *) (*gpt), le32_to_cpu((*gpt)->header_size));
+
+computes a CRC32 checksum over gpt covering (*gpt)->header_size bytes.
+There is no validation of (*gpt)->header_size before the efi_crc32 call.
+
+A corrupted partition table may have large values for (*gpt)->header_size.
+ In this case, the CRC32 computation access memory beyond the memory
+allocated for gpt, which may cause a kernel heap overflow.
+
+Validate value of GUID partition table header size.
+
+[akpm@linux-foundation.org: fix layout and indenting]
+Signed-off-by: Timo Warns <warns@pre-sense.de>
+Cc: Matt Domsch <Matt_Domsch@dell.com>
+Cc: Eugene Teo <eugeneteo@kernel.sg>
+Cc: Dave Jones <davej@codemonkey.org.uk>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Moritz Muehlenhoff <jmm@debian.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/partitions/efi.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/fs/partitions/efi.c
++++ b/fs/partitions/efi.c
+@@ -310,6 +310,15 @@ static int is_gpt_valid(struct parsed_pa
+ goto fail;
+ }
+
++ /* Check the GUID Partition Table header size */
++ if (le32_to_cpu((*gpt)->header_size) >
++ bdev_logical_block_size(state->bdev)) {
++ pr_debug("GUID Partition Table Header size is wrong: %u > %u\n",
++ le32_to_cpu((*gpt)->header_size),
++ bdev_logical_block_size(state->bdev));
++ goto fail;
++ }
++
+ /* Check the GUID Partition Table CRC */
+ origcrc = le32_to_cpu((*gpt)->header_crc32);
+ (*gpt)->header_crc32 = 0;
diff --git a/queue-2.6.39/gfs2-make-sure-fallocate-bytes-is-a-multiple-of-blksize.patch b/queue-2.6.39/gfs2-make-sure-fallocate-bytes-is-a-multiple-of-blksize.patch
new file mode 100644
index 0000000000..8ef00ea65f
--- /dev/null
+++ b/queue-2.6.39/gfs2-make-sure-fallocate-bytes-is-a-multiple-of-blksize.patch
@@ -0,0 +1,66 @@
+From 6905d9e4dda6112f007e9090bca80507da158e63 Mon Sep 17 00:00:00 2001
+From: Benjamin Marzinski <bmarzins@redhat.com>
+Date: Tue, 26 Apr 2011 01:13:24 -0500
+Subject: GFS2: make sure fallocate bytes is a multiple of blksize
+
+From: Benjamin Marzinski <bmarzins@redhat.com>
+
+commit 6905d9e4dda6112f007e9090bca80507da158e63 upstream.
+
+The GFS2 fallocate code chooses a target size to for allocating chunks of
+space. Whenever it can't find any resource groups with enough space free, it
+halves its target. Since this target is in bytes, eventually it will no longer
+be a multiple of blksize. As long as there is more space available in the
+resource group than the target, this isn't a problem, since gfs2 will use the
+actual space available, which is always a multiple of blksize. However,
+when gfs couldn't fallocate a bigger chunk than the target, it was using the
+non-blksize aligned number. This caused a BUG in later code that required
+blksize aligned offsets. GFS2 now ensures that bytes is always a multiple of
+blksize
+
+Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
+Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/gfs2/file.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- a/fs/gfs2/file.c
++++ b/fs/gfs2/file.c
+@@ -826,6 +826,7 @@ static long gfs2_fallocate(struct file *
+ loff_t bytes, max_bytes;
+ struct gfs2_alloc *al;
+ int error;
++ loff_t bsize_mask = ~((loff_t)sdp->sd_sb.sb_bsize - 1);
+ loff_t next = (offset + len - 1) >> sdp->sd_sb.sb_bsize_shift;
+ next = (next + 1) << sdp->sd_sb.sb_bsize_shift;
+
+@@ -833,13 +834,15 @@ static long gfs2_fallocate(struct file *
+ if (mode & ~FALLOC_FL_KEEP_SIZE)
+ return -EOPNOTSUPP;
+
+- offset = (offset >> sdp->sd_sb.sb_bsize_shift) <<
+- sdp->sd_sb.sb_bsize_shift;
++ offset &= bsize_mask;
+
+ len = next - offset;
+ bytes = sdp->sd_max_rg_data * sdp->sd_sb.sb_bsize / 2;
+ if (!bytes)
+ bytes = UINT_MAX;
++ bytes &= bsize_mask;
++ if (bytes == 0)
++ bytes = sdp->sd_sb.sb_bsize;
+
+ gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &ip->i_gh);
+ error = gfs2_glock_nq(&ip->i_gh);
+@@ -870,6 +873,9 @@ retry:
+ if (error) {
+ if (error == -ENOSPC && bytes > sdp->sd_sb.sb_bsize) {
+ bytes >>= 1;
++ bytes &= bsize_mask;
++ if (bytes == 0)
++ bytes = sdp->sd_sb.sb_bsize;
+ goto retry;
+ }
+ goto out_qunlock;
diff --git a/queue-2.6.39/hwmon-lm95241-fix-chip-detection-code.patch b/queue-2.6.39/hwmon-lm95241-fix-chip-detection-code.patch
new file mode 100644
index 0000000000..61b07e1beb
--- /dev/null
+++ b/queue-2.6.39/hwmon-lm95241-fix-chip-detection-code.patch
@@ -0,0 +1,34 @@
+From 27739e694a3c34b5e371575d74e500d60111c689 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+Date: Mon, 27 Jun 2011 11:22:46 -0700
+Subject: hwmon: (lm95241) Fix chip detection code
+
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+
+commit 27739e694a3c34b5e371575d74e500d60111c689 upstream.
+
+The LM95241 driver accepts every chip ID equal to or larger than 0xA4 as its
+own, and other chips such as LM95245 use chip IDs in the accepted ID range.
+This results in false chip detection.
+
+Fix problem by accepting only the known LM95241 chip ID.
+
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/lm95241.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/hwmon/lm95241.c
++++ b/drivers/hwmon/lm95241.c
+@@ -339,7 +339,7 @@ static int lm95241_detect(struct i2c_cli
+ if ((i2c_smbus_read_byte_data(new_client, LM95241_REG_R_MAN_ID)
+ == MANUFACTURER_ID)
+ && (i2c_smbus_read_byte_data(new_client, LM95241_REG_R_CHIP_ID)
+- >= DEFAULT_REVISION)) {
++ == DEFAULT_REVISION)) {
+ name = DEVNAME;
+ } else {
+ dev_dbg(&adapter->dev, "LM95241 detection failed at 0x%02x\n",
diff --git a/queue-2.6.39/hwmon-lm95241-fix-negative-temperature-results.patch b/queue-2.6.39/hwmon-lm95241-fix-negative-temperature-results.patch
new file mode 100644
index 0000000000..249614a9fe
--- /dev/null
+++ b/queue-2.6.39/hwmon-lm95241-fix-negative-temperature-results.patch
@@ -0,0 +1,63 @@
+From 0c2a40e2fe4f4af0410f57e84b95b817ec15aa70 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+Date: Thu, 30 Jun 2011 02:09:37 -0700
+Subject: hwmon: (lm95241) Fix negative temperature results
+
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+
+commit 0c2a40e2fe4f4af0410f57e84b95b817ec15aa70 upstream.
+
+Negative temperatures were returned in degrees C instead of milli-Degrees C.
+Also, negative temperatures were reported for remote temperature sensors even
+if the chip was configured for positive-only results.
+
+Fix by detecting temperature modes, and by treating negative temperatures
+similar to positive temperatures, with appropriate sign extension.
+
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/lm95241.c | 20 ++++++++++++++------
+ 1 file changed, 14 insertions(+), 6 deletions(-)
+
+--- a/drivers/hwmon/lm95241.c
++++ b/drivers/hwmon/lm95241.c
+@@ -98,11 +98,16 @@ struct lm95241_data {
+ };
+
+ /* Conversions */
+-static int TempFromReg(u8 val_h, u8 val_l)
++static int temp_from_reg_signed(u8 val_h, u8 val_l)
+ {
+- if (val_h & 0x80)
+- return val_h - 0x100;
+- return val_h * 1000 + val_l * 1000 / 256;
++ s16 val_hl = (val_h << 8) | val_l;
++ return val_hl * 1000 / 256;
++}
++
++static int temp_from_reg_unsigned(u8 val_h, u8 val_l)
++{
++ u16 val_hl = (val_h << 8) | val_l;
++ return val_hl * 1000 / 256;
+ }
+
+ static struct lm95241_data *lm95241_update_device(struct device *dev)
+@@ -135,10 +140,13 @@ static ssize_t show_input(struct device
+ char *buf)
+ {
+ struct lm95241_data *data = lm95241_update_device(dev);
++ int index = to_sensor_dev_attr(attr)->index;
+
+ return snprintf(buf, PAGE_SIZE - 1, "%d\n",
+- TempFromReg(data->temp[to_sensor_dev_attr(attr)->index],
+- data->temp[to_sensor_dev_attr(attr)->index + 1]));
++ index == 0 || (data->config & (1 << (index / 2))) ?
++ temp_from_reg_signed(data->temp[index], data->temp[index + 1]) :
++ temp_from_reg_unsigned(data->temp[index],
++ data->temp[index + 1]));
+ }
+
+ static ssize_t show_type(struct device *dev, struct device_attribute *attr,
diff --git a/queue-2.6.39/hwmon-pmbus-auto-detect-temp2-and-temp3.patch b/queue-2.6.39/hwmon-pmbus-auto-detect-temp2-and-temp3.patch
new file mode 100644
index 0000000000..a321f99d6a
--- /dev/null
+++ b/queue-2.6.39/hwmon-pmbus-auto-detect-temp2-and-temp3.patch
@@ -0,0 +1,32 @@
+From 0e502ec889d33bfcb348e420d7e105bc61c45eb4 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+Date: Thu, 30 Jun 2011 06:57:41 -0700
+Subject: hwmon: (pmbus) Auto-detect temp2 and temp3 registers/attributes
+
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+
+commit 0e502ec889d33bfcb348e420d7e105bc61c45eb4 upstream.
+
+Additional temperature attribute support is easy to detect, so do it.
+
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/pmbus.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/hwmon/pmbus.c
++++ b/drivers/hwmon/pmbus.c
+@@ -63,6 +63,10 @@ static void pmbus_find_sensor_groups(str
+ PMBUS_STATUS_TEMPERATURE))
+ info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
+ }
++ if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_2))
++ info->func[0] |= PMBUS_HAVE_TEMP2;
++ if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_3))
++ info->func[0] |= PMBUS_HAVE_TEMP3;
+
+ /* Sensors detected on all pages */
+ for (page = 0; page < info->pages; page++) {
diff --git a/queue-2.6.39/hwmon-pmbus-drop-check-for-pmbus-revision-register-in.patch b/queue-2.6.39/hwmon-pmbus-drop-check-for-pmbus-revision-register-in.patch
new file mode 100644
index 0000000000..fa81659f2d
--- /dev/null
+++ b/queue-2.6.39/hwmon-pmbus-drop-check-for-pmbus-revision-register-in.patch
@@ -0,0 +1,40 @@
+From 7f2c0662e5cfd05f12ca49109e8f787bf2d87b66 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+Date: Sat, 25 Jun 2011 12:42:14 -0700
+Subject: hwmon: (pmbus) Drop check for PMBus revision register in probe function
+
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+
+commit 7f2c0662e5cfd05f12ca49109e8f787bf2d87b66 upstream.
+
+Some PMBus devices do not support the PMBus revision register, so don't check
+if it exists.
+
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/pmbus_core.c | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+--- a/drivers/hwmon/pmbus_core.c
++++ b/drivers/hwmon/pmbus_core.c
+@@ -1518,14 +1518,9 @@ int pmbus_do_probe(struct i2c_client *cl
+ i2c_set_clientdata(client, data);
+ mutex_init(&data->update_lock);
+
+- /*
+- * Bail out if status register or PMBus revision register
+- * does not exist.
+- */
+- if (i2c_smbus_read_byte_data(client, PMBUS_STATUS_BYTE) < 0
+- || i2c_smbus_read_byte_data(client, PMBUS_REVISION) < 0) {
+- dev_err(&client->dev,
+- "Status or revision register not found\n");
++ /* Bail out if PMBus status register does not exist. */
++ if (i2c_smbus_read_byte_data(client, PMBUS_STATUS_BYTE) < 0) {
++ dev_err(&client->dev, "PMBus status register not found\n");
+ ret = -ENODEV;
+ goto out_data;
+ }
diff --git a/queue-2.6.39/hwmon-pmbus-improve-auto-detection-of-temperature-status.patch b/queue-2.6.39/hwmon-pmbus-improve-auto-detection-of-temperature-status.patch
new file mode 100644
index 0000000000..0a30e32cf9
--- /dev/null
+++ b/queue-2.6.39/hwmon-pmbus-improve-auto-detection-of-temperature-status.patch
@@ -0,0 +1,45 @@
+From 22e6b2312d221376dcd98a8afb0f314b62d33a91 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+Date: Sun, 3 Jul 2011 13:08:03 -0700
+Subject: hwmon: (pmbus) Improve auto-detection of temperature status register
+
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+
+commit 22e6b2312d221376dcd98a8afb0f314b62d33a91 upstream.
+
+It is possible that a PMBus device supports the READ_TEMPERATURE2 and/or
+READ_TEMPERATURE3 registers but does not support READ_TEMPERATURE1.
+Improve temperature status register detection to address this condition.
+
+Reported-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+diff --git a/drivers/hwmon/pmbus.c b/drivers/hwmon/pmbus.c
+index 931d940..9b1f0c3 100644
+--- a/drivers/hwmon/pmbus.c
++++ b/drivers/hwmon/pmbus.c
+@@ -59,16 +59,17 @@ static void pmbus_find_sensor_groups(struct i2c_client *client,
+ if (pmbus_check_byte_register(client, 0, PMBUS_STATUS_FAN_34))
+ info->func[0] |= PMBUS_HAVE_STATUS_FAN34;
+ }
+- if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_1)) {
++ if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_1))
+ info->func[0] |= PMBUS_HAVE_TEMP;
+- if (pmbus_check_byte_register(client, 0,
+- PMBUS_STATUS_TEMPERATURE))
+- info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
+- }
+ if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_2))
+ info->func[0] |= PMBUS_HAVE_TEMP2;
+ if (pmbus_check_word_register(client, 0, PMBUS_READ_TEMPERATURE_3))
+ info->func[0] |= PMBUS_HAVE_TEMP3;
++ if (info->func[0] & (PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2
++ | PMBUS_HAVE_TEMP3)
++ && pmbus_check_byte_register(client, 0,
++ PMBUS_STATUS_TEMPERATURE))
++ info->func[0] |= PMBUS_HAVE_STATUS_TEMP;
+
+ /* Sensors detected on all pages */
+ for (page = 0; page < info->pages; page++) {
diff --git a/queue-2.6.39/hwmon-pmbus-improve-fan-detection.patch b/queue-2.6.39/hwmon-pmbus-improve-fan-detection.patch
new file mode 100644
index 0000000000..e2d17f76c1
--- /dev/null
+++ b/queue-2.6.39/hwmon-pmbus-improve-fan-detection.patch
@@ -0,0 +1,40 @@
+From 81ae68142a0483b3791cba99eab268859858f508 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+Date: Thu, 30 Jun 2011 06:54:05 -0700
+Subject: hwmon: (pmbus) Improve fan detection
+
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+
+commit 81ae68142a0483b3791cba99eab268859858f508 upstream.
+
+Some PMBus devices return no error when reading fan speed registers, but don't
+really support fans. Strengthen fan detection by also checking if fan
+configuration registers exist.
+
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/pmbus.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/hwmon/pmbus.c
++++ b/drivers/hwmon/pmbus.c
+@@ -47,12 +47,14 @@ static void pmbus_find_sensor_groups(str
+ if (info->func[0]
+ && pmbus_check_byte_register(client, 0, PMBUS_STATUS_INPUT))
+ info->func[0] |= PMBUS_HAVE_STATUS_INPUT;
+- if (pmbus_check_word_register(client, 0, PMBUS_READ_FAN_SPEED_1)) {
++ if (pmbus_check_byte_register(client, 0, PMBUS_FAN_CONFIG_12) &&
++ pmbus_check_word_register(client, 0, PMBUS_READ_FAN_SPEED_1)) {
+ info->func[0] |= PMBUS_HAVE_FAN12;
+ if (pmbus_check_byte_register(client, 0, PMBUS_STATUS_FAN_12))
+ info->func[0] |= PMBUS_HAVE_STATUS_FAN12;
+ }
+- if (pmbus_check_word_register(client, 0, PMBUS_READ_FAN_SPEED_3)) {
++ if (pmbus_check_byte_register(client, 0, PMBUS_FAN_CONFIG_34) &&
++ pmbus_check_word_register(client, 0, PMBUS_READ_FAN_SPEED_3)) {
+ info->func[0] |= PMBUS_HAVE_FAN34;
+ if (pmbus_check_byte_register(client, 0, PMBUS_STATUS_FAN_34))
+ info->func[0] |= PMBUS_HAVE_STATUS_FAN34;
diff --git a/queue-2.6.39/hwmon-pmbus-use-long-variables-for-register-to-data.patch b/queue-2.6.39/hwmon-pmbus-use-long-variables-for-register-to-data.patch
new file mode 100644
index 0000000000..20ea2e000d
--- /dev/null
+++ b/queue-2.6.39/hwmon-pmbus-use-long-variables-for-register-to-data.patch
@@ -0,0 +1,87 @@
+From f450c1504d3ff6aace3927c805bdea0ac0669efd Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+Date: Sun, 10 Jul 2011 19:31:29 -0700
+Subject: hwmon: (pmbus) Use long variables for register to data conversions
+
+From: Guenter Roeck <guenter.roeck@ericsson.com>
+
+commit f450c1504d3ff6aace3927c805bdea0ac0669efd upstream.
+
+Using integer variable types for register to data conversions can cause
+overflows especially for power calculations, which are in microwatt.
+Use long variables instead.
+
+Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/pmbus_core.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+--- a/drivers/hwmon/pmbus_core.c
++++ b/drivers/hwmon/pmbus_core.c
+@@ -355,8 +355,8 @@ static struct pmbus_data *pmbus_update_d
+ * Convert linear sensor values to milli- or micro-units
+ * depending on sensor type.
+ */
+-static int pmbus_reg2data_linear(struct pmbus_data *data,
+- struct pmbus_sensor *sensor)
++static long pmbus_reg2data_linear(struct pmbus_data *data,
++ struct pmbus_sensor *sensor)
+ {
+ s16 exponent;
+ s32 mantissa;
+@@ -390,15 +390,15 @@ static int pmbus_reg2data_linear(struct
+ else
+ val >>= -exponent;
+
+- return (int)val;
++ return val;
+ }
+
+ /*
+ * Convert direct sensor values to milli- or micro-units
+ * depending on sensor type.
+ */
+-static int pmbus_reg2data_direct(struct pmbus_data *data,
+- struct pmbus_sensor *sensor)
++static long pmbus_reg2data_direct(struct pmbus_data *data,
++ struct pmbus_sensor *sensor)
+ {
+ long val = (s16) sensor->data;
+ long m, b, R;
+@@ -433,12 +433,12 @@ static int pmbus_reg2data_direct(struct
+ R++;
+ }
+
+- return (int)((val - b) / m);
++ return (val - b) / m;
+ }
+
+-static int pmbus_reg2data(struct pmbus_data *data, struct pmbus_sensor *sensor)
++static long pmbus_reg2data(struct pmbus_data *data, struct pmbus_sensor *sensor)
+ {
+- int val;
++ long val;
+
+ if (data->info->direct[sensor->class])
+ val = pmbus_reg2data_direct(data, sensor);
+@@ -612,7 +612,7 @@ static int pmbus_get_boolean(struct pmbu
+ if (!s1 && !s2)
+ *val = !!regval;
+ else {
+- int v1, v2;
++ long v1, v2;
+ struct pmbus_sensor *sensor1, *sensor2;
+
+ sensor1 = &data->sensors[s1];
+@@ -654,7 +654,7 @@ static ssize_t pmbus_show_sensor(struct
+ if (sensor->data < 0)
+ return sensor->data;
+
+- return snprintf(buf, PAGE_SIZE, "%d\n", pmbus_reg2data(data, sensor));
++ return snprintf(buf, PAGE_SIZE, "%ld\n", pmbus_reg2data(data, sensor));
+ }
+
+ static ssize_t pmbus_set_sensor(struct device *dev,
diff --git a/queue-2.6.39/mac80211-fix-tkip-replay-vulnerability.patch b/queue-2.6.39/mac80211-fix-tkip-replay-vulnerability.patch
new file mode 100644
index 0000000000..07d27ddc16
--- /dev/null
+++ b/queue-2.6.39/mac80211-fix-tkip-replay-vulnerability.patch
@@ -0,0 +1,92 @@
+From 34459512ffa7236c849466e3bd604801389734e1 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Thu, 7 Jul 2011 18:24:54 +0200
+Subject: mac80211: fix TKIP replay vulnerability
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit 34459512ffa7236c849466e3bd604801389734e1 upstream.
+
+Unlike CCMP, the presence or absence of the QoS
+field doesn't change the encryption, only the
+TID is used. When no QoS field is present, zero
+is used as the TID value. This means that it is
+possible for an attacker to take a QoS packet
+with TID 0 and replay it as a non-QoS packet.
+
+Unfortunately, mac80211 uses different IVs for
+checking the validity of the packet's TKIP IV
+when it checks TID 0 and when it checks non-QoS
+packets. This means it is vulnerable to this
+replay attack.
+
+To fix this, use the same replay counter for
+TID 0 and non-QoS packets by overriding the
+rx->queue value to 0 if it is 16 (non-QoS).
+
+This is a minimal fix for now. I caused this
+issue in
+
+commit 1411f9b531f0a910cd1c85a337737c1e6ffbae6a
+Author: Johannes Berg <johannes@sipsolutions.net>
+Date: Thu Jul 10 10:11:02 2008 +0200
+
+ mac80211: fix RX sequence number check
+
+while fixing a sequence number issue (there,
+a separate counter needs to be used).
+
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/mac80211/wpa.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+--- a/net/mac80211/wpa.c
++++ b/net/mac80211/wpa.c
+@@ -86,6 +86,11 @@ ieee80211_rx_h_michael_mic_verify(struct
+ struct sk_buff *skb = rx->skb;
+ struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
++ int queue = rx->queue;
++
++ /* otherwise, TKIP is vulnerable to TID 0 vs. non-QoS replays */
++ if (rx->queue == NUM_RX_DATA_QUEUES - 1)
++ queue = 0;
+
+ /* No way to verify the MIC if the hardware stripped it */
+ if (status->flag & RX_FLAG_MMIC_STRIPPED)
+@@ -119,8 +124,8 @@ ieee80211_rx_h_michael_mic_verify(struct
+ skb_trim(skb, skb->len - MICHAEL_MIC_LEN);
+
+ /* update IV in key information to be able to detect replays */
+- rx->key->u.tkip.rx[rx->queue].iv32 = rx->tkip_iv32;
+- rx->key->u.tkip.rx[rx->queue].iv16 = rx->tkip_iv16;
++ rx->key->u.tkip.rx[queue].iv32 = rx->tkip_iv32;
++ rx->key->u.tkip.rx[queue].iv16 = rx->tkip_iv16;
+
+ return RX_CONTINUE;
+ }
+@@ -201,6 +206,11 @@ ieee80211_crypto_tkip_decrypt(struct iee
+ struct ieee80211_key *key = rx->key;
+ struct sk_buff *skb = rx->skb;
+ struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
++ int queue = rx->queue;
++
++ /* otherwise, TKIP is vulnerable to TID 0 vs. non-QoS replays */
++ if (rx->queue == NUM_RX_DATA_QUEUES - 1)
++ queue = 0;
+
+ hdrlen = ieee80211_hdrlen(hdr->frame_control);
+
+@@ -221,7 +231,7 @@ ieee80211_crypto_tkip_decrypt(struct iee
+ res = ieee80211_tkip_decrypt_data(rx->local->wep_rx_tfm,
+ key, skb->data + hdrlen,
+ skb->len - hdrlen, rx->sta->sta.addr,
+- hdr->addr1, hwaccel, rx->queue,
++ hdr->addr1, hwaccel, queue,
+ &rx->tkip_iv32,
+ &rx->tkip_iv16);
+ if (res != TKIP_DECRYPT_OK)
diff --git a/queue-2.6.39/mm-vmscan-correct-check-for-kswapd-sleeping-in.patch b/queue-2.6.39/mm-vmscan-correct-check-for-kswapd-sleeping-in.patch
index ad6230fd01..4daa57e6bb 100644
--- a/queue-2.6.39/mm-vmscan-correct-check-for-kswapd-sleeping-in.patch
+++ b/queue-2.6.39/mm-vmscan-correct-check-for-kswapd-sleeping-in.patch
@@ -1,8 +1,7 @@
From 08951e545918c1594434d000d88a7793e2452a9b Mon Sep 17 00:00:00 2001
From: Mel Gorman <mgorman@suse.de>
Date: Fri, 8 Jul 2011 15:39:36 -0700
-Subject: mm: vmscan: correct check for kswapd sleeping in
- sleeping_prematurely
+Subject: mm: vmscan: correct check for kswapd sleeping in sleeping_prematurely
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
diff --git a/queue-2.6.39/mm-vmscan-evaluate-the-watermarks-against-the-correct.patch b/queue-2.6.39/mm-vmscan-evaluate-the-watermarks-against-the-correct.patch
index 5410e291d6..f1d82d8eb4 100644
--- a/queue-2.6.39/mm-vmscan-evaluate-the-watermarks-against-the-correct.patch
+++ b/queue-2.6.39/mm-vmscan-evaluate-the-watermarks-against-the-correct.patch
@@ -1,8 +1,7 @@
From da175d06b437093f93109ba9e5efbe44dfdf9409 Mon Sep 17 00:00:00 2001
From: Mel Gorman <mgorman@suse.de>
Date: Fri, 8 Jul 2011 15:39:39 -0700
-Subject: mm: vmscan: evaluate the watermarks against the correct
- classzone
+Subject: mm: vmscan: evaluate the watermarks against the correct classzone
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
diff --git a/queue-2.6.39/nfsv4.1-update-nfs4_fattr_bitmap_maxsz.patch b/queue-2.6.39/nfsv4.1-update-nfs4_fattr_bitmap_maxsz.patch
new file mode 100644
index 0000000000..1a4593e9f2
--- /dev/null
+++ b/queue-2.6.39/nfsv4.1-update-nfs4_fattr_bitmap_maxsz.patch
@@ -0,0 +1,31 @@
+From e5012d1f3861d18c7f3814e757c1c3ab3741dbcd Mon Sep 17 00:00:00 2001
+From: Andy Adamson <andros@netapp.com>
+Date: Mon, 11 Jul 2011 17:17:42 -0400
+Subject: NFSv4.1: update nfs4_fattr_bitmap_maxsz
+
+From: Andy Adamson <andros@netapp.com>
+
+commit e5012d1f3861d18c7f3814e757c1c3ab3741dbcd upstream.
+
+Attribute IDs assigned in RFC 5661 now require three bitmaps.
+Fixes hitting a BUG_ON in xdr_shrink_bufhead when getting ACLs.
+
+Signed-off-by: Andy Adamson <andros@netapp.com>
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/nfs/nfs4xdr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/nfs/nfs4xdr.c
++++ b/fs/nfs/nfs4xdr.c
+@@ -91,7 +91,7 @@ static int nfs4_stat_to_errno(int);
+ #define encode_getfh_maxsz (op_encode_hdr_maxsz)
+ #define decode_getfh_maxsz (op_decode_hdr_maxsz + 1 + \
+ ((3+NFS4_FHSIZE) >> 2))
+-#define nfs4_fattr_bitmap_maxsz 3
++#define nfs4_fattr_bitmap_maxsz 4
+ #define encode_getattr_maxsz (op_encode_hdr_maxsz + nfs4_fattr_bitmap_maxsz)
+ #define nfs4_name_maxsz (1 + ((3 + NFS4_MAXNAMLEN) >> 2))
+ #define nfs4_path_maxsz (1 + ((3 + NFS4_MAXPATHLEN) >> 2))
diff --git a/queue-2.6.39/pvrusb2-fix-g-s_tuner-support.patch b/queue-2.6.39/pvrusb2-fix-g-s_tuner-support.patch
new file mode 100644
index 0000000000..0634a2c84f
--- /dev/null
+++ b/queue-2.6.39/pvrusb2-fix-g-s_tuner-support.patch
@@ -0,0 +1,45 @@
+From 50e9efd60b213ce43ad6979bfc18e25eec2d8413 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hans.verkuil@cisco.com>
+Date: Sun, 12 Jun 2011 06:39:52 -0300
+Subject: [media] pvrusb2: fix g/s_tuner support
+
+From: Hans Verkuil <hans.verkuil@cisco.com>
+
+commit 50e9efd60b213ce43ad6979bfc18e25eec2d8413 upstream.
+
+The tuner-core subdev requires that the type field of v4l2_tuner is
+filled in correctly. This is done in v4l2-ioctl.c, but pvrusb2 doesn't
+use that yet, so we have to do it manually based on whether the current
+input is radio or not.
+
+Tested with my pvrusb2.
+
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Acked-by: Mike Isely <isely@pobox.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/pvrusb2/pvrusb2-hdw.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
++++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+@@ -3046,6 +3046,8 @@ static void pvr2_subdev_update(struct pv
+ if (hdw->input_dirty || hdw->audiomode_dirty || hdw->force_dirty) {
+ struct v4l2_tuner vt;
+ memset(&vt, 0, sizeof(vt));
++ vt.type = (hdw->input_val == PVR2_CVAL_INPUT_RADIO) ?
++ V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
+ vt.audmode = hdw->audiomode_val;
+ v4l2_device_call_all(&hdw->v4l2_dev, 0, tuner, s_tuner, &vt);
+ }
+@@ -5171,6 +5173,8 @@ void pvr2_hdw_status_poll(struct pvr2_hd
+ {
+ struct v4l2_tuner *vtp = &hdw->tuner_signal_info;
+ memset(vtp, 0, sizeof(*vtp));
++ vtp->type = (hdw->input_val == PVR2_CVAL_INPUT_RADIO) ?
++ V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
+ hdw->tuner_signal_stale = 0;
+ /* Note: There apparently is no replacement for VIDIOC_CROPCAP
+ using v4l2-subdev - therefore we can't support that AT ALL right
diff --git a/queue-2.6.39/revert-dell-laptop-toggle-the-unsupported-hardware.patch b/queue-2.6.39/revert-dell-laptop-toggle-the-unsupported-hardware.patch
new file mode 100644
index 0000000000..0f3eeeff64
--- /dev/null
+++ b/queue-2.6.39/revert-dell-laptop-toggle-the-unsupported-hardware.patch
@@ -0,0 +1,64 @@
+From be65dde82a4a402e9607c2f306f343bf0912623c Mon Sep 17 00:00:00 2001
+From: Keng-Yu Lin <kengyu@canonical.com>
+Date: Mon, 27 Jun 2011 11:19:03 +0100
+Subject: Revert: "dell-laptop: Toggle the unsupported hardware killswitch"
+
+From: Keng-Yu Lin <kengyu@canonical.com>
+
+commit be65dde82a4a402e9607c2f306f343bf0912623c upstream.
+
+This reverts commit a3d77411e8b2ad661958c1fbee65beb476ec6d70,
+
+as it causes a mess in the wireless rfkill status on some models.
+It is probably a bad idea to toggle the rfkill for all dell models
+without the respect to the claim that it is hardware-controlled.
+
+Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
+Signed-off-by: Matthew Garrett <mjg@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/platform/x86/dell-laptop.c | 24 ++----------------------
+ 1 file changed, 2 insertions(+), 22 deletions(-)
+
+--- a/drivers/platform/x86/dell-laptop.c
++++ b/drivers/platform/x86/dell-laptop.c
+@@ -290,12 +290,9 @@ static int dell_rfkill_set(void *data, b
+ dell_send_request(buffer, 17, 11);
+
+ /* If the hardware switch controls this radio, and the hardware
+- switch is disabled, don't allow changing the software state.
+- If the hardware switch is reported as not supported, always
+- fire the SMI to toggle the killswitch. */
++ switch is disabled, don't allow changing the software state */
+ if ((hwswitch_state & BIT(hwswitch_bit)) &&
+- !(buffer->output[1] & BIT(16)) &&
+- (buffer->output[1] & BIT(0))) {
++ !(buffer->output[1] & BIT(16))) {
+ ret = -EINVAL;
+ goto out;
+ }
+@@ -401,23 +398,6 @@ static const struct file_operations dell
+
+ static void dell_update_rfkill(struct work_struct *ignored)
+ {
+- int status;
+-
+- get_buffer();
+- dell_send_request(buffer, 17, 11);
+- status = buffer->output[1];
+- release_buffer();
+-
+- /* if hardware rfkill is not supported, set it explicitly */
+- if (!(status & BIT(0))) {
+- if (wifi_rfkill)
+- dell_rfkill_set((void *)1, !((status & BIT(17)) >> 17));
+- if (bluetooth_rfkill)
+- dell_rfkill_set((void *)2, !((status & BIT(18)) >> 18));
+- if (wwan_rfkill)
+- dell_rfkill_set((void *)3, !((status & BIT(19)) >> 19));
+- }
+-
+ if (wifi_rfkill)
+ dell_rfkill_query(wifi_rfkill, (void *)1);
+ if (bluetooth_rfkill)
diff --git a/queue-2.6.39/rtlwifi-rtl8192cu-add-new-usb-id-for-netgear-wna1000m.patch b/queue-2.6.39/rtlwifi-rtl8192cu-add-new-usb-id-for-netgear-wna1000m.patch
new file mode 100644
index 0000000000..23951e657a
--- /dev/null
+++ b/queue-2.6.39/rtlwifi-rtl8192cu-add-new-usb-id-for-netgear-wna1000m.patch
@@ -0,0 +1,28 @@
+From 35cbcbc6f39da30c39bc0a1e679ec44506c4eb3d Mon Sep 17 00:00:00 2001
+From: Yoann DI-RUZZA <y.diruzza@lim.eu>
+Date: Fri, 1 Jul 2011 08:47:17 -0500
+Subject: rtlwifi: rtl8192cu: Add new USB ID for Netgear WNA1000M
+
+From: Yoann DI-RUZZA <y.diruzza@lim.eu>
+
+commit 35cbcbc6f39da30c39bc0a1e679ec44506c4eb3d upstream.
+
+Signed-off-by: Yoann DI-RUZZA <y.diruzza@lim.eu>
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+@@ -278,6 +278,7 @@ static struct usb_device_id rtl8192c_usb
+ {RTL_USB_DEVICE(0x06f8, 0xe033, rtl92cu_hal_cfg)}, /*Hercules - Edimax*/
+ {RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/
+ {RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/
++ {RTL_USB_DEVICE(0x0846, 0x9041, rtl92cu_hal_cfg)}, /*NetGear WNA1000M*/
+ {RTL_USB_DEVICE(0x0Df6, 0x0052, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
+ {RTL_USB_DEVICE(0x0eb0, 0x9071, rtl92cu_hal_cfg)}, /*NO Brand - Etop*/
+ /* HP - Lite-On ,8188CUS Slim Combo */
diff --git a/queue-2.6.39/series b/queue-2.6.39/series
index af1360cff3..0a30d405db 100644
--- a/queue-2.6.39/series
+++ b/queue-2.6.39/series
@@ -4,3 +4,39 @@ drm-radeon-kms-fix-typo-in-ih_cntl-swap-bitfield.patch
mm-vmscan-correct-check-for-kswapd-sleeping-in.patch
mm-nommu.c-fix-remap_pfn_range.patch
mm-vmscan-evaluate-the-watermarks-against-the-correct.patch
+hwmon-lm95241-fix-chip-detection-code.patch
+hwmon-lm95241-fix-negative-temperature-results.patch
+hwmon-pmbus-auto-detect-temp2-and-temp3.patch
+hwmon-pmbus-drop-check-for-pmbus-revision-register-in.patch
+hwmon-pmbus-improve-fan-detection.patch
+hwmon-pmbus-use-long-variables-for-register-to-data.patch
+asoc-fix-blackfin-i2s-_pointer-implementation-return-in.patch
+asoc-ensure-we-delay-long-enough-for-wm8994-fll-to-lock.patch
+asoc-ak4642-fixup-snd_soc_update_bits-mask-for-pw_mgmt2.patch
+arm-6989-1-perf-do-not-start-the-pmu-when-no-events-are.patch
+arm-pxa168-correct-nand-pmu-setting.patch
+arm-pxa910-correct-nand-pmu-setting.patch
+arm-pxa-fix-pgsr-register-address-calculation.patch
+firewire-ohci-do-not-bind-to-pinnacle-cards-avert-panic.patch
+revert-dell-laptop-toggle-the-unsupported-hardware.patch
+v4l2-ioctl.c-prefill-tuner-type-for-g_frequency-and.patch
+tuner-core-fix-s_std-and-s_tuner.patch
+tuner-core-fix-tuner_resume-use-t-mode-instead-of-t-type.patch
+hwmon-pmbus-improve-auto-detection-of-temperature-status.patch
+pvrusb2-fix-g-s_tuner-support.patch
+bttv-fix-s_tuner-for-radio.patch
+fs-partitions-efi.c-corrupted-guid-partition-tables-can-cause-kernel-oops.patch
+drm-radeon-kms-fix-backend-map-typo-on-juniper.patch
+nfsv4.1-update-nfs4_fattr_bitmap_maxsz.patch
+mac80211-fix-tkip-replay-vulnerability.patch
+carl9170-add-nec-wl300nu-ag-usbid.patch
+rtlwifi-rtl8192cu-add-new-usb-id-for-netgear-wna1000m.patch
+sunrpc-fix-a-race-between-work-queue-and-rpc_killall_tasks.patch
+sunrpc-fix-use-of-static-variable-in-rpcb_getport_async.patch
+drm-radeon-kms-add-new-ni-pci-ids.patch
+ath9k-fix-tx-throughput-drops-for-ar9003-chips-with-aes.patch
+ath5k-fix-incorrect-use-of-drvdata-in-sysfs-code.patch
+ath5k-fix-incorrect-use-of-drvdata-in-pci-suspend-resume.patch
+drm-radeon-kms-clean-up-multiple-crtc-handling-for.patch
+drm-radeon-fix-oops-in-ttm-reserve-when-pageflipping-v2.patch
+gfs2-make-sure-fallocate-bytes-is-a-multiple-of-blksize.patch
diff --git a/queue-2.6.39/sunrpc-fix-a-race-between-work-queue-and-rpc_killall_tasks.patch b/queue-2.6.39/sunrpc-fix-a-race-between-work-queue-and-rpc_killall_tasks.patch
new file mode 100644
index 0000000000..acee09ce5e
--- /dev/null
+++ b/queue-2.6.39/sunrpc-fix-a-race-between-work-queue-and-rpc_killall_tasks.patch
@@ -0,0 +1,65 @@
+From b55c59892e1f3b6c7d4b9ccffb4263e1486fb990 Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+Date: Wed, 6 Jul 2011 19:58:23 -0400
+Subject: SUNRPC: Fix a race between work-queue and rpc_killall_tasks
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+commit b55c59892e1f3b6c7d4b9ccffb4263e1486fb990 upstream.
+
+Since rpc_killall_tasks may modify the rpc_task's tk_action field
+without any locking, we need to be careful when dereferencing it.
+
+Reported-by: Ben Greear <greearb@candelatech.com>
+Tested-by: Ben Greear <greearb@candelatech.com>
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/sunrpc/sched.c | 27 +++++++++++----------------
+ 1 file changed, 11 insertions(+), 16 deletions(-)
+
+--- a/net/sunrpc/sched.c
++++ b/net/sunrpc/sched.c
+@@ -616,30 +616,25 @@ static void __rpc_execute(struct rpc_tas
+ BUG_ON(RPC_IS_QUEUED(task));
+
+ for (;;) {
++ void (*do_action)(struct rpc_task *);
+
+ /*
+- * Execute any pending callback.
++ * Execute any pending callback first.
+ */
+- if (task->tk_callback) {
+- void (*save_callback)(struct rpc_task *);
+-
+- /*
+- * We set tk_callback to NULL before calling it,
+- * in case it sets the tk_callback field itself:
+- */
+- save_callback = task->tk_callback;
+- task->tk_callback = NULL;
+- save_callback(task);
+- } else {
++ do_action = task->tk_callback;
++ task->tk_callback = NULL;
++ if (do_action == NULL) {
+ /*
+ * Perform the next FSM step.
+- * tk_action may be NULL when the task has been killed
+- * by someone else.
++ * tk_action may be NULL if the task has been killed.
++ * In particular, note that rpc_killall_tasks may
++ * do this at any time, so beware when dereferencing.
+ */
+- if (task->tk_action == NULL)
++ do_action = task->tk_action;
++ if (do_action == NULL)
+ break;
+- task->tk_action(task);
+ }
++ do_action(task);
+
+ /*
+ * Lockless check for whether task is sleeping or not.
diff --git a/queue-2.6.39/sunrpc-fix-use-of-static-variable-in-rpcb_getport_async.patch b/queue-2.6.39/sunrpc-fix-use-of-static-variable-in-rpcb_getport_async.patch
new file mode 100644
index 0000000000..b8f8323e83
--- /dev/null
+++ b/queue-2.6.39/sunrpc-fix-use-of-static-variable-in-rpcb_getport_async.patch
@@ -0,0 +1,37 @@
+From ec0dd267bf7d08cb30e321e45a75fd40edd7e528 Mon Sep 17 00:00:00 2001
+From: Ben Greear <greearb@candelatech.com>
+Date: Tue, 12 Jul 2011 10:27:55 -0700
+Subject: SUNRPC: Fix use of static variable in rpcb_getport_async
+
+From: Ben Greear <greearb@candelatech.com>
+
+commit ec0dd267bf7d08cb30e321e45a75fd40edd7e528 upstream.
+
+Because struct rpcbind_args *map was declared static, if two
+threads entered this method at the same time, the values
+assigned to map could be sent two two differen tasks.
+This could cause all sorts of problems, include use-after-free
+and double-free of memory.
+
+Fix this by removing the static declaration so that the map
+pointer is on the stack.
+
+Signed-off-by: Ben Greear <greearb@candelatech.com>
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/sunrpc/rpcb_clnt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/sunrpc/rpcb_clnt.c
++++ b/net/sunrpc/rpcb_clnt.c
+@@ -528,7 +528,7 @@ void rpcb_getport_async(struct rpc_task
+ u32 bind_version;
+ struct rpc_xprt *xprt;
+ struct rpc_clnt *rpcb_clnt;
+- static struct rpcbind_args *map;
++ struct rpcbind_args *map;
+ struct rpc_task *child;
+ struct sockaddr_storage addr;
+ struct sockaddr *sap = (struct sockaddr *)&addr;
diff --git a/queue-2.6.39/tuner-core-fix-s_std-and-s_tuner.patch b/queue-2.6.39/tuner-core-fix-s_std-and-s_tuner.patch
new file mode 100644
index 0000000000..d7b9731981
--- /dev/null
+++ b/queue-2.6.39/tuner-core-fix-s_std-and-s_tuner.patch
@@ -0,0 +1,159 @@
+From 4e4a31fb95d88518180517bae3098a23ebde9f9c Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hans.verkuil@cisco.com>
+Date: Tue, 14 Jun 2011 03:56:09 -0300
+Subject: [media] tuner-core: fix s_std and s_tuner
+
+From: Hans Verkuil <hans.verkuil@cisco.com>
+
+commit 4e4a31fb95d88518180517bae3098a23ebde9f9c upstream.
+
+Both s_std and s_tuner are broken because set_mode_freq is called before the
+new std (for s_std) and audmode (for s_tuner) are set.
+
+This patch splits set_mode_freq in a set_mode and a set_freq and in s_std/s_tuner
+first calls set_mode, and if that returns 0 (i.e. the mode is supported)
+then they set t->std/t->audmode and call set_freq.
+
+This fixes a bug where changing std or audmode would actually change it to
+the previous value.
+
+Discovered while testing analog TV standards for cx18 with a tda18271 tuner.
+
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/tuner-core.c | 59 ++++++++++++++++++++-------------------
+ 1 file changed, 31 insertions(+), 28 deletions(-)
+
+--- a/drivers/media/video/tuner-core.c
++++ b/drivers/media/video/tuner-core.c
+@@ -724,19 +724,15 @@ static inline int check_mode(struct tune
+ }
+
+ /**
+- * set_mode_freq - Switch tuner to other mode.
+- * @client: struct i2c_client pointer
++ * set_mode - Switch tuner to other mode.
+ * @t: a pointer to the module's internal struct_tuner
+ * @mode: enum v4l2_type (radio or TV)
+- * @freq: frequency to set (0 means to use the previous one)
+ *
+ * If tuner doesn't support the needed mode (radio or TV), prints a
+ * debug message and returns -EINVAL, changing its state to standby.
+- * Otherwise, changes the state and sets frequency to the last value, if
+- * the tuner can sleep or if it supports both Radio and TV.
++ * Otherwise, changes the mode and returns 0.
+ */
+-static int set_mode_freq(struct i2c_client *client, struct tuner *t,
+- enum v4l2_tuner_type mode, unsigned int freq)
++static int set_mode(struct tuner *t, enum v4l2_tuner_type mode)
+ {
+ struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops;
+
+@@ -752,17 +748,27 @@ static int set_mode_freq(struct i2c_clie
+ t->mode = mode;
+ tuner_dbg("Changing to mode %d\n", mode);
+ }
++ return 0;
++}
++
++/**
++ * set_freq - Set the tuner to the desired frequency.
++ * @t: a pointer to the module's internal struct_tuner
++ * @freq: frequency to set (0 means to use the current frequency)
++ */
++static void set_freq(struct tuner *t, unsigned int freq)
++{
++ struct i2c_client *client = v4l2_get_subdevdata(&t->sd);
++
+ if (t->mode == V4L2_TUNER_RADIO) {
+- if (freq)
+- t->radio_freq = freq;
+- set_radio_freq(client, t->radio_freq);
++ if (!freq)
++ freq = t->radio_freq;
++ set_radio_freq(client, freq);
+ } else {
+- if (freq)
+- t->tv_freq = freq;
+- set_tv_freq(client, t->tv_freq);
++ if (!freq)
++ freq = t->tv_freq;
++ set_tv_freq(client, freq);
+ }
+-
+- return 0;
+ }
+
+ /*
+@@ -1058,10 +1064,9 @@ static void tuner_status(struct dvb_fron
+ static int tuner_s_radio(struct v4l2_subdev *sd)
+ {
+ struct tuner *t = to_tuner(sd);
+- struct i2c_client *client = v4l2_get_subdevdata(sd);
+
+- if (set_mode_freq(client, t, V4L2_TUNER_RADIO, 0) == -EINVAL)
+- return 0;
++ if (set_mode(t, V4L2_TUNER_RADIO) == 0)
++ set_freq(t, 0);
+ return 0;
+ }
+
+@@ -1093,25 +1098,22 @@ static int tuner_s_power(struct v4l2_sub
+ static int tuner_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
+ {
+ struct tuner *t = to_tuner(sd);
+- struct i2c_client *client = v4l2_get_subdevdata(sd);
+
+- if (set_mode_freq(client, t, V4L2_TUNER_ANALOG_TV, 0) == -EINVAL)
++ if (set_mode(t, V4L2_TUNER_ANALOG_TV))
+ return 0;
+
+ t->std = std;
+ tuner_fixup_std(t);
+-
++ set_freq(t, 0);
+ return 0;
+ }
+
+ static int tuner_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
+ {
+ struct tuner *t = to_tuner(sd);
+- struct i2c_client *client = v4l2_get_subdevdata(sd);
+-
+- if (set_mode_freq(client, t, f->type, f->frequency) == -EINVAL)
+- return 0;
+
++ if (set_mode(t, f->type) == 0)
++ set_freq(t, f->frequency);
+ return 0;
+ }
+
+@@ -1180,13 +1182,13 @@ static int tuner_g_tuner(struct v4l2_sub
+ static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
+ {
+ struct tuner *t = to_tuner(sd);
+- struct i2c_client *client = v4l2_get_subdevdata(sd);
+
+- if (set_mode_freq(client, t, vt->type, 0) == -EINVAL)
++ if (set_mode(t, vt->type))
+ return 0;
+
+ if (t->mode == V4L2_TUNER_RADIO)
+ t->audmode = vt->audmode;
++ set_freq(t, 0);
+
+ return 0;
+ }
+@@ -1221,7 +1223,8 @@ static int tuner_resume(struct i2c_clien
+ tuner_dbg("resume\n");
+
+ if (!t->standby)
+- set_mode_freq(c, t, t->type, 0);
++ if (set_mode(t, t->type) == 0)
++ set_freq(t, 0);
+
+ return 0;
+ }
diff --git a/queue-2.6.39/tuner-core-fix-tuner_resume-use-t-mode-instead-of-t-type.patch b/queue-2.6.39/tuner-core-fix-tuner_resume-use-t-mode-instead-of-t-type.patch
new file mode 100644
index 0000000000..e8a6199197
--- /dev/null
+++ b/queue-2.6.39/tuner-core-fix-tuner_resume-use-t-mode-instead-of-t-type.patch
@@ -0,0 +1,31 @@
+From 9bf0ef060ebae452c07cf5b0616247780740bb50 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hans.verkuil@cisco.com>
+Date: Mon, 13 Jun 2011 09:21:56 -0300
+Subject: [media] tuner-core: fix tuner_resume: use t->mode instead of t->type
+
+From: Hans Verkuil <hans.verkuil@cisco.com>
+
+commit 9bf0ef060ebae452c07cf5b0616247780740bb50 upstream.
+
+set_mode is called with t->type, which is the tuner type. Instead, use
+t->mode which is the actual tuner mode (i.e. radio vs tv).
+
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/tuner-core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/video/tuner-core.c
++++ b/drivers/media/video/tuner-core.c
+@@ -1223,7 +1223,7 @@ static int tuner_resume(struct i2c_clien
+ tuner_dbg("resume\n");
+
+ if (!t->standby)
+- if (set_mode(t, t->type) == 0)
++ if (set_mode(t, t->mode) == 0)
+ set_freq(t, 0);
+
+ return 0;
diff --git a/queue-2.6.39/v4l2-ioctl.c-prefill-tuner-type-for-g_frequency-and.patch b/queue-2.6.39/v4l2-ioctl.c-prefill-tuner-type-for-g_frequency-and.patch
new file mode 100644
index 0000000000..324cacacf0
--- /dev/null
+++ b/queue-2.6.39/v4l2-ioctl.c-prefill-tuner-type-for-g_frequency-and.patch
@@ -0,0 +1,55 @@
+From 227690df75382e46a4f6ea1bbc5df855a674b47f Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hans.verkuil@cisco.com>
+Date: Sun, 12 Jun 2011 06:36:41 -0300
+Subject: [media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
+
+From: Hans Verkuil <hans.verkuil@cisco.com>
+
+commit 227690df75382e46a4f6ea1bbc5df855a674b47f upstream.
+
+The subdevs are supposed to receive a valid tuner type for the g_frequency
+and g/s_tuner subdev ops. Some drivers do this, others don't. So prefill
+this in v4l2-ioctl.c based on whether the device node from which this is
+called is a radio node or not.
+
+The spec does not require applications to fill in the type, and if they
+leave it at 0 then the 'check_mode' call in tuner-core.c will return
+an error and the ioctl does nothing.
+
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/v4l2-ioctl.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/media/video/v4l2-ioctl.c
++++ b/drivers/media/video/v4l2-ioctl.c
+@@ -1822,6 +1822,8 @@ static long __video_do_ioctl(struct file
+ if (!ops->vidioc_g_tuner)
+ break;
+
++ p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
++ V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
+ ret = ops->vidioc_g_tuner(file, fh, p);
+ if (!ret)
+ dbgarg(cmd, "index=%d, name=%s, type=%d, "
+@@ -1840,6 +1842,8 @@ static long __video_do_ioctl(struct file
+
+ if (!ops->vidioc_s_tuner)
+ break;
++ p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
++ V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
+ dbgarg(cmd, "index=%d, name=%s, type=%d, "
+ "capability=0x%x, rangelow=%d, "
+ "rangehigh=%d, signal=%d, afc=%d, "
+@@ -1858,6 +1862,8 @@ static long __video_do_ioctl(struct file
+ if (!ops->vidioc_g_frequency)
+ break;
+
++ p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ?
++ V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
+ ret = ops->vidioc_g_frequency(file, fh, p);
+ if (!ret)
+ dbgarg(cmd, "tuner=%d, type=%d, frequency=%d\n",