Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-09-08 09:44:41 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-08 09:44:41 -0700
commitd92f78cea58d888ea473ed1a9c7b225540d829b8 (patch)
treeea767ccb86c4ab3207434cf304a21e3144df1e67
parent2f05d5c59b9106e8483245732af4615bcfd18f75 (diff)
- Update to 2.6.31-rc9
- obsoletes: - patches.drivers/alsa-hda-fix-01-add-missing-mux-for-vt1708 - patches.drivers/alsa-hda-fix-02-mbp31-hp-fix
-rw-r--r--config/i386/debug9
-rw-r--r--config/i386/default9
-rw-r--r--config/i386/desktop9
-rw-r--r--config/i386/pae9
-rw-r--r--config/i386/trace9
-rw-r--r--config/i386/vanilla9
-rw-r--r--config/i386/xen9
-rw-r--r--config/ia64/debug8
-rw-r--r--config/ia64/default8
-rw-r--r--config/ia64/trace8
-rw-r--r--config/ia64/vanilla8
-rw-r--r--config/ppc/default8
-rw-r--r--config/ppc/ppc648
-rw-r--r--config/ppc/vanilla8
-rw-r--r--config/ppc64/debug8
-rw-r--r--config/ppc64/default8
-rw-r--r--config/ppc64/ppc648
-rw-r--r--config/ppc64/vanilla8
-rw-r--r--config/x86_64/debug9
-rw-r--r--config/x86_64/default9
-rw-r--r--config/x86_64/desktop9
-rw-r--r--config/x86_64/trace9
-rw-r--r--config/x86_64/vanilla9
-rw-r--r--config/x86_64/xen9
-rw-r--r--kernel-source.changes8
-rw-r--r--patches.drivers/alsa-hda-fix-01-add-missing-mux-for-vt170835
-rw-r--r--patches.drivers/alsa-hda-fix-02-mbp31-hp-fix105
-rw-r--r--patches.kernel.org/patch-2.6.31-rc8-rc93803
-rw-r--r--patches.suse/supported-flag-enterprise12
-rw-r--r--patches.suse/supported-flag-sysfs12
-rw-r--r--patches.xen/pci-guestdev73
-rw-r--r--patches.xen/pci-reserve66
-rw-r--r--series.conf4
33 files changed, 4049 insertions, 274 deletions
diff --git a/config/i386/debug b/config/i386/debug
index 3f495d35d1..01ac8262b1 100644
--- a/config/i386/debug
+++ b/config/i386/debug
@@ -3324,8 +3324,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/i386/default b/config/i386/default
index 108ef8c6e8..760b2db356 100644
--- a/config/i386/default
+++ b/config/i386/default
@@ -3297,8 +3297,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/i386/desktop b/config/i386/desktop
index 060ed07840..aea91bc07b 100644
--- a/config/i386/desktop
+++ b/config/i386/desktop
@@ -3164,8 +3164,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/i386/pae b/config/i386/pae
index 9daacf388a..5538f5886d 100644
--- a/config/i386/pae
+++ b/config/i386/pae
@@ -3180,8 +3180,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/i386/trace b/config/i386/trace
index a19835f4b7..ea800086d6 100644
--- a/config/i386/trace
+++ b/config/i386/trace
@@ -3180,8 +3180,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/i386/vanilla b/config/i386/vanilla
index e1c62a0977..7122c7f11f 100644
--- a/config/i386/vanilla
+++ b/config/i386/vanilla
@@ -3284,8 +3284,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/i386/xen b/config/i386/xen
index 76081b58fd..2a4a7f1e9f 100644
--- a/config/i386/xen
+++ b/config/i386/xen
@@ -3035,8 +3035,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ia64/debug b/config/ia64/debug
index 411f68945e..b527a20db9 100644
--- a/config/ia64/debug
+++ b/config/ia64/debug
@@ -2740,8 +2740,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ia64/default b/config/ia64/default
index d7e5f85d89..ed55e76e57 100644
--- a/config/ia64/default
+++ b/config/ia64/default
@@ -2723,8 +2723,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ia64/trace b/config/ia64/trace
index fd3dc30df7..4b5d4c98d9 100644
--- a/config/ia64/trace
+++ b/config/ia64/trace
@@ -2730,8 +2730,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ia64/vanilla b/config/ia64/vanilla
index 9f4ca41124..818124ca6a 100644
--- a/config/ia64/vanilla
+++ b/config/ia64/vanilla
@@ -2711,8 +2711,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ppc/default b/config/ppc/default
index 9ad5a6cf61..054ae0f998 100644
--- a/config/ppc/default
+++ b/config/ppc/default
@@ -2501,8 +2501,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ppc/ppc64 b/config/ppc/ppc64
index 1ab06850c5..d0db9ed02e 100644
--- a/config/ppc/ppc64
+++ b/config/ppc/ppc64
@@ -2464,8 +2464,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ppc/vanilla b/config/ppc/vanilla
index 01f1870195..7432373a54 100644
--- a/config/ppc/vanilla
+++ b/config/ppc/vanilla
@@ -2490,8 +2490,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ppc64/debug b/config/ppc64/debug
index a80d257bb3..b8bcc04ded 100644
--- a/config/ppc64/debug
+++ b/config/ppc64/debug
@@ -2406,8 +2406,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ppc64/default b/config/ppc64/default
index 6b8291c3b0..53bfd6b587 100644
--- a/config/ppc64/default
+++ b/config/ppc64/default
@@ -2396,8 +2396,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ppc64/ppc64 b/config/ppc64/ppc64
index 8f40aac868..1b0c1073d6 100644
--- a/config/ppc64/ppc64
+++ b/config/ppc64/ppc64
@@ -2464,8 +2464,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/ppc64/vanilla b/config/ppc64/vanilla
index b7683a8b66..8d264efa7e 100644
--- a/config/ppc64/vanilla
+++ b/config/ppc64/vanilla
@@ -2384,8 +2384,12 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/x86_64/debug b/config/x86_64/debug
index 4fb5894481..a5b30d3ba0 100644
--- a/config/x86_64/debug
+++ b/config/x86_64/debug
@@ -3119,8 +3119,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/x86_64/default b/config/x86_64/default
index bd2d66955f..54e7a1b87c 100644
--- a/config/x86_64/default
+++ b/config/x86_64/default
@@ -3113,8 +3113,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/x86_64/desktop b/config/x86_64/desktop
index a8ffdcc6f6..80e7368150 100644
--- a/config/x86_64/desktop
+++ b/config/x86_64/desktop
@@ -3097,8 +3097,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/x86_64/trace b/config/x86_64/trace
index 8b4fc83ec6..f762382dff 100644
--- a/config/x86_64/trace
+++ b/config/x86_64/trace
@@ -3113,8 +3113,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/x86_64/vanilla b/config/x86_64/vanilla
index 418e793e12..bd34a1a5ad 100644
--- a/config/x86_64/vanilla
+++ b/config/x86_64/vanilla
@@ -3099,8 +3099,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/config/x86_64/xen b/config/x86_64/xen
index 3f4e041a27..2fddfb779c 100644
--- a/config/x86_64/xen
+++ b/config/x86_64/xen
@@ -2987,8 +2987,13 @@ CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_SIANO_SMS1XXX=m
-CONFIG_DVB_SIANO_SMS1XXX_SMS_IDS=y
+CONFIG_SMS_SIANO_MDTV=m
+
+#
+# Siano module components
+#
+CONFIG_SMS_USB_DRV=m
+CONFIG_SMS_SDIO_DRV=m
#
# Supported FlexCopII (B2C2) Adapters
diff --git a/kernel-source.changes b/kernel-source.changes
index 077fc0d93e..2b29c3c149 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Tue Sep 8 18:44:20 CEST 2009 - gregkh@suse.de
+
+- Update to 2.6.31-rc9
+ - obsoletes:
+ - patches.drivers/alsa-hda-fix-01-add-missing-mux-for-vt1708
+ - patches.drivers/alsa-hda-fix-02-mbp31-hp-fix
+
+-------------------------------------------------------------------
Tue Sep 8 15:03:15 CEST 2009 - knikanth@suse.de
- patches.fixes/scsi_dh-Provide-set_params-interface-in-emc-device-handler.patch:
diff --git a/patches.drivers/alsa-hda-fix-01-add-missing-mux-for-vt1708 b/patches.drivers/alsa-hda-fix-01-add-missing-mux-for-vt1708
deleted file mode 100644
index 088d606e5b..0000000000
--- a/patches.drivers/alsa-hda-fix-01-add-missing-mux-for-vt1708
+++ /dev/null
@@ -1,35 +0,0 @@
-From 0f67a611629f84dd0afacd23d422b4b9c2558285 Mon Sep 17 00:00:00 2001
-From: Takashi Iwai <tiwai@suse.de>
-Date: Mon, 31 Aug 2009 08:12:29 +0200
-Subject: ALSA: hda - Add missing mux check for VT1708
-Patch-mainline:
-References: bnc#534904
-
-In patch_vt1708(), the check of MUX nids is missing and this results in
-the -EINVAL error in accessing Input Source mixer element. Simpliy
-adding the call of get_mux_nids() fixes the problem.
-
-Reference: Novell bnc#534904
- https://bugzilla.novell.com/show_bug.cgi?id=534904
-
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
----
- sound/pci/hda/patch_via.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
-index 9008b4b..e8f10b1 100644
---- a/sound/pci/hda/patch_via.c
-+++ b/sound/pci/hda/patch_via.c
-@@ -1395,6 +1395,7 @@ static int patch_vt1708(struct hda_codec *codec)
- if (!spec->adc_nids && spec->input_mux) {
- spec->adc_nids = vt1708_adc_nids;
- spec->num_adc_nids = ARRAY_SIZE(vt1708_adc_nids);
-+ get_mux_nids(codec);
- spec->mixers[spec->num_mixers] = vt1708_capture_mixer;
- spec->num_mixers++;
- }
---
-1.6.3.3
-
diff --git a/patches.drivers/alsa-hda-fix-02-mbp31-hp-fix b/patches.drivers/alsa-hda-fix-02-mbp31-hp-fix
deleted file mode 100644
index 8acfe38778..0000000000
--- a/patches.drivers/alsa-hda-fix-02-mbp31-hp-fix
+++ /dev/null
@@ -1,105 +0,0 @@
-From a3f730af7e33cea10ea66f05b2565fde1f9512df Mon Sep 17 00:00:00 2001
-From: Takashi Iwai <tiwai@suse.de>
-Date: Mon, 31 Aug 2009 08:15:26 +0200
-Subject: ALSA: hda - Fix MacBookPro 3,1/4,1 quirk with ALC889A
-Patch-mainline:
-References:
-
-This patch fixes the wrong headphone output routing for MacBookPro 3,1/4,1
-quirk with ALC889A codec, which caused the silent headphone output.
-Also, this gives the individual Headphone and Speaker volume controls.
-
-Reference: kernel bug#14078
- http://bugzilla.kernel.org/show_bug.cgi?id=14078
-
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
-Cc: <stable@kernel.org>
-
----
- sound/pci/hda/patch_realtek.c | 34 ++++++++++++++++++++--------------
- 1 files changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
-index 6f683e4..30eeb30 100644
---- a/sound/pci/hda/patch_realtek.c
-+++ b/sound/pci/hda/patch_realtek.c
-@@ -6423,9 +6423,9 @@ static struct hda_verb alc885_mbp_ch2_init[] = {
- };
-
- /*
-- * 6ch mode
-+ * 4ch mode
- */
--static struct hda_verb alc885_mbp_ch6_init[] = {
-+static struct hda_verb alc885_mbp_ch4_init[] = {
- { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
- { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
- { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
-@@ -6434,9 +6434,9 @@ static struct hda_verb alc885_mbp_ch6_init[] = {
- { } /* end */
- };
-
--static struct hda_channel_mode alc885_mbp_6ch_modes[2] = {
-+static struct hda_channel_mode alc885_mbp_4ch_modes[2] = {
- { 2, alc885_mbp_ch2_init },
-- { 6, alc885_mbp_ch6_init },
-+ { 4, alc885_mbp_ch4_init },
- };
-
- /*
-@@ -6497,10 +6497,11 @@ static struct snd_kcontrol_new alc882_base_mixer[] = {
- };
-
- static struct snd_kcontrol_new alc885_mbp3_mixer[] = {
-- HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x00, HDA_OUTPUT),
-- HDA_BIND_MUTE ("Front Playback Switch", 0x0c, 0x02, HDA_INPUT),
-- HDA_CODEC_MUTE ("Speaker Playback Switch", 0x14, 0x00, HDA_OUTPUT),
-- HDA_CODEC_VOLUME("Line-Out Playback Volume", 0x0d, 0x00, HDA_OUTPUT),
-+ HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x00, HDA_OUTPUT),
-+ HDA_BIND_MUTE ("Speaker Playback Switch", 0x0c, 0x02, HDA_INPUT),
-+ HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0e, 0x00, HDA_OUTPUT),
-+ HDA_BIND_MUTE ("Headphone Playback Switch", 0x0e, 0x02, HDA_INPUT),
-+ HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x00, HDA_OUTPUT),
- HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
- HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
- HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT),
-@@ -6814,14 +6815,18 @@ static struct hda_verb alc885_mbp3_init_verbs[] = {
- {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
- {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
- {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
-+ /* HP mixer */
-+ {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
-+ {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
-+ {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
- /* Front Pin: output 0 (0x0c) */
- {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
- {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
- {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
-- /* HP Pin: output 0 (0x0d) */
-+ /* HP Pin: output 0 (0x0e) */
- {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc4},
-- {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
-- {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
-+ {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
-+ {0x15, AC_VERB_SET_CONNECT_SEL, 0x02},
- {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
- /* Mic (rear) pin: input vref at 80% */
- {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
-@@ -7195,10 +7200,11 @@ static struct alc_config_preset alc882_presets[] = {
- .mixers = { alc885_mbp3_mixer, alc882_chmode_mixer },
- .init_verbs = { alc885_mbp3_init_verbs,
- alc880_gpio1_init_verbs },
-- .num_dacs = ARRAY_SIZE(alc882_dac_nids),
-+ .num_dacs = 2,
- .dac_nids = alc882_dac_nids,
-- .channel_mode = alc885_mbp_6ch_modes,
-- .num_channel_mode = ARRAY_SIZE(alc885_mbp_6ch_modes),
-+ .hp_nid = 0x04,
-+ .channel_mode = alc885_mbp_4ch_modes,
-+ .num_channel_mode = ARRAY_SIZE(alc885_mbp_4ch_modes),
- .input_mux = &alc882_capture_source,
- .dig_out_nid = ALC882_DIGOUT_NID,
- .dig_in_nid = ALC882_DIGIN_NID,
---
-1.6.3.3
-
diff --git a/patches.kernel.org/patch-2.6.31-rc8-rc9 b/patches.kernel.org/patch-2.6.31-rc8-rc9
new file mode 100644
index 0000000000..5760e18e65
--- /dev/null
+++ b/patches.kernel.org/patch-2.6.31-rc8-rc9
@@ -0,0 +1,3803 @@
+From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
+Subject: Linux: 2.6.31-rc9
+Patch-mainline: 2.6.31-rc9
+
+ This patch contains the differences between 2.6.31-rc8 and -rc9
+
+Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+diff -urN linux-2.6.31-rc8/MAINTAINERS linux-2.6.31-rc9/MAINTAINERS
+--- linux-2.6.31-rc8/MAINTAINERS 2009-09-05 23:50:10.995349269 +0000
++++ linux-2.6.31-rc9/MAINTAINERS 2009-09-05 23:50:16.956498711 +0000
+@@ -2239,8 +2239,7 @@
+ F: drivers/media/video/gspca/pac207.c
+
+ GSPCA SN9C20X SUBDRIVER
+-P: Brian Johnson
+-M: brijohn@gmail.com
++M: Brian Johnson <brijohn@gmail.com>
+ L: linux-media@vger.kernel.org
+ T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
+ S: Maintained
+diff -urN linux-2.6.31-rc8/Makefile linux-2.6.31-rc9/Makefile
+--- linux-2.6.31-rc8/Makefile 2009-09-05 23:50:10.996499494 +0000
++++ linux-2.6.31-rc9/Makefile 2009-09-05 23:50:16.957498828 +0000
+@@ -1,7 +1,7 @@
+ VERSION = 2
+ PATCHLEVEL = 6
+ SUBLEVEL = 31
+-EXTRAVERSION = -rc8
++EXTRAVERSION = -rc9
+ NAME = Man-Eating Seals of Antiquity
+
+ # *DOCUMENTATION*
+diff -urN linux-2.6.31-rc8/arch/ia64/kernel/dma-mapping.c linux-2.6.31-rc9/arch/ia64/kernel/dma-mapping.c
+--- linux-2.6.31-rc8/arch/ia64/kernel/dma-mapping.c 2009-09-05 23:50:11.237499226 +0000
++++ linux-2.6.31-rc9/arch/ia64/kernel/dma-mapping.c 2009-09-05 23:50:17.202339685 +0000
+@@ -10,7 +10,9 @@
+
+ static int __init dma_init(void)
+ {
+- dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
++ dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
++
++ return 0;
+ }
+ fs_initcall(dma_init);
+
+diff -urN linux-2.6.31-rc8/arch/ia64/lib/ip_fast_csum.S linux-2.6.31-rc9/arch/ia64/lib/ip_fast_csum.S
+--- linux-2.6.31-rc8/arch/ia64/lib/ip_fast_csum.S 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/arch/ia64/lib/ip_fast_csum.S 2009-09-05 23:50:17.214498976 +0000
+@@ -96,20 +96,22 @@
+ GLOBAL_ENTRY(csum_ipv6_magic)
+ ld4 r20=[in0],4
+ ld4 r21=[in1],4
+- dep r15=in3,in2,32,16
++ zxt4 in2=in2
+ ;;
+ ld4 r22=[in0],4
+ ld4 r23=[in1],4
+- mux1 r15=r15,@rev
++ dep r15=in3,in2,32,16
+ ;;
+ ld4 r24=[in0],4
+ ld4 r25=[in1],4
+- shr.u r15=r15,16
++ mux1 r15=r15,@rev
+ add r16=r20,r21
+ add r17=r22,r23
++ zxt4 in4=in4
+ ;;
+ ld4 r26=[in0],4
+ ld4 r27=[in1],4
++ shr.u r15=r15,16
+ add r18=r24,r25
+ add r8=r16,r17
+ ;;
+diff -urN linux-2.6.31-rc8/arch/parisc/kernel/traps.c linux-2.6.31-rc9/arch/parisc/kernel/traps.c
+--- linux-2.6.31-rc8/arch/parisc/kernel/traps.c 2009-09-05 23:50:11.326498991 +0000
++++ linux-2.6.31-rc9/arch/parisc/kernel/traps.c 2009-09-05 23:50:17.295498979 +0000
+@@ -532,7 +532,7 @@
+ /* Kill the user process later */
+ regs->iaoq[0] = 0 | 3;
+ regs->iaoq[1] = regs->iaoq[0] + 4;
+- regs->iasq[0] = regs->iasq[0] = regs->sr[7];
++ regs->iasq[0] = regs->iasq[1] = regs->sr[7];
+ regs->gr[0] &= ~PSW_B;
+ return;
+ }
+diff -urN linux-2.6.31-rc8/arch/powerpc/kernel/power7-pmu.c linux-2.6.31-rc9/arch/powerpc/kernel/power7-pmu.c
+--- linux-2.6.31-rc8/arch/powerpc/kernel/power7-pmu.c 2009-09-05 23:50:11.387506083 +0000
++++ linux-2.6.31-rc9/arch/powerpc/kernel/power7-pmu.c 2009-09-05 23:50:17.359499034 +0000
+@@ -317,7 +317,7 @@
+ */
+ static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
+ [C(L1D)] = { /* RESULT_ACCESS RESULT_MISS */
+- [C(OP_READ)] = { 0x400f0, 0xc880 },
++ [C(OP_READ)] = { 0xc880, 0x400f0 },
+ [C(OP_WRITE)] = { 0, 0x300f0 },
+ [C(OP_PREFETCH)] = { 0xd8b8, 0 },
+ },
+@@ -327,8 +327,8 @@
+ [C(OP_PREFETCH)] = { 0x408a, 0 },
+ },
+ [C(LL)] = { /* RESULT_ACCESS RESULT_MISS */
+- [C(OP_READ)] = { 0x6080, 0x6084 },
+- [C(OP_WRITE)] = { 0x6082, 0x6086 },
++ [C(OP_READ)] = { 0x16080, 0x26080 },
++ [C(OP_WRITE)] = { 0x16082, 0x26082 },
+ [C(OP_PREFETCH)] = { 0, 0 },
+ },
+ [C(DTLB)] = { /* RESULT_ACCESS RESULT_MISS */
+diff -urN linux-2.6.31-rc8/arch/powerpc/sysdev/xilinx_intc.c linux-2.6.31-rc9/arch/powerpc/sysdev/xilinx_intc.c
+--- linux-2.6.31-rc8/arch/powerpc/sysdev/xilinx_intc.c 2009-09-05 23:50:11.411315330 +0000
++++ linux-2.6.31-rc9/arch/powerpc/sysdev/xilinx_intc.c 2009-09-05 23:50:17.383499157 +0000
+@@ -234,7 +234,6 @@
+ generic_handle_irq(cascade_irq);
+
+ /* Let xilinx_intc end the interrupt */
+- desc->chip->ack(irq);
+ desc->chip->unmask(irq);
+ }
+
+diff -urN linux-2.6.31-rc8/arch/sparc/kernel/irq_64.c linux-2.6.31-rc9/arch/sparc/kernel/irq_64.c
+--- linux-2.6.31-rc8/arch/sparc/kernel/irq_64.c 2009-09-05 23:50:11.498498820 +0000
++++ linux-2.6.31-rc9/arch/sparc/kernel/irq_64.c 2009-09-05 23:50:17.475324605 +0000
+@@ -886,7 +886,7 @@
+ * Therefore you cannot make any OBP calls, not even prom_printf,
+ * from these two routines.
+ */
+-static void __cpuinit register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask)
++static void __cpuinit notrace register_one_mondo(unsigned long paddr, unsigned long type, unsigned long qmask)
+ {
+ unsigned long num_entries = (qmask + 1) / 64;
+ unsigned long status;
+diff -urN linux-2.6.31-rc8/arch/sparc/kernel/nmi.c linux-2.6.31-rc9/arch/sparc/kernel/nmi.c
+--- linux-2.6.31-rc8/arch/sparc/kernel/nmi.c 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/arch/sparc/kernel/nmi.c 2009-09-05 23:50:17.475324605 +0000
+@@ -103,7 +103,7 @@
+ }
+ if (!touched && __get_cpu_var(last_irq_sum) == sum) {
+ local_inc(&__get_cpu_var(alert_counter));
+- if (local_read(&__get_cpu_var(alert_counter)) == 5 * nmi_hz)
++ if (local_read(&__get_cpu_var(alert_counter)) == 30 * nmi_hz)
+ die_nmi("BUG: NMI Watchdog detected LOCKUP",
+ regs, panic_on_timeout);
+ } else {
+diff -urN linux-2.6.31-rc8/arch/sparc/prom/misc_64.c linux-2.6.31-rc9/arch/sparc/prom/misc_64.c
+--- linux-2.6.31-rc8/arch/sparc/prom/misc_64.c 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/arch/sparc/prom/misc_64.c 2009-09-05 23:50:17.482499026 +0000
+@@ -88,7 +88,7 @@
+ /* Drop into the prom, but completely terminate the program.
+ * No chance of continuing.
+ */
+-void prom_halt(void)
++void notrace prom_halt(void)
+ {
+ #ifdef CONFIG_SUN_LDOMS
+ if (ldom_domaining_enabled)
+diff -urN linux-2.6.31-rc8/arch/sparc/prom/printf.c linux-2.6.31-rc9/arch/sparc/prom/printf.c
+--- linux-2.6.31-rc8/arch/sparc/prom/printf.c 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/arch/sparc/prom/printf.c 2009-09-05 23:50:17.482499026 +0000
+@@ -14,14 +14,14 @@
+ */
+
+ #include <linux/kernel.h>
++#include <linux/compiler.h>
+
+ #include <asm/openprom.h>
+ #include <asm/oplib.h>
+
+ static char ppbuf[1024];
+
+-void
+-prom_write(const char *buf, unsigned int n)
++void notrace prom_write(const char *buf, unsigned int n)
+ {
+ char ch;
+
+@@ -33,8 +33,7 @@
+ }
+ }
+
+-void
+-prom_printf(const char *fmt, ...)
++void notrace prom_printf(const char *fmt, ...)
+ {
+ va_list args;
+ int i;
+diff -urN linux-2.6.31-rc8/arch/x86/kernel/apic/probe_64.c linux-2.6.31-rc9/arch/x86/kernel/apic/probe_64.c
+--- linux-2.6.31-rc8/arch/x86/kernel/apic/probe_64.c 2009-09-05 23:50:11.534311099 +0000
++++ linux-2.6.31-rc9/arch/x86/kernel/apic/probe_64.c 2009-09-05 23:50:17.513311784 +0000
+@@ -44,6 +44,11 @@
+ NULL,
+ };
+
++static int apicid_phys_pkg_id(int initial_apic_id, int index_msb)
++{
++ return hard_smp_processor_id() >> index_msb;
++}
++
+ /*
+ * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode.
+ */
+@@ -69,6 +74,11 @@
+ printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
+ }
+
++ if (is_vsmp_box()) {
++ /* need to update phys_pkg_id */
++ apic->phys_pkg_id = apicid_phys_pkg_id;
++ }
++
+ /*
+ * Now that apic routing model is selected, configure the
+ * fault handling for intr remapping.
+diff -urN linux-2.6.31-rc8/arch/x86/xen/enlighten.c linux-2.6.31-rc9/arch/x86/xen/enlighten.c
+--- linux-2.6.31-rc8/arch/x86/xen/enlighten.c 2009-09-05 23:50:11.580311263 +0000
++++ linux-2.6.31-rc9/arch/x86/xen/enlighten.c 2009-09-05 23:50:17.561311411 +0000
+@@ -215,6 +215,7 @@
+ (1 << X86_FEATURE_ACPI)); /* disable ACPI */
+
+ ax = 1;
++ cx = 0;
+ xen_cpuid(&ax, &bx, &cx, &dx);
+
+ /* cpuid claims we support xsave; try enabling it to see what happens */
+@@ -1059,6 +1060,7 @@
+ /* set up basic CPUID stuff */
+ cpu_detect(&new_cpu_data);
+ new_cpu_data.hard_math = 1;
++ new_cpu_data.wp_works_ok = 1;
+ new_cpu_data.x86_capability[0] = cpuid_edx(1);
+ #endif
+
+diff -urN linux-2.6.31-rc8/block/blk-sysfs.c linux-2.6.31-rc9/block/blk-sysfs.c
+--- linux-2.6.31-rc8/block/blk-sysfs.c 2009-09-05 23:50:11.586366315 +0000
++++ linux-2.6.31-rc9/block/blk-sysfs.c 2009-09-05 23:50:17.568376202 +0000
+@@ -133,7 +133,7 @@
+ return -EINVAL;
+
+ spin_lock_irq(q->queue_lock);
+- blk_queue_max_sectors(q, max_sectors_kb << 1);
++ q->limits.max_sectors = max_sectors_kb << 1;
+ spin_unlock_irq(q->queue_lock);
+
+ return ret;
+diff -urN linux-2.6.31-rc8/crypto/algapi.c linux-2.6.31-rc9/crypto/algapi.c
+--- linux-2.6.31-rc8/crypto/algapi.c 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/crypto/algapi.c 2009-09-05 23:50:17.571311504 +0000
+@@ -692,7 +692,7 @@
+ }
+ EXPORT_SYMBOL_GPL(crypto_enqueue_request);
+
+-struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue)
++void *__crypto_dequeue_request(struct crypto_queue *queue, unsigned int offset)
+ {
+ struct list_head *request;
+
+@@ -707,7 +707,14 @@
+ request = queue->list.next;
+ list_del(request);
+
+- return list_entry(request, struct crypto_async_request, list);
++ return (char *)list_entry(request, struct crypto_async_request, list) -
++ offset;
++}
++EXPORT_SYMBOL_GPL(__crypto_dequeue_request);
++
++struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue)
++{
++ return __crypto_dequeue_request(queue, 0);
+ }
+ EXPORT_SYMBOL_GPL(crypto_dequeue_request);
+
+diff -urN linux-2.6.31-rc8/drivers/acpi/acpica/exstorob.c linux-2.6.31-rc9/drivers/acpi/acpica/exstorob.c
+--- linux-2.6.31-rc8/drivers/acpi/acpica/exstorob.c 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/drivers/acpi/acpica/exstorob.c 2009-09-05 23:50:17.580311792 +0000
+@@ -70,6 +70,12 @@
+
+ ACPI_FUNCTION_TRACE_PTR(ex_store_buffer_to_buffer, source_desc);
+
++ /* If Source and Target are the same, just return */
++
++ if (source_desc == target_desc) {
++ return_ACPI_STATUS(AE_OK);
++ }
++
+ /* We know that source_desc is a buffer by now */
+
+ buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer);
+@@ -161,6 +167,12 @@
+
+ ACPI_FUNCTION_TRACE_PTR(ex_store_string_to_string, source_desc);
+
++ /* If Source and Target are the same, just return */
++
++ if (source_desc == target_desc) {
++ return_ACPI_STATUS(AE_OK);
++ }
++
+ /* We know that source_desc is a string by now */
+
+ buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer);
+diff -urN linux-2.6.31-rc8/drivers/acpi/video.c linux-2.6.31-rc9/drivers/acpi/video.c
+--- linux-2.6.31-rc8/drivers/acpi/video.c 2009-09-05 23:50:11.607498895 +0000
++++ linux-2.6.31-rc9/drivers/acpi/video.c 2009-09-05 23:50:17.588327565 +0000
+@@ -2004,8 +2004,11 @@
+ status = acpi_remove_notify_handler(device->dev->handle,
+ ACPI_DEVICE_NOTIFY,
+ acpi_video_device_notify);
+- sysfs_remove_link(&device->backlight->dev.kobj, "device");
+- backlight_device_unregister(device->backlight);
++ if (device->backlight) {
++ sysfs_remove_link(&device->backlight->dev.kobj, "device");
++ backlight_device_unregister(device->backlight);
++ device->backlight = NULL;
++ }
+ if (device->cdev) {
+ sysfs_remove_link(&device->dev->dev.kobj,
+ "thermal_cooling");
+diff -urN linux-2.6.31-rc8/drivers/ata/ata_piix.c linux-2.6.31-rc9/drivers/ata/ata_piix.c
+--- linux-2.6.31-rc8/drivers/ata/ata_piix.c 2009-09-05 23:50:11.608498895 +0000
++++ linux-2.6.31-rc9/drivers/ata/ata_piix.c 2009-09-05 23:50:17.590311783 +0000
+@@ -664,6 +664,8 @@
+ return ata_sff_prereset(link, deadline);
+ }
+
++static DEFINE_SPINLOCK(piix_lock);
++
+ /**
+ * piix_set_piomode - Initialize host controller PATA PIO timings
+ * @ap: Port whose timings we are configuring
+@@ -677,8 +679,9 @@
+
+ static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev)
+ {
+- unsigned int pio = adev->pio_mode - XFER_PIO_0;
+ struct pci_dev *dev = to_pci_dev(ap->host->dev);
++ unsigned long flags;
++ unsigned int pio = adev->pio_mode - XFER_PIO_0;
+ unsigned int is_slave = (adev->devno != 0);
+ unsigned int master_port= ap->port_no ? 0x42 : 0x40;
+ unsigned int slave_port = 0x44;
+@@ -708,6 +711,8 @@
+ if (adev->class == ATA_DEV_ATA)
+ control |= 4; /* PPE enable */
+
++ spin_lock_irqsave(&piix_lock, flags);
++
+ /* PIO configuration clears DTE unconditionally. It will be
+ * programmed in set_dmamode which is guaranteed to be called
+ * after set_piomode if any DMA mode is available.
+@@ -747,6 +752,8 @@
+ udma_enable &= ~(1 << (2 * ap->port_no + adev->devno));
+ pci_write_config_byte(dev, 0x48, udma_enable);
+ }
++
++ spin_unlock_irqrestore(&piix_lock, flags);
+ }
+
+ /**
+@@ -764,6 +771,7 @@
+ static void do_pata_set_dmamode(struct ata_port *ap, struct ata_device *adev, int isich)
+ {
+ struct pci_dev *dev = to_pci_dev(ap->host->dev);
++ unsigned long flags;
+ u8 master_port = ap->port_no ? 0x42 : 0x40;
+ u16 master_data;
+ u8 speed = adev->dma_mode;
+@@ -777,6 +785,8 @@
+ { 2, 1 },
+ { 2, 3 }, };
+
++ spin_lock_irqsave(&piix_lock, flags);
++
+ pci_read_config_word(dev, master_port, &master_data);
+ if (ap->udma_mask)
+ pci_read_config_byte(dev, 0x48, &udma_enable);
+@@ -867,6 +877,8 @@
+ /* Don't scribble on 0x48 if the controller does not support UDMA */
+ if (ap->udma_mask)
+ pci_write_config_byte(dev, 0x48, udma_enable);
++
++ spin_unlock_irqrestore(&piix_lock, flags);
+ }
+
+ /**
+diff -urN linux-2.6.31-rc8/drivers/char/n_tty.c linux-2.6.31-rc9/drivers/char/n_tty.c
+--- linux-2.6.31-rc8/drivers/char/n_tty.c 2009-09-05 23:50:11.649498681 +0000
++++ linux-2.6.31-rc9/drivers/char/n_tty.c 2009-09-05 23:50:17.631340076 +0000
+@@ -300,8 +300,7 @@
+ if (space < 2)
+ return -1;
+ tty->canon_column = tty->column = 0;
+- tty_put_char(tty, '\r');
+- tty_put_char(tty, c);
++ tty->ops->write(tty, "\r\n", 2);
+ return 2;
+ }
+ tty->canon_column = tty->column;
+diff -urN linux-2.6.31-rc8/drivers/char/pty.c linux-2.6.31-rc9/drivers/char/pty.c
+--- linux-2.6.31-rc8/drivers/char/pty.c 2009-09-05 23:50:11.652498744 +0000
++++ linux-2.6.31-rc9/drivers/char/pty.c 2009-09-05 23:50:17.634392025 +0000
+@@ -109,21 +109,13 @@
+ * the other side of the pty/tty pair.
+ */
+
+-static int pty_write(struct tty_struct *tty, const unsigned char *buf,
+- int count)
++static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
+ {
+ struct tty_struct *to = tty->link;
+- int c;
+
+ if (tty->stopped)
+ return 0;
+
+- /* This isn't locked but our 8K is quite sloppy so no
+- big deal */
+-
+- c = pty_space(to);
+- if (c > count)
+- c = count;
+ if (c > 0) {
+ /* Stuff the data into the input queue of the other end */
+ c = tty_insert_flip_string(to, buf, c);
+diff -urN linux-2.6.31-rc8/drivers/cpufreq/cpufreq.c linux-2.6.31-rc9/drivers/cpufreq/cpufreq.c
+--- linux-2.6.31-rc8/drivers/cpufreq/cpufreq.c 2009-09-05 23:50:11.666498714 +0000
++++ linux-2.6.31-rc9/drivers/cpufreq/cpufreq.c 2009-09-05 23:50:17.649498992 +0000
+@@ -1250,20 +1250,11 @@
+ {
+ int ret = 0;
+
+-#ifdef __powerpc__
+ int cpu = sysdev->id;
+- unsigned int cur_freq = 0;
+ struct cpufreq_policy *cpu_policy;
+
+ dprintk("suspending cpu %u\n", cpu);
+
+- /*
+- * This whole bogosity is here because Powerbooks are made of fail.
+- * No sane platform should need any of the code below to be run.
+- * (it's entirely the wrong thing to do, as driver->get may
+- * reenable interrupts on some architectures).
+- */
+-
+ if (!cpu_online(cpu))
+ return 0;
+
+@@ -1282,47 +1273,13 @@
+
+ if (cpufreq_driver->suspend) {
+ ret = cpufreq_driver->suspend(cpu_policy, pmsg);
+- if (ret) {
++ if (ret)
+ printk(KERN_ERR "cpufreq: suspend failed in ->suspend "
+ "step on CPU %u\n", cpu_policy->cpu);
+- goto out;
+- }
+- }
+-
+- if (cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)
+- goto out;
+-
+- if (cpufreq_driver->get)
+- cur_freq = cpufreq_driver->get(cpu_policy->cpu);
+-
+- if (!cur_freq || !cpu_policy->cur) {
+- printk(KERN_ERR "cpufreq: suspend failed to assert current "
+- "frequency is what timing core thinks it is.\n");
+- goto out;
+- }
+-
+- if (unlikely(cur_freq != cpu_policy->cur)) {
+- struct cpufreq_freqs freqs;
+-
+- if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN))
+- dprintk("Warning: CPU frequency is %u, "
+- "cpufreq assumed %u kHz.\n",
+- cur_freq, cpu_policy->cur);
+-
+- freqs.cpu = cpu;
+- freqs.old = cpu_policy->cur;
+- freqs.new = cur_freq;
+-
+- srcu_notifier_call_chain(&cpufreq_transition_notifier_list,
+- CPUFREQ_SUSPENDCHANGE, &freqs);
+- adjust_jiffies(CPUFREQ_SUSPENDCHANGE, &freqs);
+-
+- cpu_policy->cur = cur_freq;
+ }
+
+ out:
+ cpufreq_cpu_put(cpu_policy);
+-#endif /* __powerpc__ */
+ return ret;
+ }
+
+@@ -1330,24 +1287,21 @@
+ * cpufreq_resume - restore proper CPU frequency handling after resume
+ *
+ * 1.) resume CPUfreq hardware support (cpufreq_driver->resume())
+- * 2.) if ->target and !CPUFREQ_CONST_LOOPS: verify we're in sync
+- * 3.) schedule call cpufreq_update_policy() ASAP as interrupts are
+- * restored.
++ * 2.) schedule call cpufreq_update_policy() ASAP as interrupts are
++ * restored. It will verify that the current freq is in sync with
++ * what we believe it to be. This is a bit later than when it
++ * should be, but nonethteless it's better than calling
++ * cpufreq_driver->get() here which might re-enable interrupts...
+ */
+ static int cpufreq_resume(struct sys_device *sysdev)
+ {
+ int ret = 0;
+
+-#ifdef __powerpc__
+ int cpu = sysdev->id;
+ struct cpufreq_policy *cpu_policy;
+
+ dprintk("resuming cpu %u\n", cpu);
+
+- /* As with the ->suspend method, all the code below is
+- * only necessary because Powerbooks suck.
+- * See commit 42d4dc3f4e1e for jokes. */
+-
+ if (!cpu_online(cpu))
+ return 0;
+
+@@ -1373,45 +1327,10 @@
+ }
+ }
+
+- if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
+- unsigned int cur_freq = 0;
+-
+- if (cpufreq_driver->get)
+- cur_freq = cpufreq_driver->get(cpu_policy->cpu);
+-
+- if (!cur_freq || !cpu_policy->cur) {
+- printk(KERN_ERR "cpufreq: resume failed to assert "
+- "current frequency is what timing core "
+- "thinks it is.\n");
+- goto out;
+- }
+-
+- if (unlikely(cur_freq != cpu_policy->cur)) {
+- struct cpufreq_freqs freqs;
+-
+- if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN))
+- dprintk("Warning: CPU frequency "
+- "is %u, cpufreq assumed %u kHz.\n",
+- cur_freq, cpu_policy->cur);
+-
+- freqs.cpu = cpu;
+- freqs.old = cpu_policy->cur;
+- freqs.new = cur_freq;
+-
+- srcu_notifier_call_chain(
+- &cpufreq_transition_notifier_list,
+- CPUFREQ_RESUMECHANGE, &freqs);
+- adjust_jiffies(CPUFREQ_RESUMECHANGE, &freqs);
+-
+- cpu_policy->cur = cur_freq;
+- }
+- }
+-
+-out:
+ schedule_work(&cpu_policy->update);
++
+ fail:
+ cpufreq_cpu_put(cpu_policy);
+-#endif /* __powerpc__ */
+ return ret;
+ }
+
+diff -urN linux-2.6.31-rc8/drivers/firewire/core-iso.c linux-2.6.31-rc9/drivers/firewire/core-iso.c
+--- linux-2.6.31-rc8/drivers/firewire/core-iso.c 2009-09-05 23:50:11.680498669 +0000
++++ linux-2.6.31-rc9/drivers/firewire/core-iso.c 2009-09-05 23:50:17.662499180 +0000
+@@ -196,7 +196,7 @@
+ switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP,
+ irm_id, generation, SCODE_100,
+ CSR_REGISTER_BASE + CSR_BANDWIDTH_AVAILABLE,
+- data, sizeof(data))) {
++ data, 8)) {
+ case RCODE_GENERATION:
+ /* A generation change frees all bandwidth. */
+ return allocate ? -EAGAIN : bandwidth;
+@@ -233,7 +233,7 @@
+ data[1] = old ^ c;
+ switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP,
+ irm_id, generation, SCODE_100,
+- offset, data, sizeof(data))) {
++ offset, data, 8)) {
+ case RCODE_GENERATION:
+ /* A generation change frees all channels. */
+ return allocate ? -EAGAIN : i;
+diff -urN linux-2.6.31-rc8/drivers/firewire/ohci.c linux-2.6.31-rc9/drivers/firewire/ohci.c
+--- linux-2.6.31-rc8/drivers/firewire/ohci.c 2009-09-05 23:50:11.690498474 +0000
++++ linux-2.6.31-rc9/drivers/firewire/ohci.c 2009-09-05 23:50:17.672498989 +0000
+@@ -34,6 +34,7 @@
+ #include <linux/module.h>
+ #include <linux/moduleparam.h>
+ #include <linux/pci.h>
++#include <linux/pci_ids.h>
+ #include <linux/spinlock.h>
+ #include <linux/string.h>
+
+@@ -2372,6 +2373,9 @@
+ #define ohci_pmac_off(dev)
+ #endif /* CONFIG_PPC_PMAC */
+
++#define PCI_VENDOR_ID_AGERE PCI_VENDOR_ID_ATT
++#define PCI_DEVICE_ID_AGERE_FW643 0x5901
++
+ static int __devinit pci_probe(struct pci_dev *dev,
+ const struct pci_device_id *ent)
+ {
+@@ -2422,6 +2426,16 @@
+ version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
+ ohci->use_dualbuffer = version >= OHCI_VERSION_1_1;
+
++ /* dual-buffer mode is broken if more than one IR context is active */
++ if (dev->vendor == PCI_VENDOR_ID_AGERE &&
++ dev->device == PCI_DEVICE_ID_AGERE_FW643)
++ ohci->use_dualbuffer = false;
++
++ /* dual-buffer mode is broken */
++ if (dev->vendor == PCI_VENDOR_ID_RICOH &&
++ dev->device == PCI_DEVICE_ID_RICOH_R5C832)
++ ohci->use_dualbuffer = false;
++
+ /* x86-32 currently doesn't use highmem for dma_alloc_coherent */
+ #if !defined(CONFIG_X86_32)
+ /* dual-buffer mode is broken with descriptor addresses above 2G */
+diff -urN linux-2.6.31-rc8/drivers/firewire/sbp2.c linux-2.6.31-rc9/drivers/firewire/sbp2.c
+--- linux-2.6.31-rc8/drivers/firewire/sbp2.c 2009-09-05 23:50:11.691498656 +0000
++++ linux-2.6.31-rc9/drivers/firewire/sbp2.c 2009-09-05 23:50:17.673311941 +0000
+@@ -456,12 +456,12 @@
+ }
+ spin_unlock_irqrestore(&card->lock, flags);
+
+- if (&orb->link != &lu->orb_list)
++ if (&orb->link != &lu->orb_list) {
+ orb->callback(orb, &status);
+- else
++ kref_put(&orb->kref, free_orb);
++ } else {
+ fw_error("status write for unknown orb\n");
+-
+- kref_put(&orb->kref, free_orb);
++ }
+
+ fw_send_response(card, request, RCODE_COMPLETE);
+ }
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/i915_drv.h linux-2.6.31-rc9/drivers/gpu/drm/i915/i915_drv.h
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/i915_drv.h 2009-09-05 23:50:11.701311044 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/i915_drv.h 2009-09-05 23:50:17.684346452 +0000
+@@ -222,6 +222,7 @@
+ unsigned int edp_support:1;
+ int lvds_ssc_freq;
+
++ int crt_ddc_bus; /* -1 = unknown, else GPIO to use for CRT DDC */
+ struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */
+ int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
+ int num_fence_regs; /* 8 on pre-965, 16 otherwise */
+@@ -384,6 +385,9 @@
+ */
+ struct list_head inactive_list;
+
++ /** LRU list of objects with fence regs on them. */
++ struct list_head fence_list;
++
+ /**
+ * List of breadcrumbs associated with GPU requests currently
+ * outstanding.
+@@ -451,6 +455,9 @@
+ /** This object's place on the active/flushing/inactive lists */
+ struct list_head list;
+
++ /** This object's place on the fenced object LRU */
++ struct list_head fence_list;
++
+ /**
+ * This is set if the object is on the active or flushing lists
+ * (has pending rendering), and is not set if it's on inactive (ready
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/i915_gem.c linux-2.6.31-rc9/drivers/gpu/drm/i915/i915_gem.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/i915_gem.c 2009-09-05 23:50:11.702311469 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/i915_gem.c 2009-09-05 23:50:17.685499045 +0000
+@@ -978,6 +978,7 @@
+ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
+ {
++ struct drm_i915_private *dev_priv = dev->dev_private;
+ struct drm_i915_gem_set_domain *args = data;
+ struct drm_gem_object *obj;
+ uint32_t read_domains = args->read_domains;
+@@ -1010,8 +1011,18 @@
+ obj, obj->size, read_domains, write_domain);
+ #endif
+ if (read_domains & I915_GEM_DOMAIN_GTT) {
++ struct drm_i915_gem_object *obj_priv = obj->driver_private;
++
+ ret = i915_gem_object_set_to_gtt_domain(obj, write_domain != 0);
+
++ /* Update the LRU on the fence for the CPU access that's
++ * about to occur.
++ */
++ if (obj_priv->fence_reg != I915_FENCE_REG_NONE) {
++ list_move_tail(&obj_priv->fence_list,
++ &dev_priv->mm.fence_list);
++ }
++
+ /* Silently promote "you're not bound, there was nothing to do"
+ * to success, since the client was just asking us to
+ * make sure everything was done.
+@@ -1155,8 +1166,7 @@
+ }
+
+ /* Need a new fence register? */
+- if (obj_priv->fence_reg == I915_FENCE_REG_NONE &&
+- obj_priv->tiling_mode != I915_TILING_NONE) {
++ if (obj_priv->tiling_mode != I915_TILING_NONE) {
+ ret = i915_gem_object_get_fence_reg(obj);
+ if (ret) {
+ mutex_unlock(&dev->struct_mutex);
+@@ -2208,6 +2218,12 @@
+ struct drm_i915_gem_object *old_obj_priv = NULL;
+ int i, ret, avail;
+
++ /* Just update our place in the LRU if our fence is getting used. */
++ if (obj_priv->fence_reg != I915_FENCE_REG_NONE) {
++ list_move_tail(&obj_priv->fence_list, &dev_priv->mm.fence_list);
++ return 0;
++ }
++
+ switch (obj_priv->tiling_mode) {
+ case I915_TILING_NONE:
+ WARN(1, "allocating a fence for non-tiled object?\n");
+@@ -2229,7 +2245,6 @@
+ }
+
+ /* First try to find a free reg */
+-try_again:
+ avail = 0;
+ for (i = dev_priv->fence_reg_start; i < dev_priv->num_fence_regs; i++) {
+ reg = &dev_priv->fence_regs[i];
+@@ -2243,52 +2258,41 @@
+
+ /* None available, try to steal one or wait for a user to finish */
+ if (i == dev_priv->num_fence_regs) {
+- uint32_t seqno = dev_priv->mm.next_gem_seqno;
++ struct drm_gem_object *old_obj = NULL;
+
+ if (avail == 0)
+ return -ENOSPC;
+
+- for (i = dev_priv->fence_reg_start;
+- i < dev_priv->num_fence_regs; i++) {
+- uint32_t this_seqno;
++ list_for_each_entry(old_obj_priv, &dev_priv->mm.fence_list,
++ fence_list) {
++ old_obj = old_obj_priv->obj;
+
+- reg = &dev_priv->fence_regs[i];
+- old_obj_priv = reg->obj->driver_private;
++ reg = &dev_priv->fence_regs[old_obj_priv->fence_reg];
+
+ if (old_obj_priv->pin_count)
+ continue;
+
++ /* Take a reference, as otherwise the wait_rendering
++ * below may cause the object to get freed out from
++ * under us.
++ */
++ drm_gem_object_reference(old_obj);
++
+ /* i915 uses fences for GPU access to tiled buffers */
+ if (IS_I965G(dev) || !old_obj_priv->active)
+ break;
+
+- /* find the seqno of the first available fence */
+- this_seqno = old_obj_priv->last_rendering_seqno;
+- if (this_seqno != 0 &&
+- reg->obj->write_domain == 0 &&
+- i915_seqno_passed(seqno, this_seqno))
+- seqno = this_seqno;
+- }
+-
+- /*
+- * Now things get ugly... we have to wait for one of the
+- * objects to finish before trying again.
+- */
+- if (i == dev_priv->num_fence_regs) {
+- if (seqno == dev_priv->mm.next_gem_seqno) {
+- i915_gem_flush(dev,
+- I915_GEM_GPU_DOMAINS,
+- I915_GEM_GPU_DOMAINS);
+- seqno = i915_add_request(dev, NULL,
+- I915_GEM_GPU_DOMAINS);
+- if (seqno == 0)
+- return -ENOMEM;
+- }
+-
+- ret = i915_wait_request(dev, seqno);
+- if (ret)
++ /* This brings the object to the head of the LRU if it
++ * had been written to. The only way this should
++ * result in us waiting longer than the expected
++ * optimal amount of time is if there was a
++ * fence-using buffer later that was read-only.
++ */
++ i915_gem_object_flush_gpu_write_domain(old_obj);
++ ret = i915_gem_object_wait_rendering(old_obj);
++ if (ret != 0)
+ return ret;
+- goto try_again;
++ break;
+ }
+
+ /*
+@@ -2296,10 +2300,15 @@
+ * for this object next time we need it.
+ */
+ i915_gem_release_mmap(reg->obj);
++ i = old_obj_priv->fence_reg;
+ old_obj_priv->fence_reg = I915_FENCE_REG_NONE;
++ list_del_init(&old_obj_priv->fence_list);
++ drm_gem_object_unreference(old_obj);
+ }
+
+ obj_priv->fence_reg = i;
++ list_add_tail(&obj_priv->fence_list, &dev_priv->mm.fence_list);
++
+ reg->obj = obj;
+
+ if (IS_I965G(dev))
+@@ -2342,6 +2351,7 @@
+
+ dev_priv->fence_regs[obj_priv->fence_reg].obj = NULL;
+ obj_priv->fence_reg = I915_FENCE_REG_NONE;
++ list_del_init(&obj_priv->fence_list);
+ }
+
+ /**
+@@ -3595,9 +3605,7 @@
+ * Pre-965 chips need a fence register set up in order to
+ * properly handle tiled surfaces.
+ */
+- if (!IS_I965G(dev) &&
+- obj_priv->fence_reg == I915_FENCE_REG_NONE &&
+- obj_priv->tiling_mode != I915_TILING_NONE) {
++ if (!IS_I965G(dev) && obj_priv->tiling_mode != I915_TILING_NONE) {
+ ret = i915_gem_object_get_fence_reg(obj);
+ if (ret != 0) {
+ if (ret != -EBUSY && ret != -ERESTARTSYS)
+@@ -3806,6 +3814,7 @@
+ obj_priv->obj = obj;
+ obj_priv->fence_reg = I915_FENCE_REG_NONE;
+ INIT_LIST_HEAD(&obj_priv->list);
++ INIT_LIST_HEAD(&obj_priv->fence_list);
+
+ return 0;
+ }
+@@ -4253,6 +4262,7 @@
+ INIT_LIST_HEAD(&dev_priv->mm.flushing_list);
+ INIT_LIST_HEAD(&dev_priv->mm.inactive_list);
+ INIT_LIST_HEAD(&dev_priv->mm.request_list);
++ INIT_LIST_HEAD(&dev_priv->mm.fence_list);
+ INIT_DELAYED_WORK(&dev_priv->mm.retire_work,
+ i915_gem_retire_work_handler);
+ dev_priv->mm.next_gem_seqno = 1;
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_bios.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_bios.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_bios.c 2009-09-05 23:50:11.705503624 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_bios.c 2009-09-05 23:50:17.688407136 +0000
+@@ -59,6 +59,16 @@
+ return NULL;
+ }
+
++static u16
++get_blocksize(void *p)
++{
++ u16 *block_ptr, block_size;
++
++ block_ptr = (u16 *)((char *)p - 2);
++ block_size = *block_ptr;
++ return block_size;
++}
++
+ static void
+ fill_detail_timing_data(struct drm_display_mode *panel_fixed_mode,
+ struct lvds_dvo_timing *dvo_timing)
+@@ -215,6 +225,41 @@
+ }
+
+ static void
++parse_general_definitions(struct drm_i915_private *dev_priv,
++ struct bdb_header *bdb)
++{
++ struct bdb_general_definitions *general;
++ const int crt_bus_map_table[] = {
++ GPIOB,
++ GPIOA,
++ GPIOC,
++ GPIOD,
++ GPIOE,
++ GPIOF,
++ };
++
++ /* Set sensible defaults in case we can't find the general block
++ or it is the wrong chipset */
++ dev_priv->crt_ddc_bus = -1;
++
++ general = find_section(bdb, BDB_GENERAL_DEFINITIONS);
++ if (general) {
++ u16 block_size = get_blocksize(general);
++ if (block_size >= sizeof(*general)) {
++ int bus_pin = general->crt_ddc_gmbus_pin;
++ DRM_DEBUG("crt_ddc_bus_pin: %d\n", bus_pin);
++ if ((bus_pin >= 1) && (bus_pin <= 6)) {
++ dev_priv->crt_ddc_bus =
++ crt_bus_map_table[bus_pin-1];
++ }
++ } else {
++ DRM_DEBUG("BDB_GD too small (%d). Invalid.\n",
++ block_size);
++ }
++ }
++}
++
++static void
+ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv,
+ struct bdb_header *bdb)
+ {
+@@ -222,7 +267,7 @@
+ struct bdb_general_definitions *p_defs;
+ struct child_device_config *p_child;
+ int i, child_device_num, count;
+- u16 block_size, *block_ptr;
++ u16 block_size;
+
+ p_defs = find_section(bdb, BDB_GENERAL_DEFINITIONS);
+ if (!p_defs) {
+@@ -240,8 +285,7 @@
+ return;
+ }
+ /* get the block size of general definitions */
+- block_ptr = (u16 *)((char *)p_defs - 2);
+- block_size = *block_ptr;
++ block_size = get_blocksize(p_defs);
+ /* get the number of child device */
+ child_device_num = (block_size - sizeof(*p_defs)) /
+ sizeof(*p_child);
+@@ -362,6 +406,7 @@
+
+ /* Grab useful general definitions */
+ parse_general_features(dev_priv, bdb);
++ parse_general_definitions(dev_priv, bdb);
+ parse_lfp_panel_data(dev_priv, bdb);
+ parse_sdvo_panel_data(dev_priv, bdb);
+ parse_sdvo_device_mapping(dev_priv, bdb);
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_crt.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_crt.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_crt.c 2009-09-05 23:50:11.705503624 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_crt.c 2009-09-05 23:50:17.688407136 +0000
+@@ -508,6 +508,7 @@
+ {
+ struct drm_connector *connector;
+ struct intel_output *intel_output;
++ struct drm_i915_private *dev_priv = dev->dev_private;
+ u32 i2c_reg;
+
+ intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL);
+@@ -527,8 +528,12 @@
+ /* Set up the DDC bus. */
+ if (IS_IGDNG(dev))
+ i2c_reg = PCH_GPIOA;
+- else
++ else {
+ i2c_reg = GPIOA;
++ /* Use VBT information for CRT DDC if available */
++ if (dev_priv->crt_ddc_bus != -1)
++ i2c_reg = dev_priv->crt_ddc_bus;
++ }
+ intel_output->ddc_bus = intel_i2c_create(dev, i2c_reg, "CRTDDC_A");
+ if (!intel_output->ddc_bus) {
+ dev_printk(KERN_ERR, &dev->pdev->dev, "DDC bus registration "
+@@ -537,6 +542,10 @@
+ }
+
+ intel_output->type = INTEL_OUTPUT_ANALOG;
++ intel_output->clone_mask = (1 << INTEL_SDVO_NON_TV_CLONE_BIT) |
++ (1 << INTEL_ANALOG_CLONE_BIT) |
++ (1 << INTEL_SDVO_LVDS_CLONE_BIT);
++ intel_output->crtc_mask = (1 << 0) | (1 << 1);
+ connector->interlace_allowed = 0;
+ connector->doublescan_allowed = 0;
+
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_display.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_display.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_display.c 2009-09-05 23:50:11.707498593 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_display.c 2009-09-05 23:50:17.690311818 +0000
+@@ -666,7 +666,7 @@
+ intel_clock_t clock;
+ int err = target;
+
+- if (IS_I9XX(dev) && intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) &&
++ if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) &&
+ (I915_READ(LVDS)) != 0) {
+ /*
+ * For LVDS, if the panel is on, just rely on its current
+@@ -2396,7 +2396,7 @@
+ if (is_sdvo) {
+ dpll |= DPLL_DVO_HIGH_SPEED;
+ sdvo_pixel_multiply = adjusted_mode->clock / mode->clock;
+- if (IS_I945G(dev) || IS_I945GM(dev))
++ if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))
+ dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES;
+ else if (IS_IGDNG(dev))
+ dpll |= (sdvo_pixel_multiply - 1) << PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT;
+@@ -3170,7 +3170,7 @@
+
+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+ struct intel_output *intel_output = to_intel_output(connector);
+- if (type_mask & (1 << intel_output->type))
++ if (type_mask & intel_output->clone_mask)
+ index_mask |= (1 << entry);
+ entry++;
+ }
+@@ -3218,30 +3218,30 @@
+ intel_dp_init(dev, PCH_DP_D);
+
+ } else if (IS_I9XX(dev)) {
+- int found;
+- u32 reg;
++ bool found = false;
+
+ if (I915_READ(SDVOB) & SDVO_DETECTED) {
+ found = intel_sdvo_init(dev, SDVOB);
+ if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
+ intel_hdmi_init(dev, SDVOB);
++
+ if (!found && SUPPORTS_INTEGRATED_DP(dev))
+ intel_dp_init(dev, DP_B);
+ }
+
+ /* Before G4X SDVOC doesn't have its own detect register */
+- if (IS_G4X(dev))
+- reg = SDVOC;
+- else
+- reg = SDVOB;
+
+- if (I915_READ(reg) & SDVO_DETECTED) {
++ if (I915_READ(SDVOB) & SDVO_DETECTED)
+ found = intel_sdvo_init(dev, SDVOC);
+- if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
++
++ if (!found && (I915_READ(SDVOC) & SDVO_DETECTED)) {
++
++ if (SUPPORTS_INTEGRATED_HDMI(dev))
+ intel_hdmi_init(dev, SDVOC);
+- if (!found && SUPPORTS_INTEGRATED_DP(dev))
++ if (SUPPORTS_INTEGRATED_DP(dev))
+ intel_dp_init(dev, DP_C);
+ }
++
+ if (SUPPORTS_INTEGRATED_DP(dev) && (I915_READ(DP_D) & DP_DETECTED))
+ intel_dp_init(dev, DP_D);
+ } else
+@@ -3253,51 +3253,10 @@
+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+ struct intel_output *intel_output = to_intel_output(connector);
+ struct drm_encoder *encoder = &intel_output->enc;
+- int crtc_mask = 0, clone_mask = 0;
+
+- /* valid crtcs */
+- switch(intel_output->type) {
+- case INTEL_OUTPUT_HDMI:
+- crtc_mask = ((1 << 0)|
+- (1 << 1));
+- clone_mask = ((1 << INTEL_OUTPUT_HDMI));
+- break;
+- case INTEL_OUTPUT_DVO:
+- case INTEL_OUTPUT_SDVO:
+- crtc_mask = ((1 << 0)|
+- (1 << 1));
+- clone_mask = ((1 << INTEL_OUTPUT_ANALOG) |
+- (1 << INTEL_OUTPUT_DVO) |
+- (1 << INTEL_OUTPUT_SDVO));
+- break;
+- case INTEL_OUTPUT_ANALOG:
+- crtc_mask = ((1 << 0)|
+- (1 << 1));
+- clone_mask = ((1 << INTEL_OUTPUT_ANALOG) |
+- (1 << INTEL_OUTPUT_DVO) |
+- (1 << INTEL_OUTPUT_SDVO));
+- break;
+- case INTEL_OUTPUT_LVDS:
+- crtc_mask = (1 << 1);
+- clone_mask = (1 << INTEL_OUTPUT_LVDS);
+- break;
+- case INTEL_OUTPUT_TVOUT:
+- crtc_mask = ((1 << 0) |
+- (1 << 1));
+- clone_mask = (1 << INTEL_OUTPUT_TVOUT);
+- break;
+- case INTEL_OUTPUT_DISPLAYPORT:
+- crtc_mask = ((1 << 0) |
+- (1 << 1));
+- clone_mask = (1 << INTEL_OUTPUT_DISPLAYPORT);
+- break;
+- case INTEL_OUTPUT_EDP:
+- crtc_mask = (1 << 1);
+- clone_mask = (1 << INTEL_OUTPUT_EDP);
+- break;
+- }
+- encoder->possible_crtcs = crtc_mask;
+- encoder->possible_clones = intel_connector_clones(dev, clone_mask);
++ encoder->possible_crtcs = intel_output->crtc_mask;
++ encoder->possible_clones = intel_connector_clones(dev,
++ intel_output->clone_mask);
+ }
+ }
+
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_dp.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_dp.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_dp.c 2009-09-05 23:50:11.707498593 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_dp.c 2009-09-05 23:50:17.691498888 +0000
+@@ -1254,6 +1254,18 @@
+ else
+ intel_output->type = INTEL_OUTPUT_DISPLAYPORT;
+
++ if (output_reg == DP_B)
++ intel_output->clone_mask = (1 << INTEL_DP_B_CLONE_BIT);
++ else if (output_reg == DP_C)
++ intel_output->clone_mask = (1 << INTEL_DP_C_CLONE_BIT);
++ else if (output_reg == DP_D)
++ intel_output->clone_mask = (1 << INTEL_DP_D_CLONE_BIT);
++
++ if (IS_eDP(intel_output)) {
++ intel_output->crtc_mask = (1 << 1);
++ intel_output->clone_mask = (1 << INTEL_OUTPUT_EDP);
++ } else
++ intel_output->crtc_mask = (1 << 0) | (1 << 1);
+ connector->interlace_allowed = true;
+ connector->doublescan_allowed = 0;
+
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_drv.h linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_drv.h
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_drv.h 2009-09-05 23:50:11.708499105 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_drv.h 2009-09-05 23:50:17.691498888 +0000
+@@ -57,6 +57,24 @@
+ #define INTEL_OUTPUT_DISPLAYPORT 7
+ #define INTEL_OUTPUT_EDP 8
+
++/* Intel Pipe Clone Bit */
++#define INTEL_HDMIB_CLONE_BIT 1
++#define INTEL_HDMIC_CLONE_BIT 2
++#define INTEL_HDMID_CLONE_BIT 3
++#define INTEL_HDMIE_CLONE_BIT 4
++#define INTEL_HDMIF_CLONE_BIT 5
++#define INTEL_SDVO_NON_TV_CLONE_BIT 6
++#define INTEL_SDVO_TV_CLONE_BIT 7
++#define INTEL_SDVO_LVDS_CLONE_BIT 8
++#define INTEL_ANALOG_CLONE_BIT 9
++#define INTEL_TV_CLONE_BIT 10
++#define INTEL_DP_B_CLONE_BIT 11
++#define INTEL_DP_C_CLONE_BIT 12
++#define INTEL_DP_D_CLONE_BIT 13
++#define INTEL_LVDS_CLONE_BIT 14
++#define INTEL_DVO_TMDS_CLONE_BIT 15
++#define INTEL_DVO_LVDS_CLONE_BIT 16
++
+ #define INTEL_DVO_CHIP_NONE 0
+ #define INTEL_DVO_CHIP_LVDS 1
+ #define INTEL_DVO_CHIP_TMDS 2
+@@ -86,6 +104,8 @@
+ bool needs_tv_clock;
+ void *dev_priv;
+ void (*hot_plug)(struct intel_output *);
++ int crtc_mask;
++ int clone_mask;
+ };
+
+ struct intel_crtc {
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_dvo.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_dvo.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_dvo.c 2009-09-05 23:50:11.708499105 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_dvo.c 2009-09-05 23:50:17.691498888 +0000
+@@ -435,14 +435,20 @@
+ continue;
+
+ intel_output->type = INTEL_OUTPUT_DVO;
++ intel_output->crtc_mask = (1 << 0) | (1 << 1);
+ switch (dvo->type) {
+ case INTEL_DVO_CHIP_TMDS:
++ intel_output->clone_mask =
++ (1 << INTEL_DVO_TMDS_CLONE_BIT) |
++ (1 << INTEL_ANALOG_CLONE_BIT);
+ drm_connector_init(dev, connector,
+ &intel_dvo_connector_funcs,
+ DRM_MODE_CONNECTOR_DVII);
+ encoder_type = DRM_MODE_ENCODER_TMDS;
+ break;
+ case INTEL_DVO_CHIP_LVDS:
++ intel_output->clone_mask =
++ (1 << INTEL_DVO_LVDS_CLONE_BIT);
+ drm_connector_init(dev, connector,
+ &intel_dvo_connector_funcs,
+ DRM_MODE_CONNECTOR_LVDS);
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_hdmi.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_hdmi.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_hdmi.c 2009-09-05 23:50:11.709396058 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_hdmi.c 2009-09-05 23:50:17.692319670 +0000
+@@ -230,22 +230,28 @@
+
+ connector->interlace_allowed = 0;
+ connector->doublescan_allowed = 0;
++ intel_output->crtc_mask = (1 << 0) | (1 << 1);
+
+ /* Set up the DDC bus. */
+- if (sdvox_reg == SDVOB)
++ if (sdvox_reg == SDVOB) {
++ intel_output->clone_mask = (1 << INTEL_HDMIB_CLONE_BIT);
+ intel_output->ddc_bus = intel_i2c_create(dev, GPIOE, "HDMIB");
+- else if (sdvox_reg == SDVOC)
++ } else if (sdvox_reg == SDVOC) {
++ intel_output->clone_mask = (1 << INTEL_HDMIC_CLONE_BIT);
+ intel_output->ddc_bus = intel_i2c_create(dev, GPIOD, "HDMIC");
+- else if (sdvox_reg == HDMIB)
++ } else if (sdvox_reg == HDMIB) {
++ intel_output->clone_mask = (1 << INTEL_HDMID_CLONE_BIT);
+ intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOE,
+ "HDMIB");
+- else if (sdvox_reg == HDMIC)
++ } else if (sdvox_reg == HDMIC) {
++ intel_output->clone_mask = (1 << INTEL_HDMIE_CLONE_BIT);
+ intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOD,
+ "HDMIC");
+- else if (sdvox_reg == HDMID)
++ } else if (sdvox_reg == HDMID) {
++ intel_output->clone_mask = (1 << INTEL_HDMIF_CLONE_BIT);
+ intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOF,
+ "HDMID");
+-
++ }
+ if (!intel_output->ddc_bus)
+ goto err_connector;
+
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_lvds.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_lvds.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_lvds.c 2009-09-05 23:50:11.709396058 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_lvds.c 2009-09-05 23:50:17.693311492 +0000
+@@ -916,6 +916,8 @@
+ drm_mode_connector_attach_encoder(&intel_output->base, &intel_output->enc);
+ intel_output->type = INTEL_OUTPUT_LVDS;
+
++ intel_output->clone_mask = (1 << INTEL_LVDS_CLONE_BIT);
++ intel_output->crtc_mask = (1 << 1);
+ drm_encoder_helper_add(encoder, &intel_lvds_helper_funcs);
+ drm_connector_helper_add(connector, &intel_lvds_connector_helper_funcs);
+ connector->display_info.subpixel_order = SubPixelHorizontalRGB;
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_sdvo.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_sdvo.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_sdvo.c 2009-09-05 23:50:11.710311120 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_sdvo.c 2009-09-05 23:50:17.694499019 +0000
+@@ -1458,7 +1458,7 @@
+ (SDVO_OUTPUT_RGB0 | SDVO_OUTPUT_RGB1))
+ caps++;
+ if (sdvo_priv->caps.output_flags &
+- (SDVO_OUTPUT_SVID0 | SDVO_OUTPUT_SVID0))
++ (SDVO_OUTPUT_SVID0 | SDVO_OUTPUT_SVID1))
+ caps++;
+ if (sdvo_priv->caps.output_flags &
+ (SDVO_OUTPUT_CVBS0 | SDVO_OUTPUT_CVBS1))
+@@ -1967,6 +1967,9 @@
+ intel_sdvo_set_colorimetry(intel_output,
+ SDVO_COLORIMETRY_RGB256);
+ connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;
++ intel_output->clone_mask =
++ (1 << INTEL_SDVO_NON_TV_CLONE_BIT) |
++ (1 << INTEL_ANALOG_CLONE_BIT);
+ }
+ } else if (flags & SDVO_OUTPUT_SVID0) {
+
+@@ -1975,11 +1978,14 @@
+ connector->connector_type = DRM_MODE_CONNECTOR_SVIDEO;
+ sdvo_priv->is_tv = true;
+ intel_output->needs_tv_clock = true;
++ intel_output->clone_mask = 1 << INTEL_SDVO_TV_CLONE_BIT;
+ } else if (flags & SDVO_OUTPUT_RGB0) {
+
+ sdvo_priv->controlled_output = SDVO_OUTPUT_RGB0;
+ encoder->encoder_type = DRM_MODE_ENCODER_DAC;
+ connector->connector_type = DRM_MODE_CONNECTOR_VGA;
++ intel_output->clone_mask = (1 << INTEL_SDVO_NON_TV_CLONE_BIT) |
++ (1 << INTEL_ANALOG_CLONE_BIT);
+ } else if (flags & SDVO_OUTPUT_RGB1) {
+
+ sdvo_priv->controlled_output = SDVO_OUTPUT_RGB1;
+@@ -1991,12 +1997,16 @@
+ encoder->encoder_type = DRM_MODE_ENCODER_LVDS;
+ connector->connector_type = DRM_MODE_CONNECTOR_LVDS;
+ sdvo_priv->is_lvds = true;
++ intel_output->clone_mask = (1 << INTEL_ANALOG_CLONE_BIT) |
++ (1 << INTEL_SDVO_LVDS_CLONE_BIT);
+ } else if (flags & SDVO_OUTPUT_LVDS1) {
+
+ sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS1;
+ encoder->encoder_type = DRM_MODE_ENCODER_LVDS;
+ connector->connector_type = DRM_MODE_CONNECTOR_LVDS;
+ sdvo_priv->is_lvds = true;
++ intel_output->clone_mask = (1 << INTEL_ANALOG_CLONE_BIT) |
++ (1 << INTEL_SDVO_LVDS_CLONE_BIT);
+ } else {
+
+ unsigned char bytes[2];
+@@ -2009,6 +2019,7 @@
+ bytes[0], bytes[1]);
+ ret = false;
+ }
++ intel_output->crtc_mask = (1 << 0) | (1 << 1);
+
+ if (ret && registered)
+ ret = drm_sysfs_connector_add(connector) == 0 ? true : false;
+diff -urN linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_tv.c linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_tv.c
+--- linux-2.6.31-rc8/drivers/gpu/drm/i915/intel_tv.c 2009-09-05 23:50:11.711311637 +0000
++++ linux-2.6.31-rc9/drivers/gpu/drm/i915/intel_tv.c 2009-09-05 23:50:17.694499019 +0000
+@@ -1718,6 +1718,7 @@
+ if (!intel_output) {
+ return;
+ }
++
+ connector = &intel_output->base;
+
+ drm_connector_init(dev, connector, &intel_tv_connector_funcs,
+@@ -1729,6 +1730,7 @@
+ drm_mode_connector_attach_encoder(&intel_output->base, &intel_output->enc);
+ tv_priv = (struct intel_tv_priv *)(intel_output + 1);
+ intel_output->type = INTEL_OUTPUT_TVOUT;
++ intel_output->clone_mask = (1 << INTEL_TV_CLONE_BIT);
+ intel_output->enc.possible_crtcs = ((1 << 0) | (1 << 1));
+ intel_output->enc.possible_clones = (1 << INTEL_OUTPUT_TVOUT);
+ intel_output->dev_priv = tv_priv;
+diff -urN linux-2.6.31-rc8/drivers/input/keyboard/atkbd.c linux-2.6.31-rc9/drivers/input/keyboard/atkbd.c
+--- linux-2.6.31-rc8/drivers/input/keyboard/atkbd.c 2009-09-05 23:50:11.787499015 +0000
++++ linux-2.6.31-rc9/drivers/input/keyboard/atkbd.c 2009-09-05 23:50:17.772499189 +0000
+@@ -880,6 +880,14 @@
+ };
+
+ /*
++ * Perform fixup for HP (Compaq) Presario R4000 R4100 R4200 that don't generate
++ * release for their volume buttons
++ */
++static unsigned int atkbd_hp_r4000_forced_release_keys[] = {
++ 0xae, 0xb0, -1U
++};
++
++/*
+ * Samsung NC10,NC20 with Fn+F? key release not working
+ */
+ static unsigned int atkbd_samsung_forced_release_keys[] = {
+@@ -1537,6 +1545,33 @@
+ .driver_data = atkbd_hp_zv6100_forced_release_keys,
+ },
+ {
++ .ident = "HP Presario R4000",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4000"),
++ },
++ .callback = atkbd_setup_forced_release,
++ .driver_data = atkbd_hp_r4000_forced_release_keys,
++ },
++ {
++ .ident = "HP Presario R4100",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4100"),
++ },
++ .callback = atkbd_setup_forced_release,
++ .driver_data = atkbd_hp_r4000_forced_release_keys,
++ },
++ {
++ .ident = "HP Presario R4200",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4200"),
++ },
++ .callback = atkbd_setup_forced_release,
++ .driver_data = atkbd_hp_r4000_forced_release_keys,
++ },
++ {
+ .ident = "Inventec Symphony",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "INVENTEC"),
+diff -urN linux-2.6.31-rc8/drivers/input/serio/i8042-x86ia64io.h linux-2.6.31-rc9/drivers/input/serio/i8042-x86ia64io.h
+--- linux-2.6.31-rc8/drivers/input/serio/i8042-x86ia64io.h 2009-09-05 23:50:11.793311111 +0000
++++ linux-2.6.31-rc9/drivers/input/serio/i8042-x86ia64io.h 2009-09-05 23:50:17.777499025 +0000
+@@ -382,6 +382,14 @@
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
+ },
+ },
++ {
++ .ident = "Acer Aspire 5536",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"),
++ DMI_MATCH(DMI_PRODUCT_VERSION, "0100"),
++ },
++ },
+ { }
+ };
+
+diff -urN linux-2.6.31-rc8/drivers/md/dm-exception-store.c linux-2.6.31-rc9/drivers/md/dm-exception-store.c
+--- linux-2.6.31-rc8/drivers/md/dm-exception-store.c 2009-09-05 23:50:11.821311511 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-exception-store.c 2009-09-05 23:50:17.805391698 +0000
+@@ -171,6 +171,14 @@
+ */
+ chunk_size_ulong = round_up(chunk_size_ulong, PAGE_SIZE >> 9);
+
++ return dm_exception_store_set_chunk_size(store, chunk_size_ulong,
++ error);
++}
++
++int dm_exception_store_set_chunk_size(struct dm_exception_store *store,
++ unsigned long chunk_size_ulong,
++ char **error)
++{
+ /* Check chunk_size is a power of 2 */
+ if (!is_power_of_2(chunk_size_ulong)) {
+ *error = "Chunk size is not a power of 2";
+@@ -183,6 +191,11 @@
+ return -EINVAL;
+ }
+
++ if (chunk_size_ulong > INT_MAX >> SECTOR_SHIFT) {
++ *error = "Chunk size is too high";
++ return -EINVAL;
++ }
++
+ store->chunk_size = chunk_size_ulong;
+ store->chunk_mask = chunk_size_ulong - 1;
+ store->chunk_shift = ffs(chunk_size_ulong) - 1;
+diff -urN linux-2.6.31-rc8/drivers/md/dm-exception-store.h linux-2.6.31-rc9/drivers/md/dm-exception-store.h
+--- linux-2.6.31-rc8/drivers/md/dm-exception-store.h 2009-09-05 23:50:11.821311511 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-exception-store.h 2009-09-05 23:50:17.805391698 +0000
+@@ -168,6 +168,10 @@
+ int dm_exception_store_type_register(struct dm_exception_store_type *type);
+ int dm_exception_store_type_unregister(struct dm_exception_store_type *type);
+
++int dm_exception_store_set_chunk_size(struct dm_exception_store *store,
++ unsigned long chunk_size_ulong,
++ char **error);
++
+ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv,
+ unsigned *args_used,
+ struct dm_exception_store **store);
+diff -urN linux-2.6.31-rc8/drivers/md/dm-log-userspace-base.c linux-2.6.31-rc9/drivers/md/dm-log-userspace-base.c
+--- linux-2.6.31-rc8/drivers/md/dm-log-userspace-base.c 2009-09-05 23:50:11.822465611 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-log-userspace-base.c 2009-09-05 23:50:17.807499053 +0000
+@@ -21,6 +21,7 @@
+ struct dm_target *ti;
+ uint32_t region_size;
+ region_t region_count;
++ uint64_t luid;
+ char uuid[DM_UUID_LEN];
+
+ char *usr_argv_str;
+@@ -63,7 +64,7 @@
+ * restored.
+ */
+ retry:
+- r = dm_consult_userspace(uuid, request_type, data,
++ r = dm_consult_userspace(uuid, lc->luid, request_type, data,
+ data_size, rdata, rdata_size);
+
+ if (r != -ESRCH)
+@@ -74,14 +75,15 @@
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(2*HZ);
+ DMWARN("Attempting to contact userspace log server...");
+- r = dm_consult_userspace(uuid, DM_ULOG_CTR, lc->usr_argv_str,
++ r = dm_consult_userspace(uuid, lc->luid, DM_ULOG_CTR,
++ lc->usr_argv_str,
+ strlen(lc->usr_argv_str) + 1,
+ NULL, NULL);
+ if (!r)
+ break;
+ }
+ DMINFO("Reconnected to userspace log server... DM_ULOG_CTR complete");
+- r = dm_consult_userspace(uuid, DM_ULOG_RESUME, NULL,
++ r = dm_consult_userspace(uuid, lc->luid, DM_ULOG_RESUME, NULL,
+ 0, NULL, NULL);
+ if (!r)
+ goto retry;
+@@ -111,10 +113,9 @@
+ return -ENOMEM;
+ }
+
+- for (i = 0, str_size = 0; i < argc; i++)
+- str_size += sprintf(str + str_size, "%s ", argv[i]);
+- str_size += sprintf(str + str_size, "%llu",
+- (unsigned long long)ti->len);
++ str_size = sprintf(str, "%llu", (unsigned long long)ti->len);
++ for (i = 0; i < argc; i++)
++ str_size += sprintf(str + str_size, " %s", argv[i]);
+
+ *ctr_str = str;
+ return str_size;
+@@ -154,6 +155,9 @@
+ return -ENOMEM;
+ }
+
++ /* The ptr value is sufficient for local unique id */
++ lc->luid = (uint64_t)lc;
++
+ lc->ti = ti;
+
+ if (strlen(argv[0]) > (DM_UUID_LEN - 1)) {
+@@ -173,7 +177,7 @@
+ }
+
+ /* Send table string */
+- r = dm_consult_userspace(lc->uuid, DM_ULOG_CTR,
++ r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_CTR,
+ ctr_str, str_size, NULL, NULL);
+
+ if (r == -ESRCH) {
+@@ -183,7 +187,7 @@
+
+ /* Since the region size does not change, get it now */
+ rdata_size = sizeof(rdata);
+- r = dm_consult_userspace(lc->uuid, DM_ULOG_GET_REGION_SIZE,
++ r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_GET_REGION_SIZE,
+ NULL, 0, (char *)&rdata, &rdata_size);
+
+ if (r) {
+@@ -212,7 +216,7 @@
+ int r;
+ struct log_c *lc = log->context;
+
+- r = dm_consult_userspace(lc->uuid, DM_ULOG_DTR,
++ r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_DTR,
+ NULL, 0,
+ NULL, NULL);
+
+@@ -227,7 +231,7 @@
+ int r;
+ struct log_c *lc = log->context;
+
+- r = dm_consult_userspace(lc->uuid, DM_ULOG_PRESUSPEND,
++ r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_PRESUSPEND,
+ NULL, 0,
+ NULL, NULL);
+
+@@ -239,7 +243,7 @@
+ int r;
+ struct log_c *lc = log->context;
+
+- r = dm_consult_userspace(lc->uuid, DM_ULOG_POSTSUSPEND,
++ r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_POSTSUSPEND,
+ NULL, 0,
+ NULL, NULL);
+
+@@ -252,7 +256,7 @@
+ struct log_c *lc = log->context;
+
+ lc->in_sync_hint = 0;
+- r = dm_consult_userspace(lc->uuid, DM_ULOG_RESUME,
++ r = dm_consult_userspace(lc->uuid, lc->luid, DM_ULOG_RESUME,
+ NULL, 0,
+ NULL, NULL);
+
+@@ -561,6 +565,7 @@
+ char *result, unsigned maxlen)
+ {
+ int r = 0;
++ char *table_args;
+ size_t sz = (size_t)maxlen;
+ struct log_c *lc = log->context;
+
+@@ -577,8 +582,12 @@
+ break;
+ case STATUSTYPE_TABLE:
+ sz = 0;
+- DMEMIT("%s %u %s %s", log->type->name, lc->usr_argc + 1,
+- lc->uuid, lc->usr_argv_str);
++ table_args = strstr(lc->usr_argv_str, " ");
++ BUG_ON(!table_args); /* There will always be a ' ' */
++ table_args++;
++
++ DMEMIT("%s %u %s %s ", log->type->name, lc->usr_argc,
++ lc->uuid, table_args);
+ break;
+ }
+ return (r) ? 0 : (int)sz;
+diff -urN linux-2.6.31-rc8/drivers/md/dm-log-userspace-transfer.c linux-2.6.31-rc9/drivers/md/dm-log-userspace-transfer.c
+--- linux-2.6.31-rc8/drivers/md/dm-log-userspace-transfer.c 2009-09-05 23:50:11.823486028 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-log-userspace-transfer.c 2009-09-05 23:50:17.807499053 +0000
+@@ -147,7 +147,8 @@
+
+ /**
+ * dm_consult_userspace
+- * @uuid: log's uuid (must be DM_UUID_LEN in size)
++ * @uuid: log's universal unique identifier (must be DM_UUID_LEN in size)
++ * @luid: log's local unique identifier
+ * @request_type: found in include/linux/dm-log-userspace.h
+ * @data: data to tx to the server
+ * @data_size: size of data in bytes
+@@ -163,7 +164,7 @@
+ *
+ * Returns: 0 on success, -EXXX on failure
+ **/
+-int dm_consult_userspace(const char *uuid, int request_type,
++int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
+ char *data, size_t data_size,
+ char *rdata, size_t *rdata_size)
+ {
+@@ -190,6 +191,7 @@
+
+ memset(tfr, 0, DM_ULOG_PREALLOCED_SIZE - overhead_size);
+ memcpy(tfr->uuid, uuid, DM_UUID_LEN);
++ tfr->luid = luid;
+ tfr->seq = dm_ulog_seq++;
+
+ /*
+diff -urN linux-2.6.31-rc8/drivers/md/dm-log-userspace-transfer.h linux-2.6.31-rc9/drivers/md/dm-log-userspace-transfer.h
+--- linux-2.6.31-rc8/drivers/md/dm-log-userspace-transfer.h 2009-09-05 23:50:11.823486028 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-log-userspace-transfer.h 2009-09-05 23:50:17.807499053 +0000
+@@ -11,7 +11,7 @@
+
+ int dm_ulog_tfr_init(void);
+ void dm_ulog_tfr_exit(void);
+-int dm_consult_userspace(const char *uuid, int request_type,
++int dm_consult_userspace(const char *uuid, uint64_t luid, int request_type,
+ char *data, size_t data_size,
+ char *rdata, size_t *rdata_size);
+
+diff -urN linux-2.6.31-rc8/drivers/md/dm-raid1.c linux-2.6.31-rc9/drivers/md/dm-raid1.c
+--- linux-2.6.31-rc8/drivers/md/dm-raid1.c 2009-09-05 23:50:11.824498998 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-raid1.c 2009-09-05 23:50:17.808498945 +0000
+@@ -648,7 +648,13 @@
+ */
+ dm_rh_inc_pending(ms->rh, &sync);
+ dm_rh_inc_pending(ms->rh, &nosync);
+- ms->log_failure = dm_rh_flush(ms->rh) ? 1 : 0;
++
++ /*
++ * If the flush fails on a previous call and succeeds here,
++ * we must not reset the log_failure variable. We need
++ * userspace interaction to do that.
++ */
++ ms->log_failure = dm_rh_flush(ms->rh) ? 1 : ms->log_failure;
+
+ /*
+ * Dispatch io.
+diff -urN linux-2.6.31-rc8/drivers/md/dm-snap-persistent.c linux-2.6.31-rc9/drivers/md/dm-snap-persistent.c
+--- linux-2.6.31-rc8/drivers/md/dm-snap-persistent.c 2009-09-05 23:50:11.825498907 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-snap-persistent.c 2009-09-05 23:50:17.809335129 +0000
+@@ -106,6 +106,13 @@
+ void *zero_area;
+
+ /*
++ * An area used for header. The header can be written
++ * concurrently with metadata (when invalidating the snapshot),
++ * so it needs a separate buffer.
++ */
++ void *header_area;
++
++ /*
+ * Used to keep track of which metadata area the data in
+ * 'chunk' refers to.
+ */
+@@ -148,16 +155,27 @@
+ */
+ ps->area = vmalloc(len);
+ if (!ps->area)
+- return r;
++ goto err_area;
+
+ ps->zero_area = vmalloc(len);
+- if (!ps->zero_area) {
+- vfree(ps->area);
+- return r;
+- }
++ if (!ps->zero_area)
++ goto err_zero_area;
+ memset(ps->zero_area, 0, len);
+
++ ps->header_area = vmalloc(len);
++ if (!ps->header_area)
++ goto err_header_area;
++
+ return 0;
++
++err_header_area:
++ vfree(ps->zero_area);
++
++err_zero_area:
++ vfree(ps->area);
++
++err_area:
++ return r;
+ }
+
+ static void free_area(struct pstore *ps)
+@@ -169,6 +187,10 @@
+ if (ps->zero_area)
+ vfree(ps->zero_area);
+ ps->zero_area = NULL;
++
++ if (ps->header_area)
++ vfree(ps->header_area);
++ ps->header_area = NULL;
+ }
+
+ struct mdata_req {
+@@ -188,7 +210,8 @@
+ /*
+ * Read or write a chunk aligned and sized block of data from a device.
+ */
+-static int chunk_io(struct pstore *ps, chunk_t chunk, int rw, int metadata)
++static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw,
++ int metadata)
+ {
+ struct dm_io_region where = {
+ .bdev = ps->store->cow->bdev,
+@@ -198,7 +221,7 @@
+ struct dm_io_request io_req = {
+ .bi_rw = rw,
+ .mem.type = DM_IO_VMA,
+- .mem.ptr.vma = ps->area,
++ .mem.ptr.vma = area,
+ .client = ps->io_client,
+ .notify.fn = NULL,
+ };
+@@ -240,7 +263,7 @@
+
+ chunk = area_location(ps, ps->current_area);
+
+- r = chunk_io(ps, chunk, rw, 0);
++ r = chunk_io(ps, ps->area, chunk, rw, 0);
+ if (r)
+ return r;
+
+@@ -254,20 +277,7 @@
+
+ static int zero_disk_area(struct pstore *ps, chunk_t area)
+ {
+- struct dm_io_region where = {
+- .bdev = ps->store->cow->bdev,
+- .sector = ps->store->chunk_size * area_location(ps, area),
+- .count = ps->store->chunk_size,
+- };
+- struct dm_io_request io_req = {
+- .bi_rw = WRITE,
+- .mem.type = DM_IO_VMA,
+- .mem.ptr.vma = ps->zero_area,
+- .client = ps->io_client,
+- .notify.fn = NULL,
+- };
+-
+- return dm_io(&io_req, 1, &where, NULL);
++ return chunk_io(ps, ps->zero_area, area_location(ps, area), WRITE, 0);
+ }
+
+ static int read_header(struct pstore *ps, int *new_snapshot)
+@@ -276,6 +286,7 @@
+ struct disk_header *dh;
+ chunk_t chunk_size;
+ int chunk_size_supplied = 1;
++ char *chunk_err;
+
+ /*
+ * Use default chunk size (or hardsect_size, if larger) if none supplied
+@@ -297,11 +308,11 @@
+ if (r)
+ return r;
+
+- r = chunk_io(ps, 0, READ, 1);
++ r = chunk_io(ps, ps->header_area, 0, READ, 1);
+ if (r)
+ goto bad;
+
+- dh = (struct disk_header *) ps->area;
++ dh = ps->header_area;
+
+ if (le32_to_cpu(dh->magic) == 0) {
+ *new_snapshot = 1;
+@@ -319,20 +330,25 @@
+ ps->version = le32_to_cpu(dh->version);
+ chunk_size = le32_to_cpu(dh->chunk_size);
+
+- if (!chunk_size_supplied || ps->store->chunk_size == chunk_size)
++ if (ps->store->chunk_size == chunk_size)
+ return 0;
+
+- DMWARN("chunk size %llu in device metadata overrides "
+- "table chunk size of %llu.",
+- (unsigned long long)chunk_size,
+- (unsigned long long)ps->store->chunk_size);
++ if (chunk_size_supplied)
++ DMWARN("chunk size %llu in device metadata overrides "
++ "table chunk size of %llu.",
++ (unsigned long long)chunk_size,
++ (unsigned long long)ps->store->chunk_size);
+
+ /* We had a bogus chunk_size. Fix stuff up. */
+ free_area(ps);
+
+- ps->store->chunk_size = chunk_size;
+- ps->store->chunk_mask = chunk_size - 1;
+- ps->store->chunk_shift = ffs(chunk_size) - 1;
++ r = dm_exception_store_set_chunk_size(ps->store, chunk_size,
++ &chunk_err);
++ if (r) {
++ DMERR("invalid on-disk chunk size %llu: %s.",
++ (unsigned long long)chunk_size, chunk_err);
++ return r;
++ }
+
+ r = dm_io_client_resize(sectors_to_pages(ps->store->chunk_size),
+ ps->io_client);
+@@ -351,15 +367,15 @@
+ {
+ struct disk_header *dh;
+
+- memset(ps->area, 0, ps->store->chunk_size << SECTOR_SHIFT);
++ memset(ps->header_area, 0, ps->store->chunk_size << SECTOR_SHIFT);
+
+- dh = (struct disk_header *) ps->area;
++ dh = ps->header_area;
+ dh->magic = cpu_to_le32(SNAP_MAGIC);
+ dh->valid = cpu_to_le32(ps->valid);
+ dh->version = cpu_to_le32(ps->version);
+ dh->chunk_size = cpu_to_le32(ps->store->chunk_size);
+
+- return chunk_io(ps, 0, WRITE, 1);
++ return chunk_io(ps, ps->header_area, 0, WRITE, 1);
+ }
+
+ /*
+@@ -679,6 +695,8 @@
+ ps->valid = 1;
+ ps->version = SNAPSHOT_DISK_VERSION;
+ ps->area = NULL;
++ ps->zero_area = NULL;
++ ps->header_area = NULL;
+ ps->next_free = 2; /* skipping the header and first area */
+ ps->current_committed = 0;
+
+diff -urN linux-2.6.31-rc8/drivers/md/dm-snap.c linux-2.6.31-rc9/drivers/md/dm-snap.c
+--- linux-2.6.31-rc8/drivers/md/dm-snap.c 2009-09-05 23:50:11.825498907 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-snap.c 2009-09-05 23:50:17.810311506 +0000
+@@ -1176,6 +1176,15 @@
+ return 0;
+ }
+
++static int snapshot_iterate_devices(struct dm_target *ti,
++ iterate_devices_callout_fn fn, void *data)
++{
++ struct dm_snapshot *snap = ti->private;
++
++ return fn(ti, snap->origin, 0, ti->len, data);
++}
++
++
+ /*-----------------------------------------------------------------
+ * Origin methods
+ *---------------------------------------------------------------*/
+@@ -1410,20 +1419,29 @@
+ return 0;
+ }
+
++static int origin_iterate_devices(struct dm_target *ti,
++ iterate_devices_callout_fn fn, void *data)
++{
++ struct dm_dev *dev = ti->private;
++
++ return fn(ti, dev, 0, ti->len, data);
++}
++
+ static struct target_type origin_target = {
+ .name = "snapshot-origin",
+- .version = {1, 6, 0},
++ .version = {1, 7, 0},
+ .module = THIS_MODULE,
+ .ctr = origin_ctr,
+ .dtr = origin_dtr,
+ .map = origin_map,
+ .resume = origin_resume,
+ .status = origin_status,
++ .iterate_devices = origin_iterate_devices,
+ };
+
+ static struct target_type snapshot_target = {
+ .name = "snapshot",
+- .version = {1, 6, 0},
++ .version = {1, 7, 0},
+ .module = THIS_MODULE,
+ .ctr = snapshot_ctr,
+ .dtr = snapshot_dtr,
+@@ -1431,6 +1449,7 @@
+ .end_io = snapshot_end_io,
+ .resume = snapshot_resume,
+ .status = snapshot_status,
++ .iterate_devices = snapshot_iterate_devices,
+ };
+
+ static int __init dm_snapshot_init(void)
+diff -urN linux-2.6.31-rc8/drivers/md/dm-stripe.c linux-2.6.31-rc9/drivers/md/dm-stripe.c
+--- linux-2.6.31-rc8/drivers/md/dm-stripe.c 2009-09-05 23:50:11.825498907 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-stripe.c 2009-09-05 23:50:17.810311506 +0000
+@@ -329,9 +329,19 @@
+ return ret;
+ }
+
++static void stripe_io_hints(struct dm_target *ti,
++ struct queue_limits *limits)
++{
++ struct stripe_c *sc = ti->private;
++ unsigned chunk_size = (sc->chunk_mask + 1) << 9;
++
++ blk_limits_io_min(limits, chunk_size);
++ limits->io_opt = chunk_size * sc->stripes;
++}
++
+ static struct target_type stripe_target = {
+ .name = "striped",
+- .version = {1, 2, 0},
++ .version = {1, 3, 0},
+ .module = THIS_MODULE,
+ .ctr = stripe_ctr,
+ .dtr = stripe_dtr,
+@@ -339,6 +349,7 @@
+ .end_io = stripe_end_io,
+ .status = stripe_status,
+ .iterate_devices = stripe_iterate_devices,
++ .io_hints = stripe_io_hints,
+ };
+
+ int __init dm_stripe_init(void)
+diff -urN linux-2.6.31-rc8/drivers/md/dm-table.c linux-2.6.31-rc9/drivers/md/dm-table.c
+--- linux-2.6.31-rc8/drivers/md/dm-table.c 2009-09-05 23:50:11.826469632 +0000
++++ linux-2.6.31-rc9/drivers/md/dm-table.c 2009-09-05 23:50:17.810311506 +0000
+@@ -343,10 +343,10 @@
+ }
+
+ /*
+- * If possible, this checks an area of a destination device is valid.
++ * If possible, this checks an area of a destination device is invalid.
+ */
+-static int device_area_is_valid(struct dm_target *ti, struct dm_dev *dev,
+- sector_t start, sector_t len, void *data)
++static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev,
++ sector_t start, sector_t len, void *data)
+ {
+ struct queue_limits *limits = data;
+ struct block_device *bdev = dev->bdev;
+@@ -357,36 +357,40 @@
+ char b[BDEVNAME_SIZE];
+
+ if (!dev_size)
+- return 1;
++ return 0;
+
+ if ((start >= dev_size) || (start + len > dev_size)) {
+- DMWARN("%s: %s too small for target",
+- dm_device_name(ti->table->md), bdevname(bdev, b));
+- return 0;
++ DMWARN("%s: %s too small for target: "
++ "start=%llu, len=%llu, dev_size=%llu",
++ dm_device_name(ti->table->md), bdevname(bdev, b),
++ (unsigned long long)start,
++ (unsigned long long)len,
++ (unsigned long long)dev_size);
++ return 1;
+ }
+
+ if (logical_block_size_sectors <= 1)
+- return 1;
++ return 0;
+
+ if (start & (logical_block_size_sectors - 1)) {
+ DMWARN("%s: start=%llu not aligned to h/w "
+- "logical block size %hu of %s",
++ "logical block size %u of %s",
+ dm_device_name(ti->table->md),
+ (unsigned long long)start,
+ limits->logical_block_size, bdevname(bdev, b));
+- return 0;
++ return 1;
+ }
+
+ if (len & (logical_block_size_sectors - 1)) {
+ DMWARN("%s: len=%llu not aligned to h/w "
+- "logical block size %hu of %s",
++ "logical block size %u of %s",
+ dm_device_name(ti->table->md),
+ (unsigned long long)len,
+ limits->logical_block_size, bdevname(bdev, b));
+- return 0;
++ return 1;
+ }
+
+- return 1;
++ return 0;
+ }
+
+ /*
+@@ -496,8 +500,15 @@
+ }
+
+ if (blk_stack_limits(limits, &q->limits, start << 9) < 0)
+- DMWARN("%s: target device %s is misaligned",
+- dm_device_name(ti->table->md), bdevname(bdev, b));
++ DMWARN("%s: target device %s is misaligned: "
++ "physical_block_size=%u, logical_block_size=%u, "
++ "alignment_offset=%u, start=%llu",
++ dm_device_name(ti->table->md), bdevname(bdev, b),
++ q->limits.physical_block_size,
++ q->limits.logical_block_size,
++ q->limits.alignment_offset,
++ (unsigned long long) start << 9);
++
+
+ /*
+ * Check if merge fn is supported.
+@@ -698,7 +709,7 @@
+
+ if (remaining) {
+ DMWARN("%s: table line %u (start sect %llu len %llu) "
+- "not aligned to h/w logical block size %hu",
++ "not aligned to h/w logical block size %u",
+ dm_device_name(table->md), i,
+ (unsigned long long) ti->begin,
+ (unsigned long long) ti->len,
+@@ -996,12 +1007,16 @@
+ ti->type->iterate_devices(ti, dm_set_device_limits,
+ &ti_limits);
+
++ /* Set I/O hints portion of queue limits */
++ if (ti->type->io_hints)
++ ti->type->io_hints(ti, &ti_limits);
++
+ /*
+ * Check each device area is consistent with the target's
+ * overall queue limits.
+ */
+- if (!ti->type->iterate_devices(ti, device_area_is_valid,
+- &ti_limits))
++ if (ti->type->iterate_devices(ti, device_area_is_invalid,
++ &ti_limits))
+ return -EINVAL;
+
+ combine_limits:
+diff -urN linux-2.6.31-rc8/drivers/md/dm.c linux-2.6.31-rc9/drivers/md/dm.c
+--- linux-2.6.31-rc8/drivers/md/dm.c 2009-09-05 23:50:11.827311032 +0000
++++ linux-2.6.31-rc9/drivers/md/dm.c 2009-09-05 23:50:17.811499201 +0000
+@@ -738,16 +738,22 @@
+ dm_put(md);
+ }
+
++static void free_rq_clone(struct request *clone)
++{
++ struct dm_rq_target_io *tio = clone->end_io_data;
++
++ blk_rq_unprep_clone(clone);
++ free_rq_tio(tio);
++}
++
+ static void dm_unprep_request(struct request *rq)
+ {
+ struct request *clone = rq->special;
+- struct dm_rq_target_io *tio = clone->end_io_data;
+
+ rq->special = NULL;
+ rq->cmd_flags &= ~REQ_DONTPREP;
+
+- blk_rq_unprep_clone(clone);
+- free_rq_tio(tio);
++ free_rq_clone(clone);
+ }
+
+ /*
+@@ -825,8 +831,7 @@
+ rq->sense_len = clone->sense_len;
+ }
+
+- BUG_ON(clone->bio);
+- free_rq_tio(tio);
++ free_rq_clone(clone);
+
+ blk_end_request_all(rq, error);
+
+diff -urN linux-2.6.31-rc8/drivers/media/dvb/siano/Kconfig linux-2.6.31-rc9/drivers/media/dvb/siano/Kconfig
+--- linux-2.6.31-rc8/drivers/media/dvb/siano/Kconfig 2009-09-05 23:50:11.855498734 +0000
++++ linux-2.6.31-rc9/drivers/media/dvb/siano/Kconfig 2009-09-05 23:50:17.839498988 +0000
+@@ -2,25 +2,33 @@
+ # Siano Mobile Silicon Digital TV device configuration
+ #
+
+-config DVB_SIANO_SMS1XXX
+- tristate "Siano SMS1XXX USB dongle support"
+- depends on DVB_CORE && USB && INPUT
++config SMS_SIANO_MDTV
++ tristate "Siano SMS1xxx based MDTV receiver"
++ depends on DVB_CORE && INPUT
+ ---help---
+- Choose Y here if you have a USB dongle with a SMS1XXX chipset.
++ Choose Y or M here if you have MDTV receiver with a Siano chipset.
+
+- To compile this driver as a module, choose M here: the
+- module will be called sms1xxx.
++ To compile this driver as a module, choose M here
++ (The module will be called smsmdtv).
+
+-config DVB_SIANO_SMS1XXX_SMS_IDS
+- bool "Enable support for Siano Mobile Silicon default USB IDs"
+- depends on DVB_SIANO_SMS1XXX
+- default y
+- ---help---
+- Choose Y here if you have a USB dongle with a SMS1XXX chipset
+- that uses Siano Mobile Silicon's default usb vid:pid.
++ Further documentation on this driver can be found on the WWW
++ at http://www.siano-ms.com/
++
++if SMS_SIANO_MDTV
++menu "Siano module components"
+
+- Choose N here if you would prefer to use Siano's external driver.
++# Hardware interfaces support
+
+- Further documentation on this driver can be found on the WWW at
+- <http://www.siano-ms.com/>.
++config SMS_USB_DRV
++ tristate "USB interface support"
++ depends on DVB_CORE && USB
++ ---help---
++ Choose if you would like to have Siano's support for USB interface
+
++config SMS_SDIO_DRV
++ tristate "SDIO interface support"
++ depends on DVB_CORE && MMC
++ ---help---
++ Choose if you would like to have Siano's support for SDIO interface
++endmenu
++endif # SMS_SIANO_MDTV
+diff -urN linux-2.6.31-rc8/drivers/media/dvb/siano/Makefile linux-2.6.31-rc9/drivers/media/dvb/siano/Makefile
+--- linux-2.6.31-rc8/drivers/media/dvb/siano/Makefile 2009-09-05 23:50:11.855498734 +0000
++++ linux-2.6.31-rc9/drivers/media/dvb/siano/Makefile 2009-09-05 23:50:17.839498988 +0000
+@@ -1,8 +1,9 @@
+-sms1xxx-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o
+
+-obj-$(CONFIG_DVB_SIANO_SMS1XXX) += sms1xxx.o
+-obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsusb.o
+-obj-$(CONFIG_DVB_SIANO_SMS1XXX) += smsdvb.o
++smsmdtv-objs := smscoreapi.o sms-cards.o smsendian.o smsir.o
++
++obj-$(CONFIG_SMS_SIANO_MDTV) += smsmdtv.o smsdvb.o
++obj-$(CONFIG_SMS_USB_DRV) += smsusb.o
++obj-$(CONFIG_SMS_SDIO_DRV) += smssdio.o
+
+ EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
+
+diff -urN linux-2.6.31-rc8/drivers/media/dvb/siano/smsdvb.c linux-2.6.31-rc9/drivers/media/dvb/siano/smsdvb.c
+--- linux-2.6.31-rc8/drivers/media/dvb/siano/smsdvb.c 2009-09-05 23:50:11.857498771 +0000
++++ linux-2.6.31-rc9/drivers/media/dvb/siano/smsdvb.c 2009-09-05 23:50:17.841499038 +0000
+@@ -325,6 +325,16 @@
+ 0 : -ETIME;
+ }
+
++static inline int led_feedback(struct smsdvb_client_t *client)
++{
++ if (client->fe_status & FE_HAS_LOCK)
++ return sms_board_led_feedback(client->coredev,
++ (client->sms_stat_dvb.ReceptionData.BER
++ == 0) ? SMS_LED_HI : SMS_LED_LO);
++ else
++ return sms_board_led_feedback(client->coredev, SMS_LED_OFF);
++}
++
+ static int smsdvb_read_status(struct dvb_frontend *fe, fe_status_t *stat)
+ {
+ struct smsdvb_client_t *client;
+@@ -332,6 +342,8 @@
+
+ *stat = client->fe_status;
+
++ led_feedback(client);
++
+ return 0;
+ }
+
+@@ -342,6 +354,8 @@
+
+ *ber = client->sms_stat_dvb.ReceptionData.BER;
+
++ led_feedback(client);
++
+ return 0;
+ }
+
+@@ -359,6 +373,8 @@
+ (client->sms_stat_dvb.ReceptionData.InBandPwr
+ + 95) * 3 / 2;
+
++ led_feedback(client);
++
+ return 0;
+ }
+
+@@ -369,6 +385,8 @@
+
+ *snr = client->sms_stat_dvb.ReceptionData.SNR;
+
++ led_feedback(client);
++
+ return 0;
+ }
+
+@@ -379,6 +397,8 @@
+
+ *ucblocks = client->sms_stat_dvb.ReceptionData.ErrorTSPackets;
+
++ led_feedback(client);
++
+ return 0;
+ }
+
+@@ -404,6 +424,8 @@
+ u32 Data[3];
+ } Msg;
+
++ int ret;
++
+ client->fe_status = FE_HAS_SIGNAL;
+ client->event_fe_state = -1;
+ client->event_unc_state = -1;
+@@ -426,6 +448,23 @@
+ case BANDWIDTH_AUTO: return -EOPNOTSUPP;
+ default: return -EINVAL;
+ }
++ /* Disable LNA, if any. An error is returned if no LNA is present */
++ ret = sms_board_lna_control(client->coredev, 0);
++ if (ret == 0) {
++ fe_status_t status;
++
++ /* tune with LNA off at first */
++ ret = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
++ &client->tune_done);
++
++ smsdvb_read_status(fe, &status);
++
++ if (status & FE_HAS_LOCK)
++ return ret;
++
++ /* previous tune didnt lock - enable LNA and tune again */
++ sms_board_lna_control(client->coredev, 1);
++ }
+
+ return smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
+ &client->tune_done);
+@@ -451,6 +490,8 @@
+ struct smsdvb_client_t *client =
+ container_of(fe, struct smsdvb_client_t, frontend);
+
++ sms_board_power(client->coredev, 1);
++
+ sms_board_dvb3_event(client, DVB3_EVENT_INIT);
+ return 0;
+ }
+@@ -460,6 +501,9 @@
+ struct smsdvb_client_t *client =
+ container_of(fe, struct smsdvb_client_t, frontend);
+
++ sms_board_led_feedback(client->coredev, SMS_LED_OFF);
++ sms_board_power(client->coredev, 0);
++
+ sms_board_dvb3_event(client, DVB3_EVENT_SLEEP);
+
+ return 0;
+diff -urN linux-2.6.31-rc8/drivers/media/dvb/siano/smssdio.c linux-2.6.31-rc9/drivers/media/dvb/siano/smssdio.c
+--- linux-2.6.31-rc8/drivers/media/dvb/siano/smssdio.c 2009-09-05 23:50:11.858498880 +0000
++++ linux-2.6.31-rc9/drivers/media/dvb/siano/smssdio.c 2009-09-05 23:50:17.842499130 +0000
+@@ -46,6 +46,7 @@
+
+ #define SMSSDIO_DATA 0x00
+ #define SMSSDIO_INT 0x04
++#define SMSSDIO_BLOCK_SIZE 128
+
+ static const struct sdio_device_id smssdio_ids[] = {
+ {SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR),
+@@ -85,7 +86,8 @@
+ sdio_claim_host(smsdev->func);
+
+ while (size >= smsdev->func->cur_blksize) {
+- ret = sdio_write_blocks(smsdev->func, SMSSDIO_DATA, buffer, 1);
++ ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA,
++ buffer, smsdev->func->cur_blksize);
+ if (ret)
+ goto out;
+
+@@ -94,8 +96,8 @@
+ }
+
+ if (size) {
+- ret = sdio_write_bytes(smsdev->func, SMSSDIO_DATA,
+- buffer, size);
++ ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA,
++ buffer, size);
+ }
+
+ out:
+@@ -125,23 +127,23 @@
+ */
+ isr = sdio_readb(func, SMSSDIO_INT, &ret);
+ if (ret) {
+- dev_err(&smsdev->func->dev,
+- "Unable to read interrupt register!\n");
++ sms_err("Unable to read interrupt register!\n");
+ return;
+ }
+
+ if (smsdev->split_cb == NULL) {
+ cb = smscore_getbuffer(smsdev->coredev);
+ if (!cb) {
+- dev_err(&smsdev->func->dev,
+- "Unable to allocate data buffer!\n");
++ sms_err("Unable to allocate data buffer!\n");
+ return;
+ }
+
+- ret = sdio_read_blocks(smsdev->func, cb->p, SMSSDIO_DATA, 1);
++ ret = sdio_memcpy_fromio(smsdev->func,
++ cb->p,
++ SMSSDIO_DATA,
++ SMSSDIO_BLOCK_SIZE);
+ if (ret) {
+- dev_err(&smsdev->func->dev,
+- "Error %d reading initial block!\n", ret);
++ sms_err("Error %d reading initial block!\n", ret);
+ return;
+ }
+
+@@ -152,7 +154,10 @@
+ return;
+ }
+
+- size = hdr->msgLength - smsdev->func->cur_blksize;
++ if (hdr->msgLength > smsdev->func->cur_blksize)
++ size = hdr->msgLength - smsdev->func->cur_blksize;
++ else
++ size = 0;
+ } else {
+ cb = smsdev->split_cb;
+ hdr = cb->p;
+@@ -162,23 +167,24 @@
+ smsdev->split_cb = NULL;
+ }
+
+- if (hdr->msgLength > smsdev->func->cur_blksize) {
++ if (size) {
+ void *buffer;
+
+- size = ALIGN(size, 128);
+- buffer = cb->p + hdr->msgLength;
++ buffer = cb->p + (hdr->msgLength - size);
++ size = ALIGN(size, SMSSDIO_BLOCK_SIZE);
+
+- BUG_ON(smsdev->func->cur_blksize != 128);
++ BUG_ON(smsdev->func->cur_blksize != SMSSDIO_BLOCK_SIZE);
+
+ /*
+ * First attempt to transfer all of it in one go...
+ */
+- ret = sdio_read_blocks(smsdev->func, buffer,
+- SMSSDIO_DATA, size / 128);
++ ret = sdio_memcpy_fromio(smsdev->func,
++ buffer,
++ SMSSDIO_DATA,
++ size);
+ if (ret && ret != -EINVAL) {
+ smscore_putbuffer(smsdev->coredev, cb);
+- dev_err(&smsdev->func->dev,
+- "Error %d reading data from card!\n", ret);
++ sms_err("Error %d reading data from card!\n", ret);
+ return;
+ }
+
+@@ -191,12 +197,12 @@
+ */
+ if (ret == -EINVAL) {
+ while (size) {
+- ret = sdio_read_blocks(smsdev->func,
+- buffer, SMSSDIO_DATA, 1);
++ ret = sdio_memcpy_fromio(smsdev->func,
++ buffer, SMSSDIO_DATA,
++ smsdev->func->cur_blksize);
+ if (ret) {
+ smscore_putbuffer(smsdev->coredev, cb);
+- dev_err(&smsdev->func->dev,
+- "Error %d reading "
++ sms_err("Error %d reading "
+ "data from card!\n", ret);
+ return;
+ }
+@@ -269,7 +275,7 @@
+ if (ret)
+ goto release;
+
+- ret = sdio_set_block_size(func, 128);
++ ret = sdio_set_block_size(func, SMSSDIO_BLOCK_SIZE);
+ if (ret)
+ goto disable;
+
+diff -urN linux-2.6.31-rc8/drivers/media/video/em28xx/em28xx-cards.c linux-2.6.31-rc9/drivers/media/video/em28xx/em28xx-cards.c
+--- linux-2.6.31-rc8/drivers/media/video/em28xx/em28xx-cards.c 2009-09-05 23:50:11.879498884 +0000
++++ linux-2.6.31-rc9/drivers/media/video/em28xx/em28xx-cards.c 2009-09-05 23:50:17.864498953 +0000
+@@ -1730,6 +1730,25 @@
+ EM28XX_I2C_FREQ_100_KHZ;
+ }
+
++
++/* FIXME: Should be replaced by a proper mt9m111 driver */
++static int em28xx_initialize_mt9m111(struct em28xx *dev)
++{
++ int i;
++ unsigned char regs[][3] = {
++ { 0x0d, 0x00, 0x01, }, /* reset and use defaults */
++ { 0x0d, 0x00, 0x00, },
++ { 0x0a, 0x00, 0x21, },
++ { 0x21, 0x04, 0x00, }, /* full readout speed, no row/col skipping */
++ };
++
++ for (i = 0; i < ARRAY_SIZE(regs); i++)
++ i2c_master_send(&dev->i2c_client, &regs[i][0], 3);
++
++ return 0;
++}
++
++
+ /* FIXME: Should be replaced by a proper mt9m001 driver */
+ static int em28xx_initialize_mt9m001(struct em28xx *dev)
+ {
+@@ -1758,7 +1777,7 @@
+
+ /* HINT method: webcam I2C chips
+ *
+- * This method work for webcams with Micron sensors
++ * This method works for webcams with Micron sensors
+ */
+ static int em28xx_hint_sensor(struct em28xx *dev)
+ {
+@@ -1804,6 +1823,23 @@
+ dev->vinctl = 0x00;
+
+ break;
++
++ case 0x143a: /* MT9M111 as found in the ECS G200 */
++ dev->model = EM2750_BOARD_UNKNOWN;
++ em28xx_set_model(dev);
++
++ sensor_name = "mt9m111";
++ dev->board.xclk = EM28XX_XCLK_FREQUENCY_48MHZ;
++ dev->em28xx_sensor = EM28XX_MT9M111;
++ em28xx_initialize_mt9m111(dev);
++ dev->sensor_xres = 640;
++ dev->sensor_yres = 512;
++
++ dev->vinmode = 0x0a;
++ dev->vinctl = 0x00;
++
++ break;
++
+ case 0x8431:
+ dev->model = EM2750_BOARD_UNKNOWN;
+ em28xx_set_model(dev);
+@@ -1820,7 +1856,7 @@
+
+ break;
+ default:
+- printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version));
++ printk("Unknown Micron Sensor 0x%04x\n", version);
+ return -EINVAL;
+ }
+
+@@ -2346,7 +2382,9 @@
+ }
+
+ em28xx_tuner_setup(dev);
+- em28xx_ir_init(dev);
++
++ if(!disable_ir)
++ em28xx_ir_init(dev);
+ }
+
+
+diff -urN linux-2.6.31-rc8/drivers/media/video/em28xx/em28xx.h linux-2.6.31-rc9/drivers/media/video/em28xx/em28xx.h
+--- linux-2.6.31-rc8/drivers/media/video/em28xx/em28xx.h 2009-09-05 23:50:11.881311213 +0000
++++ linux-2.6.31-rc9/drivers/media/video/em28xx/em28xx.h 2009-09-05 23:50:17.865356458 +0000
+@@ -367,6 +367,7 @@
+ EM28XX_NOSENSOR = 0,
+ EM28XX_MT9V011,
+ EM28XX_MT9M001,
++ EM28XX_MT9M111,
+ };
+
+ enum em28xx_adecoder {
+diff -urN linux-2.6.31-rc8/drivers/media/video/gspca/Kconfig linux-2.6.31-rc9/drivers/media/video/gspca/Kconfig
+--- linux-2.6.31-rc8/drivers/media/video/gspca/Kconfig 2009-09-05 23:50:11.881311213 +0000
++++ linux-2.6.31-rc9/drivers/media/video/gspca/Kconfig 2009-09-05 23:50:17.866487702 +0000
+@@ -114,7 +114,7 @@
+
+ config USB_GSPCA_SN9C20X_EVDEV
+ bool "Enable evdev support"
+- depends on USB_GSPCA_SN9C20X
++ depends on USB_GSPCA_SN9C20X && INPUT
+ ---help---
+ Say Y here in order to enable evdev support for sn9c20x webcam button.
+
+diff -urN linux-2.6.31-rc8/drivers/media/video/zr364xx.c linux-2.6.31-rc9/drivers/media/video/zr364xx.c
+--- linux-2.6.31-rc8/drivers/media/video/zr364xx.c 2009-09-05 23:50:11.928434017 +0000
++++ linux-2.6.31-rc9/drivers/media/video/zr364xx.c 2009-09-05 23:50:17.913311867 +0000
+@@ -695,7 +695,7 @@
+ for (i = 0; i < 2; i++) {
+ err =
+ send_control_msg(udev, 1, init[cam->method][i].value,
+- 0, init[i][cam->method].bytes,
++ 0, init[cam->method][i].bytes,
+ init[cam->method][i].size);
+ if (err < 0) {
+ dev_err(&udev->dev, "error during release sequence\n");
+diff -urN linux-2.6.31-rc8/drivers/mtd/devices/m25p80.c linux-2.6.31-rc9/drivers/mtd/devices/m25p80.c
+--- linux-2.6.31-rc8/drivers/mtd/devices/m25p80.c 2009-09-05 23:50:11.958473390 +0000
++++ linux-2.6.31-rc9/drivers/mtd/devices/m25p80.c 2009-09-05 23:50:17.943312235 +0000
+@@ -736,7 +736,7 @@
+ flash->partitioned = 1;
+ return add_mtd_partitions(&flash->mtd, parts, nr_parts);
+ }
+- } else if (data->nr_parts)
++ } else if (data && data->nr_parts)
+ dev_warn(&spi->dev, "ignoring %d default partitions on %s\n",
+ data->nr_parts, data->name);
+
+diff -urN linux-2.6.31-rc8/drivers/mtd/nftlcore.c linux-2.6.31-rc9/drivers/mtd/nftlcore.c
+--- linux-2.6.31-rc8/drivers/mtd/nftlcore.c 2009-09-05 23:50:11.966498696 +0000
++++ linux-2.6.31-rc9/drivers/mtd/nftlcore.c 2009-09-05 23:50:17.951499008 +0000
+@@ -135,16 +135,17 @@
+ int nftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len,
+ size_t *retlen, uint8_t *buf)
+ {
++ loff_t mask = mtd->writesize - 1;
+ struct mtd_oob_ops ops;
+ int res;
+
+ ops.mode = MTD_OOB_PLACE;
+- ops.ooboffs = offs & (mtd->writesize - 1);
++ ops.ooboffs = offs & mask;
+ ops.ooblen = len;
+ ops.oobbuf = buf;
+ ops.datbuf = NULL;
+
+- res = mtd->read_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
++ res = mtd->read_oob(mtd, offs & ~mask, &ops);
+ *retlen = ops.oobretlen;
+ return res;
+ }
+@@ -155,16 +156,17 @@
+ int nftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
+ size_t *retlen, uint8_t *buf)
+ {
++ loff_t mask = mtd->writesize - 1;
+ struct mtd_oob_ops ops;
+ int res;
+
+ ops.mode = MTD_OOB_PLACE;
+- ops.ooboffs = offs & (mtd->writesize - 1);
++ ops.ooboffs = offs & mask;
+ ops.ooblen = len;
+ ops.oobbuf = buf;
+ ops.datbuf = NULL;
+
+- res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
++ res = mtd->write_oob(mtd, offs & ~mask, &ops);
+ *retlen = ops.oobretlen;
+ return res;
+ }
+@@ -177,17 +179,18 @@
+ static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
+ size_t *retlen, uint8_t *buf, uint8_t *oob)
+ {
++ loff_t mask = mtd->writesize - 1;
+ struct mtd_oob_ops ops;
+ int res;
+
+ ops.mode = MTD_OOB_PLACE;
+- ops.ooboffs = offs;
++ ops.ooboffs = offs & mask;
+ ops.ooblen = mtd->oobsize;
+ ops.oobbuf = oob;
+ ops.datbuf = buf;
+ ops.len = len;
+
+- res = mtd->write_oob(mtd, offs & ~(mtd->writesize - 1), &ops);
++ res = mtd->write_oob(mtd, offs & ~mask, &ops);
+ *retlen = ops.retlen;
+ return res;
+ }
+diff -urN linux-2.6.31-rc8/drivers/net/gianfar.c linux-2.6.31-rc9/drivers/net/gianfar.c
+--- linux-2.6.31-rc8/drivers/net/gianfar.c 2009-09-05 23:50:12.054498754 +0000
++++ linux-2.6.31-rc9/drivers/net/gianfar.c 2009-09-05 23:50:18.042498950 +0000
+@@ -491,6 +491,7 @@
+
+ dev_set_drvdata(&ofdev->dev, NULL);
+
++ unregister_netdev(dev);
+ iounmap(priv->regs);
+ free_netdev(priv->ndev);
+
+diff -urN linux-2.6.31-rc8/drivers/net/wireless/ipw2x00/ipw2200.c linux-2.6.31-rc9/drivers/net/wireless/ipw2x00/ipw2200.c
+--- linux-2.6.31-rc8/drivers/net/wireless/ipw2x00/ipw2200.c 2009-09-05 23:50:12.257498640 +0000
++++ linux-2.6.31-rc9/drivers/net/wireless/ipw2x00/ipw2200.c 2009-09-05 23:50:18.248498981 +0000
+@@ -2874,45 +2874,27 @@
+ return 0;
+ }
+
+-static int ipw_fw_dma_add_buffer(struct ipw_priv *priv,
+- u32 src_phys, u32 dest_address, u32 length)
++static int ipw_fw_dma_add_buffer(struct ipw_priv *priv, dma_addr_t *src_address,
++ int nr, u32 dest_address, u32 len)
+ {
+- u32 bytes_left = length;
+- u32 src_offset = 0;
+- u32 dest_offset = 0;
+- int status = 0;
++ int ret, i;
++ u32 size;
++
+ IPW_DEBUG_FW(">> \n");
+- IPW_DEBUG_FW_INFO("src_phys=0x%x dest_address=0x%x length=0x%x\n",
+- src_phys, dest_address, length);
+- while (bytes_left > CB_MAX_LENGTH) {
+- status = ipw_fw_dma_add_command_block(priv,
+- src_phys + src_offset,
+- dest_address +
+- dest_offset,
+- CB_MAX_LENGTH, 0, 0);
+- if (status) {
++ IPW_DEBUG_FW_INFO("nr=%d dest_address=0x%x len=0x%x\n",
++ nr, dest_address, len);
++
++ for (i = 0; i < nr; i++) {
++ size = min_t(u32, len - i * CB_MAX_LENGTH, CB_MAX_LENGTH);
++ ret = ipw_fw_dma_add_command_block(priv, src_address[i],
++ dest_address +
++ i * CB_MAX_LENGTH, size,
++ 0, 0);
++ if (ret) {
+ IPW_DEBUG_FW_INFO(": Failed\n");
+ return -1;
+ } else
+ IPW_DEBUG_FW_INFO(": Added new cb\n");
+-
+- src_offset += CB_MAX_LENGTH;
+- dest_offset += CB_MAX_LENGTH;
+- bytes_left -= CB_MAX_LENGTH;
+- }
+-
+- /* add the buffer tail */
+- if (bytes_left > 0) {
+- status =
+- ipw_fw_dma_add_command_block(priv, src_phys + src_offset,
+- dest_address + dest_offset,
+- bytes_left, 0, 0);
+- if (status) {
+- IPW_DEBUG_FW_INFO(": Failed on the buffer tail\n");
+- return -1;
+- } else
+- IPW_DEBUG_FW_INFO
+- (": Adding new cb - the buffer tail\n");
+ }
+
+ IPW_DEBUG_FW("<< \n");
+@@ -3160,59 +3142,91 @@
+
+ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
+ {
+- int rc = -1;
++ int ret = -1;
+ int offset = 0;
+ struct fw_chunk *chunk;
+- dma_addr_t shared_phys;
+- u8 *shared_virt;
++ int total_nr = 0;
++ int i;
++ struct pci_pool *pool;
++ u32 *virts[CB_NUMBER_OF_ELEMENTS_SMALL];
++ dma_addr_t phys[CB_NUMBER_OF_ELEMENTS_SMALL];
+
+ IPW_DEBUG_TRACE("<< : \n");
+- shared_virt = pci_alloc_consistent(priv->pci_dev, len, &shared_phys);
+
+- if (!shared_virt)
++ pool = pci_pool_create("ipw2200", priv->pci_dev, CB_MAX_LENGTH, 0, 0);
++ if (!pool) {
++ IPW_ERROR("pci_pool_create failed\n");
+ return -ENOMEM;
+-
+- memmove(shared_virt, data, len);
++ }
+
+ /* Start the Dma */
+- rc = ipw_fw_dma_enable(priv);
++ ret = ipw_fw_dma_enable(priv);
+
+ /* the DMA is already ready this would be a bug. */
+ BUG_ON(priv->sram_desc.last_cb_index > 0);
+
+ do {
++ u32 chunk_len;
++ u8 *start;
++ int size;
++ int nr = 0;
++
+ chunk = (struct fw_chunk *)(data + offset);
+ offset += sizeof(struct fw_chunk);
++ chunk_len = le32_to_cpu(chunk->length);
++ start = data + offset;
++
++ nr = (chunk_len + CB_MAX_LENGTH - 1) / CB_MAX_LENGTH;
++ for (i = 0; i < nr; i++) {
++ virts[total_nr] = pci_pool_alloc(pool, GFP_KERNEL,
++ &phys[total_nr]);
++ if (!virts[total_nr]) {
++ ret = -ENOMEM;
++ goto out;
++ }
++ size = min_t(u32, chunk_len - i * CB_MAX_LENGTH,
++ CB_MAX_LENGTH);
++ memcpy(virts[total_nr], start, size);
++ start += size;
++ total_nr++;
++ /* We don't support fw chunk larger than 64*8K */
++ BUG_ON(total_nr > CB_NUMBER_OF_ELEMENTS_SMALL);
++ }
++
+ /* build DMA packet and queue up for sending */
+ /* dma to chunk->address, the chunk->length bytes from data +
+ * offeset*/
+ /* Dma loading */
+- rc = ipw_fw_dma_add_buffer(priv, shared_phys + offset,
+- le32_to_cpu(chunk->address),
+- le32_to_cpu(chunk->length));
+- if (rc) {
++ ret = ipw_fw_dma_add_buffer(priv, &phys[total_nr - nr],
++ nr, le32_to_cpu(chunk->address),
++ chunk_len);
++ if (ret) {
+ IPW_DEBUG_INFO("dmaAddBuffer Failed\n");
+ goto out;
+ }
+
+- offset += le32_to_cpu(chunk->length);
++ offset += chunk_len;
+ } while (offset < len);
+
+ /* Run the DMA and wait for the answer */
+- rc = ipw_fw_dma_kick(priv);
+- if (rc) {
++ ret = ipw_fw_dma_kick(priv);
++ if (ret) {
+ IPW_ERROR("dmaKick Failed\n");
+ goto out;
+ }
+
+- rc = ipw_fw_dma_wait(priv);
+- if (rc) {
++ ret = ipw_fw_dma_wait(priv);
++ if (ret) {
+ IPW_ERROR("dmaWaitSync Failed\n");
+ goto out;
+ }
+- out:
+- pci_free_consistent(priv->pci_dev, len, shared_virt, shared_phys);
+- return rc;
++ out:
++ for (i = 0; i < total_nr; i++)
++ pci_pool_free(pool, virts[i], phys[i]);
++
++ pci_pool_destroy(pool);
++
++ return ret;
+ }
+
+ /* stop nic */
+diff -urN linux-2.6.31-rc8/drivers/pci/iov.c linux-2.6.31-rc9/drivers/pci/iov.c
+--- linux-2.6.31-rc8/drivers/pci/iov.c 2009-09-05 23:50:12.330498789 +0000
++++ linux-2.6.31-rc9/drivers/pci/iov.c 2009-09-05 23:50:18.322311524 +0000
+@@ -598,6 +598,29 @@
+ }
+
+ /**
++ * pci_sriov_resource_alignment - get resource alignment for VF BAR
++ * @dev: the PCI device
++ * @resno: the resource number
++ *
++ * Returns the alignment of the VF BAR found in the SR-IOV capability.
++ * This is not the same as the resource size which is defined as
++ * the VF BAR size multiplied by the number of VFs. The alignment
++ * is just the VF BAR size.
++ */
++int pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
++{
++ struct resource tmp;
++ enum pci_bar_type type;
++ int reg = pci_iov_resource_bar(dev, resno, &type);
++
++ if (!reg)
++ return 0;
++
++ __pci_read_base(dev, type, &tmp, reg);
++ return resource_alignment(&tmp);
++}
++
++/**
+ * pci_restore_iov_state - restore the state of the IOV capability
+ * @dev: the PCI device
+ */
+diff -urN linux-2.6.31-rc8/drivers/pci/pci.h linux-2.6.31-rc9/drivers/pci/pci.h
+--- linux-2.6.31-rc8/drivers/pci/pci.h 2009-09-05 23:50:12.332498704 +0000
++++ linux-2.6.31-rc9/drivers/pci/pci.h 2009-09-05 23:50:18.323311326 +0000
+@@ -243,6 +243,7 @@
+ extern void pci_iov_release(struct pci_dev *dev);
+ extern int pci_iov_resource_bar(struct pci_dev *dev, int resno,
+ enum pci_bar_type *type);
++extern int pci_sriov_resource_alignment(struct pci_dev *dev, int resno);
+ extern void pci_restore_iov_state(struct pci_dev *dev);
+ extern int pci_iov_bus_range(struct pci_bus *bus);
+
+@@ -298,4 +299,16 @@
+ }
+ #endif /* CONFIG_PCI_IOV */
+
++static inline int pci_resource_alignment(struct pci_dev *dev,
++ struct resource *res)
++{
++#ifdef CONFIG_PCI_IOV
++ int resno = res - dev->resource;
++
++ if (resno >= PCI_IOV_RESOURCES && resno <= PCI_IOV_RESOURCE_END)
++ return pci_sriov_resource_alignment(dev, resno);
++#endif
++ return resource_alignment(res);
++}
++
+ #endif /* DRIVERS_PCI_H */
+diff -urN linux-2.6.31-rc8/drivers/pci/setup-bus.c linux-2.6.31-rc9/drivers/pci/setup-bus.c
+--- linux-2.6.31-rc8/drivers/pci/setup-bus.c 2009-09-05 23:50:12.335498735 +0000
++++ linux-2.6.31-rc9/drivers/pci/setup-bus.c 2009-09-05 23:50:18.327395785 +0000
+@@ -25,7 +25,7 @@
+ #include <linux/ioport.h>
+ #include <linux/cache.h>
+ #include <linux/slab.h>
+-
++#include "pci.h"
+
+ static void pbus_assign_resources_sorted(const struct pci_bus *bus)
+ {
+@@ -384,7 +384,7 @@
+ continue;
+ r_size = resource_size(r);
+ /* For bridges size != alignment */
+- align = resource_alignment(r);
++ align = pci_resource_alignment(dev, r);
+ order = __ffs(align) - 20;
+ if (order > 11) {
+ dev_warn(&dev->dev, "BAR %d bad alignment %llx: "
+diff -urN linux-2.6.31-rc8/drivers/pci/setup-res.c linux-2.6.31-rc9/drivers/pci/setup-res.c
+--- linux-2.6.31-rc8/drivers/pci/setup-res.c 2009-09-05 23:50:12.335498735 +0000
++++ linux-2.6.31-rc9/drivers/pci/setup-res.c 2009-09-05 23:50:18.327395785 +0000
+@@ -144,7 +144,7 @@
+
+ size = resource_size(res);
+ min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;
+- align = resource_alignment(res);
++ align = pci_resource_alignment(dev, res);
+
+ /* First, try exact prefetching match.. */
+ ret = pci_bus_alloc_resource(bus, res, size, align, min,
+@@ -178,7 +178,7 @@
+ struct pci_bus *bus;
+ int ret;
+
+- align = resource_alignment(res);
++ align = pci_resource_alignment(dev, res);
+ if (!align) {
+ dev_info(&dev->dev, "BAR %d: can't allocate resource (bogus "
+ "alignment) %pR flags %#lx\n",
+@@ -259,7 +259,7 @@
+ if (!(r->flags) || r->parent)
+ continue;
+
+- r_align = resource_alignment(r);
++ r_align = pci_resource_alignment(dev, r);
+ if (!r_align) {
+ dev_warn(&dev->dev, "BAR %d: bogus alignment "
+ "%pR flags %#lx\n",
+@@ -271,7 +271,7 @@
+ struct resource_list *ln = list->next;
+
+ if (ln)
+- align = resource_alignment(ln->res);
++ align = pci_resource_alignment(ln->dev, ln->res);
+
+ if (r_align > align) {
+ tmp = kmalloc(sizeof(*tmp), GFP_KERNEL);
+diff -urN linux-2.6.31-rc8/drivers/platform/x86/toshiba_acpi.c linux-2.6.31-rc9/drivers/platform/x86/toshiba_acpi.c
+--- linux-2.6.31-rc8/drivers/platform/x86/toshiba_acpi.c 2009-09-05 23:50:12.344498676 +0000
++++ linux-2.6.31-rc9/drivers/platform/x86/toshiba_acpi.c 2009-09-05 23:50:18.336498870 +0000
+@@ -335,6 +335,7 @@
+ if (hci_result != HCI_SUCCESS) {
+ /* Can't do anything useful */
+ mutex_unlock(&dev->mutex);
++ return;
+ }
+
+ new_rfk_state = value;
+diff -urN linux-2.6.31-rc8/fs/autofs4/expire.c linux-2.6.31-rc9/fs/autofs4/expire.c
+--- linux-2.6.31-rc8/fs/autofs4/expire.c 2009-09-05 23:50:12.989498680 +0000
++++ linux-2.6.31-rc9/fs/autofs4/expire.c 2009-09-05 23:50:18.985310997 +0000
+@@ -77,7 +77,7 @@
+ }
+
+ /* Update the expiry counter if fs is busy */
+- if (!may_umount_tree(mnt)) {
++ if (!may_umount_tree(path.mnt)) {
+ struct autofs_info *ino = autofs4_dentry_ino(top);
+ ino->last_used = jiffies;
+ goto done;
+diff -urN linux-2.6.31-rc8/fs/compat.c linux-2.6.31-rc9/fs/compat.c
+--- linux-2.6.31-rc8/fs/compat.c 2009-09-05 23:50:13.019392258 +0000
++++ linux-2.6.31-rc9/fs/compat.c 2009-09-05 23:50:19.015498999 +0000
+@@ -1485,20 +1485,15 @@
+ if (!bprm)
+ goto out_files;
+
+- retval = -ERESTARTNOINTR;
+- if (mutex_lock_interruptible(&current->cred_guard_mutex))
++ retval = prepare_bprm_creds(bprm);
++ if (retval)
+ goto out_free;
+- current->in_execve = 1;
+-
+- retval = -ENOMEM;
+- bprm->cred = prepare_exec_creds();
+- if (!bprm->cred)
+- goto out_unlock;
+
+ retval = check_unsafe_exec(bprm);
+ if (retval < 0)
+- goto out_unlock;
++ goto out_free;
+ clear_in_exec = retval;
++ current->in_execve = 1;
+
+ file = open_exec(filename);
+ retval = PTR_ERR(file);
+@@ -1547,7 +1542,6 @@
+ /* execve succeeded */
+ current->fs->in_exec = 0;
+ current->in_execve = 0;
+- mutex_unlock(&current->cred_guard_mutex);
+ acct_update_integrals(current);
+ free_bprm(bprm);
+ if (displaced)
+@@ -1567,10 +1561,7 @@
+ out_unmark:
+ if (clear_in_exec)
+ current->fs->in_exec = 0;
+-
+-out_unlock:
+ current->in_execve = 0;
+- mutex_unlock(&current->cred_guard_mutex);
+
+ out_free:
+ free_bprm(bprm);
+diff -urN linux-2.6.31-rc8/fs/exec.c linux-2.6.31-rc9/fs/exec.c
+--- linux-2.6.31-rc8/fs/exec.c 2009-09-05 23:50:13.026498780 +0000
++++ linux-2.6.31-rc9/fs/exec.c 2009-09-05 23:50:19.022498990 +0000
+@@ -1016,6 +1016,35 @@
+ EXPORT_SYMBOL(flush_old_exec);
+
+ /*
++ * Prepare credentials and lock ->cred_guard_mutex.
++ * install_exec_creds() commits the new creds and drops the lock.
++ * Or, if exec fails before, free_bprm() should release ->cred and
++ * and unlock.
++ */
++int prepare_bprm_creds(struct linux_binprm *bprm)
++{
++ if (mutex_lock_interruptible(&current->cred_guard_mutex))
++ return -ERESTARTNOINTR;
++
++ bprm->cred = prepare_exec_creds();
++ if (likely(bprm->cred))
++ return 0;
++
++ mutex_unlock(&current->cred_guard_mutex);
++ return -ENOMEM;
++}
++
++void free_bprm(struct linux_binprm *bprm)
++{
++ free_arg_pages(bprm);
++ if (bprm->cred) {
++ mutex_unlock(&current->cred_guard_mutex);
++ abort_creds(bprm->cred);
++ }
++ kfree(bprm);
++}
++
++/*
+ * install the new credentials for this executable
+ */
+ void install_exec_creds(struct linux_binprm *bprm)
+@@ -1024,12 +1053,13 @@
+
+ commit_creds(bprm->cred);
+ bprm->cred = NULL;
+-
+- /* cred_guard_mutex must be held at least to this point to prevent
++ /*
++ * cred_guard_mutex must be held at least to this point to prevent
+ * ptrace_attach() from altering our determination of the task's
+- * credentials; any time after this it may be unlocked */
+-
++ * credentials; any time after this it may be unlocked.
++ */
+ security_bprm_committed_creds(bprm);
++ mutex_unlock(&current->cred_guard_mutex);
+ }
+ EXPORT_SYMBOL(install_exec_creds);
+
+@@ -1246,14 +1276,6 @@
+
+ EXPORT_SYMBOL(search_binary_handler);
+
+-void free_bprm(struct linux_binprm *bprm)
+-{
+- free_arg_pages(bprm);
+- if (bprm->cred)
+- abort_creds(bprm->cred);
+- kfree(bprm);
+-}
+-
+ /*
+ * sys_execve() executes a new program.
+ */
+@@ -1277,20 +1299,15 @@
+ if (!bprm)
+ goto out_files;
+
+- retval = -ERESTARTNOINTR;
+- if (mutex_lock_interruptible(&current->cred_guard_mutex))
++ retval = prepare_bprm_creds(bprm);
++ if (retval)
+ goto out_free;
+- current->in_execve = 1;
+-
+- retval = -ENOMEM;
+- bprm->cred = prepare_exec_creds();
+- if (!bprm->cred)
+- goto out_unlock;
+
+ retval = check_unsafe_exec(bprm);
+ if (retval < 0)
+- goto out_unlock;
++ goto out_free;
+ clear_in_exec = retval;
++ current->in_execve = 1;
+
+ file = open_exec(filename);
+ retval = PTR_ERR(file);
+@@ -1340,7 +1357,6 @@
+ /* execve succeeded */
+ current->fs->in_exec = 0;
+ current->in_execve = 0;
+- mutex_unlock(&current->cred_guard_mutex);
+ acct_update_integrals(current);
+ free_bprm(bprm);
+ if (displaced)
+@@ -1360,10 +1376,7 @@
+ out_unmark:
+ if (clear_in_exec)
+ current->fs->in_exec = 0;
+-
+-out_unlock:
+ current->in_execve = 0;
+- mutex_unlock(&current->cred_guard_mutex);
+
+ out_free:
+ free_bprm(bprm);
+diff -urN linux-2.6.31-rc8/fs/ext2/namei.c linux-2.6.31-rc9/fs/ext2/namei.c
+--- linux-2.6.31-rc8/fs/ext2/namei.c 2009-09-05 23:50:13.029467231 +0000
++++ linux-2.6.31-rc9/fs/ext2/namei.c 2009-09-05 23:50:19.025311429 +0000
+@@ -362,6 +362,10 @@
+ if (dir_de) {
+ if (old_dir != new_dir)
+ ext2_set_link(old_inode, dir_de, dir_page, new_dir, 0);
++ else {
++ kunmap(dir_page);
++ page_cache_release(dir_page);
++ }
+ inode_dec_link_count(old_dir);
+ }
+ return 0;
+diff -urN linux-2.6.31-rc8/fs/jffs2/wbuf.c linux-2.6.31-rc9/fs/jffs2/wbuf.c
+--- linux-2.6.31-rc8/fs/jffs2/wbuf.c 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/fs/jffs2/wbuf.c 2009-09-05 23:50:19.065499131 +0000
+@@ -1268,10 +1268,20 @@
+ if (!c->wbuf)
+ return -ENOMEM;
+
++#ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
++ c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
++ if (!c->wbuf_verify) {
++ kfree(c->wbuf);
++ return -ENOMEM;
++ }
++#endif
+ return 0;
+ }
+
+ void jffs2_nor_wbuf_flash_cleanup(struct jffs2_sb_info *c) {
++#ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
++ kfree(c->wbuf_verify);
++#endif
+ kfree(c->wbuf);
+ }
+
+diff -urN linux-2.6.31-rc8/fs/nilfs2/btnode.c linux-2.6.31-rc9/fs/nilfs2/btnode.c
+--- linux-2.6.31-rc8/fs/nilfs2/btnode.c 2009-09-05 23:50:13.092311868 +0000
++++ linux-2.6.31-rc9/fs/nilfs2/btnode.c 2009-09-05 23:50:19.088499075 +0000
+@@ -209,6 +209,7 @@
+ * We cannot call radix_tree_preload for the kernels older
+ * than 2.6.23, because it is not exported for modules.
+ */
++retry:
+ err = radix_tree_preload(GFP_NOFS & ~__GFP_HIGHMEM);
+ if (err)
+ goto failed_unlock;
+@@ -219,7 +220,6 @@
+ (unsigned long long)oldkey,
+ (unsigned long long)newkey);
+
+-retry:
+ spin_lock_irq(&btnc->tree_lock);
+ err = radix_tree_insert(&btnc->page_tree, newkey, obh->b_page);
+ spin_unlock_irq(&btnc->tree_lock);
+diff -urN linux-2.6.31-rc8/fs/notify/inotify/inotify_user.c linux-2.6.31-rc9/fs/notify/inotify/inotify_user.c
+--- linux-2.6.31-rc8/fs/notify/inotify/inotify_user.c 2009-09-05 23:50:13.101499060 +0000
++++ linux-2.6.31-rc9/fs/notify/inotify/inotify_user.c 2009-09-05 23:50:19.097498884 +0000
+@@ -154,7 +154,8 @@
+
+ event = fsnotify_peek_notify_event(group);
+
+- event_size += roundup(event->name_len, event_size);
++ if (event->name_len)
++ event_size += roundup(event->name_len + 1, event_size);
+
+ if (event_size > count)
+ return ERR_PTR(-EINVAL);
+@@ -180,7 +181,7 @@
+ struct fsnotify_event_private_data *fsn_priv;
+ struct inotify_event_private_data *priv;
+ size_t event_size = sizeof(struct inotify_event);
+- size_t name_len;
++ size_t name_len = 0;
+
+ /* we get the inotify watch descriptor from the event private data */
+ spin_lock(&event->lock);
+@@ -196,10 +197,12 @@
+ inotify_free_event_priv(fsn_priv);
+ }
+
+- /* round up event->name_len so it is a multiple of event_size
++ /*
++ * round up event->name_len so it is a multiple of event_size
+ * plus an extra byte for the terminating '\0'.
+ */
+- name_len = roundup(event->name_len + 1, event_size);
++ if (event->name_len)
++ name_len = roundup(event->name_len + 1, event_size);
+ inotify_event.len = name_len;
+
+ inotify_event.mask = inotify_mask_to_arg(event->mask);
+@@ -325,8 +328,9 @@
+ list_for_each_entry(holder, &group->notification_list, event_list) {
+ event = holder->event;
+ send_len += sizeof(struct inotify_event);
+- send_len += roundup(event->name_len,
+- sizeof(struct inotify_event));
++ if (event->name_len)
++ send_len += roundup(event->name_len + 1,
++ sizeof(struct inotify_event));
+ }
+ mutex_unlock(&group->notification_mutex);
+ ret = put_user(send_len, (int __user *) p);
+@@ -587,6 +591,10 @@
+ /* match the ref from fsnotify_init_markentry() */
+ fsnotify_put_mark(&tmp_ientry->fsn_entry);
+
++ /* if this mark added a new event update the group mask */
++ if (mask & ~group->mask)
++ fsnotify_recalc_group_mask(group);
++
+ out_err:
+ if (ret < 0)
+ kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry);
+diff -urN linux-2.6.31-rc8/fs/ocfs2/aops.c linux-2.6.31-rc9/fs/ocfs2/aops.c
+--- linux-2.6.31-rc8/fs/ocfs2/aops.c 2009-09-05 23:50:13.105498779 +0000
++++ linux-2.6.31-rc9/fs/ocfs2/aops.c 2009-09-05 23:50:19.101312177 +0000
+@@ -1747,8 +1747,8 @@
+ * we know zeros will only be needed in the first and/or last cluster.
+ */
+ if (clusters_to_alloc || extents_to_split ||
+- wc->w_desc[0].c_needs_zero ||
+- wc->w_desc[wc->w_clen - 1].c_needs_zero)
++ (wc->w_clen && (wc->w_desc[0].c_needs_zero ||
++ wc->w_desc[wc->w_clen - 1].c_needs_zero)))
+ cluster_of_pages = 1;
+ else
+ cluster_of_pages = 0;
+diff -urN linux-2.6.31-rc8/fs/ocfs2/dcache.c linux-2.6.31-rc9/fs/ocfs2/dcache.c
+--- linux-2.6.31-rc8/fs/ocfs2/dcache.c 2009-09-05 23:50:13.106499126 +0000
++++ linux-2.6.31-rc9/fs/ocfs2/dcache.c 2009-09-05 23:50:19.103311892 +0000
+@@ -85,6 +85,17 @@
+ goto bail;
+ }
+
++ /*
++ * If the last lookup failed to create dentry lock, let us
++ * redo it.
++ */
++ if (!dentry->d_fsdata) {
++ mlog(0, "Inode %llu doesn't have dentry lock, "
++ "returning false\n",
++ (unsigned long long)OCFS2_I(inode)->ip_blkno);
++ goto bail;
++ }
++
+ ret = 1;
+
+ bail:
+diff -urN linux-2.6.31-rc8/fs/xfs/linux-2.6/xfs_ioctl32.c linux-2.6.31-rc9/fs/xfs/linux-2.6/xfs_ioctl32.c
+--- linux-2.6.31-rc8/fs/xfs/linux-2.6/xfs_ioctl32.c 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/fs/xfs/linux-2.6/xfs_ioctl32.c 2009-09-05 23:50:19.132311462 +0000
+@@ -619,7 +619,7 @@
+ case XFS_IOC_GETVERSION_32:
+ cmd = _NATIVE_IOC(cmd, long);
+ return xfs_file_ioctl(filp, cmd, p);
+- case XFS_IOC_SWAPEXT: {
++ case XFS_IOC_SWAPEXT_32: {
+ struct xfs_swapext sxp;
+ struct compat_xfs_swapext __user *sxu = arg;
+
+diff -urN linux-2.6.31-rc8/include/crypto/algapi.h linux-2.6.31-rc9/include/crypto/algapi.h
+--- linux-2.6.31-rc8/include/crypto/algapi.h 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/include/crypto/algapi.h 2009-09-05 23:50:19.157317478 +0000
+@@ -137,6 +137,7 @@
+ void crypto_init_queue(struct crypto_queue *queue, unsigned int max_qlen);
+ int crypto_enqueue_request(struct crypto_queue *queue,
+ struct crypto_async_request *request);
++void *__crypto_dequeue_request(struct crypto_queue *queue, unsigned int offset);
+ struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue);
+ int crypto_tfm_in_queue(struct crypto_queue *queue, struct crypto_tfm *tfm);
+
+diff -urN linux-2.6.31-rc8/include/crypto/internal/skcipher.h linux-2.6.31-rc9/include/crypto/internal/skcipher.h
+--- linux-2.6.31-rc8/include/crypto/internal/skcipher.h 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/include/crypto/internal/skcipher.h 2009-09-05 23:50:19.157317478 +0000
+@@ -79,8 +79,8 @@
+ static inline struct skcipher_givcrypt_request *skcipher_dequeue_givcrypt(
+ struct crypto_queue *queue)
+ {
+- return container_of(ablkcipher_dequeue_request(queue),
+- struct skcipher_givcrypt_request, creq);
++ return __crypto_dequeue_request(
++ queue, offsetof(struct skcipher_givcrypt_request, creq.base));
+ }
+
+ static inline void *skcipher_givcrypt_reqctx(
+diff -urN linux-2.6.31-rc8/include/linux/binfmts.h linux-2.6.31-rc9/include/linux/binfmts.h
+--- linux-2.6.31-rc8/include/linux/binfmts.h 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/include/linux/binfmts.h 2009-09-05 23:50:19.162310396 +0000
+@@ -117,6 +117,7 @@
+ int executable_stack);
+ extern int bprm_mm_init(struct linux_binprm *bprm);
+ extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
++extern int prepare_bprm_creds(struct linux_binprm *bprm);
+ extern void install_exec_creds(struct linux_binprm *bprm);
+ extern void do_coredump(long signr, int exit_code, struct pt_regs *regs);
+ extern int set_binfmt(struct linux_binfmt *new);
+diff -urN linux-2.6.31-rc8/include/linux/device-mapper.h linux-2.6.31-rc9/include/linux/device-mapper.h
+--- linux-2.6.31-rc8/include/linux/device-mapper.h 2009-09-05 23:50:13.169499004 +0000
++++ linux-2.6.31-rc9/include/linux/device-mapper.h 2009-09-05 23:50:19.166392733 +0000
+@@ -91,6 +91,9 @@
+ iterate_devices_callout_fn fn,
+ void *data);
+
++typedef void (*dm_io_hints_fn) (struct dm_target *ti,
++ struct queue_limits *limits);
++
+ /*
+ * Returns:
+ * 0: The target can handle the next I/O immediately.
+@@ -151,6 +154,7 @@
+ dm_merge_fn merge;
+ dm_busy_fn busy;
+ dm_iterate_devices_fn iterate_devices;
++ dm_io_hints_fn io_hints;
+
+ /* For internal device-mapper use. */
+ struct list_head list;
+diff -urN linux-2.6.31-rc8/include/linux/dm-log-userspace.h linux-2.6.31-rc9/include/linux/dm-log-userspace.h
+--- linux-2.6.31-rc8/include/linux/dm-log-userspace.h 2009-09-05 23:50:13.170498832 +0000
++++ linux-2.6.31-rc9/include/linux/dm-log-userspace.h 2009-09-05 23:50:19.167499177 +0000
+@@ -371,7 +371,18 @@
+ (DM_ULOG_REQUEST_MASK & (request_type))
+
+ struct dm_ulog_request {
+- char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */
++ /*
++ * The local unique identifier (luid) and the universally unique
++ * identifier (uuid) are used to tie a request to a specific
++ * mirror log. A single machine log could probably make due with
++ * just the 'luid', but a cluster-aware log must use the 'uuid' and
++ * the 'luid'. The uuid is what is required for node to node
++ * communication concerning a particular log, but the 'luid' helps
++ * differentiate between logs that are being swapped and have the
++ * same 'uuid'. (Think "live" and "inactive" device-mapper tables.)
++ */
++ uint64_t luid;
++ char uuid[DM_UUID_LEN];
+ char padding[7]; /* Padding because DM_UUID_LEN = 129 */
+
+ int32_t error; /* Used to report back processing errors */
+diff -urN linux-2.6.31-rc8/include/linux/lmb.h linux-2.6.31-rc9/include/linux/lmb.h
+--- linux-2.6.31-rc8/include/linux/lmb.h 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/include/linux/lmb.h 2009-09-05 23:50:19.182311468 +0000
+@@ -51,7 +51,7 @@
+ extern u64 __init __lmb_alloc_base(u64 size,
+ u64 align, u64 max_addr);
+ extern u64 __init lmb_phys_mem_size(void);
+-extern u64 __init lmb_end_of_DRAM(void);
++extern u64 lmb_end_of_DRAM(void);
+ extern void __init lmb_enforce_memory_limit(u64 memory_limit);
+ extern int __init lmb_is_reserved(u64 addr);
+ extern int lmb_find(struct lmb_property *res);
+diff -urN linux-2.6.31-rc8/include/linux/workqueue.h linux-2.6.31-rc9/include/linux/workqueue.h
+--- linux-2.6.31-rc8/include/linux/workqueue.h 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/include/linux/workqueue.h 2009-09-05 23:50:19.214311897 +0000
+@@ -240,6 +240,21 @@
+ return ret;
+ }
+
++/*
++ * Like above, but uses del_timer() instead of del_timer_sync(). This means,
++ * if it returns 0 the timer function may be running and the queueing is in
++ * progress.
++ */
++static inline int __cancel_delayed_work(struct delayed_work *work)
++{
++ int ret;
++
++ ret = del_timer(&work->timer);
++ if (ret)
++ work_clear_pending(&work->work);
++ return ret;
++}
++
+ extern int cancel_delayed_work_sync(struct delayed_work *work);
+
+ /* Obsolete. use cancel_delayed_work_sync() */
+diff -urN linux-2.6.31-rc8/include/net/pkt_sched.h linux-2.6.31-rc9/include/net/pkt_sched.h
+--- linux-2.6.31-rc8/include/net/pkt_sched.h 2009-09-05 23:50:13.224329533 +0000
++++ linux-2.6.31-rc9/include/net/pkt_sched.h 2009-09-05 23:50:19.221327946 +0000
+@@ -61,8 +61,8 @@
+ }
+
+ struct qdisc_watchdog {
+- struct tasklet_hrtimer timer;
+- struct Qdisc *qdisc;
++ struct hrtimer timer;
++ struct Qdisc *qdisc;
+ };
+
+ extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc);
+diff -urN linux-2.6.31-rc8/kernel/module.c linux-2.6.31-rc9/kernel/module.c
+--- linux-2.6.31-rc8/kernel/module.c 2009-09-05 23:50:13.252498743 +0000
++++ linux-2.6.31-rc9/kernel/module.c 2009-09-05 23:50:19.249499141 +0000
+@@ -1274,6 +1274,10 @@
+ struct module_notes_attrs *notes_attrs;
+ struct bin_attribute *nattr;
+
++ /* failed to create section attributes, so can't create notes */
++ if (!mod->sect_attrs)
++ return;
++
+ /* Count notes sections and allocate structures. */
+ notes = 0;
+ for (i = 0; i < nsect; i++)
+@@ -2355,8 +2359,7 @@
+ if (err < 0)
+ goto unlink;
+ add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+- if (mod->sect_attrs)
+- add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
++ add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+
+ /* Get rid of temporary copy */
+ vfree(hdr);
+diff -urN linux-2.6.31-rc8/kernel/perf_counter.c linux-2.6.31-rc9/kernel/perf_counter.c
+--- linux-2.6.31-rc8/kernel/perf_counter.c 2009-09-05 23:50:13.254498453 +0000
++++ linux-2.6.31-rc9/kernel/perf_counter.c 2009-09-05 23:50:19.251311475 +0000
+@@ -50,7 +50,7 @@
+ * 1 - disallow cpu counters to unpriv
+ * 2 - disallow kernel profiling to unpriv
+ */
+-int sysctl_perf_counter_paranoid __read_mostly;
++int sysctl_perf_counter_paranoid __read_mostly = 1;
+
+ static inline bool perf_paranoid_cpu(void)
+ {
+@@ -4066,6 +4066,7 @@
+ hwc->sample_period = attr->sample_period;
+ if (attr->freq && attr->sample_freq)
+ hwc->sample_period = 1;
++ hwc->last_period = hwc->sample_period;
+
+ atomic64_set(&hwc->period_left, hwc->sample_period);
+
+diff -urN linux-2.6.31-rc8/mm/nommu.c linux-2.6.31-rc9/mm/nommu.c
+--- linux-2.6.31-rc8/mm/nommu.c 2009-09-05 23:50:13.295498896 +0000
++++ linux-2.6.31-rc9/mm/nommu.c 2009-09-05 23:50:19.291311342 +0000
+@@ -1352,6 +1352,7 @@
+ }
+
+ vma->vm_region = region;
++ add_nommu_region(region);
+
+ /* set up the mapping */
+ if (file && vma->vm_flags & VM_SHARED)
+@@ -1361,8 +1362,6 @@
+ if (ret < 0)
+ goto error_put_region;
+
+- add_nommu_region(region);
+-
+ /* okay... we have a mapping; now we have to register it */
+ result = vma->vm_start;
+
+diff -urN linux-2.6.31-rc8/mm/page_alloc.c linux-2.6.31-rc9/mm/page_alloc.c
+--- linux-2.6.31-rc8/mm/page_alloc.c 2009-09-05 23:50:13.297311514 +0000
++++ linux-2.6.31-rc9/mm/page_alloc.c 2009-09-05 23:50:19.293311425 +0000
+@@ -817,13 +817,15 @@
+ * agressive about taking ownership of free pages
+ */
+ if (unlikely(current_order >= (pageblock_order >> 1)) ||
+- start_migratetype == MIGRATE_RECLAIMABLE) {
++ start_migratetype == MIGRATE_RECLAIMABLE ||
++ page_group_by_mobility_disabled) {
+ unsigned long pages;
+ pages = move_freepages_block(zone, page,
+ start_migratetype);
+
+ /* Claim the whole block if over half of it is free */
+- if (pages >= (1 << (pageblock_order-1)))
++ if (pages >= (1 << (pageblock_order-1)) ||
++ page_group_by_mobility_disabled)
+ set_pageblock_migratetype(page,
+ start_migratetype);
+
+diff -urN linux-2.6.31-rc8/mm/percpu.c linux-2.6.31-rc9/mm/percpu.c
+--- linux-2.6.31-rc8/mm/percpu.c 2009-09-05 23:50:13.298498739 +0000
++++ linux-2.6.31-rc9/mm/percpu.c 2009-09-05 23:50:19.294311389 +0000
+@@ -197,7 +197,12 @@
+ static bool pcpu_chunk_page_occupied(struct pcpu_chunk *chunk,
+ int page_idx)
+ {
+- return *pcpu_chunk_pagep(chunk, 0, page_idx) != NULL;
++ /*
++ * Any possible cpu id can be used here, so there's no need to
++ * worry about preemption or cpu hotplug.
++ */
++ return *pcpu_chunk_pagep(chunk, raw_smp_processor_id(),
++ page_idx) != NULL;
+ }
+
+ /* set the pointer to a chunk in a page struct */
+@@ -297,6 +302,14 @@
+ return pcpu_first_chunk;
+ }
+
++ /*
++ * The address is relative to unit0 which might be unused and
++ * thus unmapped. Offset the address to the unit space of the
++ * current processor before looking it up in the vmalloc
++ * space. Note that any possible cpu id can be used here, so
++ * there's no need to worry about preemption or cpu hotplug.
++ */
++ addr += raw_smp_processor_id() * pcpu_unit_size;
+ return pcpu_get_page_chunk(vmalloc_to_page(addr));
+ }
+
+diff -urN linux-2.6.31-rc8/mm/slub.c linux-2.6.31-rc9/mm/slub.c
+--- linux-2.6.31-rc8/mm/slub.c 2009-09-05 23:50:13.301498706 +0000
++++ linux-2.6.31-rc9/mm/slub.c 2009-09-05 23:50:19.298459113 +0000
+@@ -2594,8 +2594,6 @@
+ */
+ void kmem_cache_destroy(struct kmem_cache *s)
+ {
+- if (s->flags & SLAB_DESTROY_BY_RCU)
+- rcu_barrier();
+ down_write(&slub_lock);
+ s->refcount--;
+ if (!s->refcount) {
+@@ -2606,6 +2604,8 @@
+ "still has objects.\n", s->name, __func__);
+ dump_stack();
+ }
++ if (s->flags & SLAB_DESTROY_BY_RCU)
++ rcu_barrier();
+ sysfs_slab_remove(s);
+ } else
+ up_write(&slub_lock);
+diff -urN linux-2.6.31-rc8/net/core/sock.c linux-2.6.31-rc9/net/core/sock.c
+--- linux-2.6.31-rc8/net/core/sock.c 2009-09-05 23:50:13.320499138 +0000
++++ linux-2.6.31-rc9/net/core/sock.c 2009-09-05 23:50:19.316499195 +0000
+@@ -1025,6 +1025,7 @@
+ sk->sk_prot = sk->sk_prot_creator = prot;
+ sock_lock_init(sk);
+ sock_net_set(sk, get_net(net));
++ atomic_set(&sk->sk_wmem_alloc, 1);
+ }
+
+ return sk;
+@@ -1872,7 +1873,6 @@
+ */
+ smp_wmb();
+ atomic_set(&sk->sk_refcnt, 1);
+- atomic_set(&sk->sk_wmem_alloc, 1);
+ atomic_set(&sk->sk_drops, 0);
+ }
+ EXPORT_SYMBOL(sock_init_data);
+diff -urN linux-2.6.31-rc8/net/sched/sch_api.c linux-2.6.31-rc9/net/sched/sch_api.c
+--- linux-2.6.31-rc8/net/sched/sch_api.c 2009-09-05 23:50:13.384498832 +0000
++++ linux-2.6.31-rc9/net/sched/sch_api.c 2009-09-05 23:50:19.382312622 +0000
+@@ -458,7 +458,7 @@
+ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer)
+ {
+ struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog,
+- timer.timer);
++ timer);
+
+ wd->qdisc->flags &= ~TCQ_F_THROTTLED;
+ __netif_schedule(qdisc_root(wd->qdisc));
+@@ -468,8 +468,8 @@
+
+ void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc)
+ {
+- tasklet_hrtimer_init(&wd->timer, qdisc_watchdog,
+- CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
++ hrtimer_init(&wd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
++ wd->timer.function = qdisc_watchdog;
+ wd->qdisc = qdisc;
+ }
+ EXPORT_SYMBOL(qdisc_watchdog_init);
+@@ -485,13 +485,13 @@
+ wd->qdisc->flags |= TCQ_F_THROTTLED;
+ time = ktime_set(0, 0);
+ time = ktime_add_ns(time, PSCHED_TICKS2NS(expires));
+- tasklet_hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS);
++ hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS);
+ }
+ EXPORT_SYMBOL(qdisc_watchdog_schedule);
+
+ void qdisc_watchdog_cancel(struct qdisc_watchdog *wd)
+ {
+- tasklet_hrtimer_cancel(&wd->timer);
++ hrtimer_cancel(&wd->timer);
+ wd->qdisc->flags &= ~TCQ_F_THROTTLED;
+ }
+ EXPORT_SYMBOL(qdisc_watchdog_cancel);
+@@ -1456,6 +1456,8 @@
+ nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags);
+ tcm = NLMSG_DATA(nlh);
+ tcm->tcm_family = AF_UNSPEC;
++ tcm->tcm__pad1 = 0;
++ tcm->tcm__pad2 = 0;
+ tcm->tcm_ifindex = qdisc_dev(q)->ifindex;
+ tcm->tcm_parent = q->handle;
+ tcm->tcm_handle = q->handle;
+diff -urN linux-2.6.31-rc8/net/sched/sch_cbq.c linux-2.6.31-rc9/net/sched/sch_cbq.c
+--- linux-2.6.31-rc8/net/sched/sch_cbq.c 2009-09-05 23:50:13.384498832 +0000
++++ linux-2.6.31-rc9/net/sched/sch_cbq.c 2009-09-05 23:50:19.382312622 +0000
+@@ -163,7 +163,7 @@
+ psched_time_t now_rt; /* Cached real time */
+ unsigned pmask;
+
+- struct tasklet_hrtimer delay_timer;
++ struct hrtimer delay_timer;
+ struct qdisc_watchdog watchdog; /* Watchdog timer,
+ started when CBQ has
+ backlog, but cannot
+@@ -503,8 +503,6 @@
+ cl->undertime = q->now + delay;
+
+ if (delay > 0) {
+- struct hrtimer *ht;
+-
+ sched += delay + cl->penalty;
+ cl->penalized = sched;
+ cl->cpriority = TC_CBQ_MAXPRIO;
+@@ -512,12 +510,12 @@
+
+ expires = ktime_set(0, 0);
+ expires = ktime_add_ns(expires, PSCHED_TICKS2NS(sched));
+- ht = &q->delay_timer.timer;
+- if (hrtimer_try_to_cancel(ht) &&
+- ktime_to_ns(ktime_sub(hrtimer_get_expires(ht),
+- expires)) > 0)
+- hrtimer_set_expires(ht, expires);
+- hrtimer_restart(ht);
++ if (hrtimer_try_to_cancel(&q->delay_timer) &&
++ ktime_to_ns(ktime_sub(
++ hrtimer_get_expires(&q->delay_timer),
++ expires)) > 0)
++ hrtimer_set_expires(&q->delay_timer, expires);
++ hrtimer_restart(&q->delay_timer);
+ cl->delayed = 1;
+ cl->xstats.overactions++;
+ return;
+@@ -593,7 +591,7 @@
+ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer)
+ {
+ struct cbq_sched_data *q = container_of(timer, struct cbq_sched_data,
+- delay_timer.timer);
++ delay_timer);
+ struct Qdisc *sch = q->watchdog.qdisc;
+ psched_time_t now;
+ psched_tdiff_t delay = 0;
+@@ -623,7 +621,7 @@
+
+ time = ktime_set(0, 0);
+ time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay));
+- tasklet_hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS);
++ hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS);
+ }
+
+ sch->flags &= ~TCQ_F_THROTTLED;
+@@ -1216,7 +1214,7 @@
+ q->tx_class = NULL;
+ q->tx_borrowed = NULL;
+ qdisc_watchdog_cancel(&q->watchdog);
+- tasklet_hrtimer_cancel(&q->delay_timer);
++ hrtimer_cancel(&q->delay_timer);
+ q->toplevel = TC_CBQ_MAXLEVEL;
+ q->now = psched_get_time();
+ q->now_rt = q->now;
+@@ -1399,8 +1397,7 @@
+ q->link.minidle = -0x7FFFFFFF;
+
+ qdisc_watchdog_init(&q->watchdog, sch);
+- tasklet_hrtimer_init(&q->delay_timer, cbq_undelay,
+- CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
++ hrtimer_init(&q->delay_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
+ q->delay_timer.function = cbq_undelay;
+ q->toplevel = TC_CBQ_MAXLEVEL;
+ q->now = psched_get_time();
+diff -urN linux-2.6.31-rc8/net/sunrpc/clnt.c linux-2.6.31-rc9/net/sunrpc/clnt.c
+--- linux-2.6.31-rc8/net/sunrpc/clnt.c 2009-09-05 23:50:13.393319418 +0000
++++ linux-2.6.31-rc9/net/sunrpc/clnt.c 2009-09-05 23:50:19.391311537 +0000
+@@ -937,6 +937,7 @@
+ rpc_task_force_reencode(struct rpc_task *task)
+ {
+ task->tk_rqstp->rq_snd_buf.len = 0;
++ task->tk_rqstp->rq_bytes_sent = 0;
+ }
+
+ static inline void
+diff -urN linux-2.6.31-rc8/sound/pci/hda/patch_realtek.c linux-2.6.31-rc9/sound/pci/hda/patch_realtek.c
+--- linux-2.6.31-rc8/sound/pci/hda/patch_realtek.c 2009-09-05 23:50:13.454498936 +0000
++++ linux-2.6.31-rc9/sound/pci/hda/patch_realtek.c 2009-09-05 23:50:19.453311431 +0000
+@@ -6423,9 +6423,9 @@
+ };
+
+ /*
+- * 6ch mode
++ * 4ch mode
+ */
+-static struct hda_verb alc885_mbp_ch6_init[] = {
++static struct hda_verb alc885_mbp_ch4_init[] = {
+ { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+ { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+ { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
+@@ -6434,9 +6434,9 @@
+ { } /* end */
+ };
+
+-static struct hda_channel_mode alc885_mbp_6ch_modes[2] = {
++static struct hda_channel_mode alc885_mbp_4ch_modes[2] = {
+ { 2, alc885_mbp_ch2_init },
+- { 6, alc885_mbp_ch6_init },
++ { 4, alc885_mbp_ch4_init },
+ };
+
+ /*
+@@ -6497,10 +6497,11 @@
+ };
+
+ static struct snd_kcontrol_new alc885_mbp3_mixer[] = {
+- HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x00, HDA_OUTPUT),
+- HDA_BIND_MUTE ("Front Playback Switch", 0x0c, 0x02, HDA_INPUT),
+- HDA_CODEC_MUTE ("Speaker Playback Switch", 0x14, 0x00, HDA_OUTPUT),
+- HDA_CODEC_VOLUME("Line-Out Playback Volume", 0x0d, 0x00, HDA_OUTPUT),
++ HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x00, HDA_OUTPUT),
++ HDA_BIND_MUTE ("Speaker Playback Switch", 0x0c, 0x02, HDA_INPUT),
++ HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0e, 0x00, HDA_OUTPUT),
++ HDA_BIND_MUTE ("Headphone Playback Switch", 0x0e, 0x02, HDA_INPUT),
++ HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x00, HDA_OUTPUT),
+ HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
+ HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
+ HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT),
+@@ -6814,14 +6815,18 @@
+ {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
+ {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
+ {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
++ /* HP mixer */
++ {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
++ {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
++ {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
+ /* Front Pin: output 0 (0x0c) */
+ {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+ {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
+ {0x14, AC_VERB_SET_CONNECT_SEL, 0x00},
+- /* HP Pin: output 0 (0x0d) */
++ /* HP Pin: output 0 (0x0e) */
+ {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc4},
+- {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
+- {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
++ {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
++ {0x15, AC_VERB_SET_CONNECT_SEL, 0x02},
+ {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
+ /* Mic (rear) pin: input vref at 80% */
+ {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
+@@ -7195,10 +7200,11 @@
+ .mixers = { alc885_mbp3_mixer, alc882_chmode_mixer },
+ .init_verbs = { alc885_mbp3_init_verbs,
+ alc880_gpio1_init_verbs },
+- .num_dacs = ARRAY_SIZE(alc882_dac_nids),
++ .num_dacs = 2,
+ .dac_nids = alc882_dac_nids,
+- .channel_mode = alc885_mbp_6ch_modes,
+- .num_channel_mode = ARRAY_SIZE(alc885_mbp_6ch_modes),
++ .hp_nid = 0x04,
++ .channel_mode = alc885_mbp_4ch_modes,
++ .num_channel_mode = ARRAY_SIZE(alc885_mbp_4ch_modes),
+ .input_mux = &alc882_capture_source,
+ .dig_out_nid = ALC882_DIGOUT_NID,
+ .dig_in_nid = ALC882_DIGIN_NID,
+diff -urN linux-2.6.31-rc8/sound/pci/hda/patch_via.c linux-2.6.31-rc9/sound/pci/hda/patch_via.c
+--- linux-2.6.31-rc8/sound/pci/hda/patch_via.c 2009-09-05 23:50:13.456499024 +0000
++++ linux-2.6.31-rc9/sound/pci/hda/patch_via.c 2009-09-05 23:50:19.455499197 +0000
+@@ -1395,6 +1395,7 @@
+ if (!spec->adc_nids && spec->input_mux) {
+ spec->adc_nids = vt1708_adc_nids;
+ spec->num_adc_nids = ARRAY_SIZE(vt1708_adc_nids);
++ get_mux_nids(codec);
+ spec->mixers[spec->num_mixers] = vt1708_capture_mixer;
+ spec->num_mixers++;
+ }
+diff -urN linux-2.6.31-rc8/sound/pci/oxygen/oxygen_lib.c linux-2.6.31-rc9/sound/pci/oxygen/oxygen_lib.c
+--- linux-2.6.31-rc8/sound/pci/oxygen/oxygen_lib.c 2009-06-10 03:05:27.000000000 +0000
++++ linux-2.6.31-rc9/sound/pci/oxygen/oxygen_lib.c 2009-09-05 23:50:19.461311313 +0000
+@@ -260,6 +260,9 @@
+ * chip didn't if the first EEPROM word was overwritten.
+ */
+ subdevice = oxygen_read_eeprom(chip, 2);
++ /* use default ID if EEPROM is missing */
++ if (subdevice == 0xffff)
++ subdevice = 0x8788;
+ /*
+ * We use only the subsystem device ID for searching because it is
+ * unique even without the subsystem vendor ID, which may have been
+diff -urN linux-2.6.31-rc8/sound/pci/oxygen/oxygen_pcm.c linux-2.6.31-rc9/sound/pci/oxygen/oxygen_pcm.c
+--- linux-2.6.31-rc8/sound/pci/oxygen/oxygen_pcm.c 2009-09-05 23:50:13.462498749 +0000
++++ linux-2.6.31-rc9/sound/pci/oxygen/oxygen_pcm.c 2009-09-05 23:50:19.462311393 +0000
+@@ -469,9 +469,11 @@
+ oxygen_write16_masked(chip, OXYGEN_I2S_MULTICH_FORMAT,
+ oxygen_rate(hw_params) |
+ chip->model.dac_i2s_format |
++ oxygen_i2s_mclk(hw_params) |
+ oxygen_i2s_bits(hw_params),
+ OXYGEN_I2S_RATE_MASK |
+ OXYGEN_I2S_FORMAT_MASK |
++ OXYGEN_I2S_MCLK_MASK |
+ OXYGEN_I2S_BITS_MASK);
+ oxygen_update_dac_routing(chip);
+ oxygen_update_spdif_source(chip);
diff --git a/patches.suse/supported-flag-enterprise b/patches.suse/supported-flag-enterprise
index b59b16fa56..3f59e33020 100644
--- a/patches.suse/supported-flag-enterprise
+++ b/patches.suse/supported-flag-enterprise
@@ -147,15 +147,15 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
#ifdef CONFIG_MODULE_UNLOAD
&refcnt,
#endif
-@@ -2398,6 +2404,7 @@ static noinline struct module *load_modu
- if (mod->sect_attrs)
- add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+@@ -2401,6 +2407,7 @@ static noinline struct module *load_modu
+ add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+ add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+#ifdef CONFIG_ENTERPRISE_SUPPORT
/* We don't use add_taint() here because it also disables lockdep. */
if (mod->taints & (1 << TAINT_EXTERNAL_SUPPORT))
add_nonfatal_taint(TAINT_EXTERNAL_SUPPORT);
-@@ -2417,6 +2424,7 @@ static noinline struct module *load_modu
+@@ -2420,6 +2427,7 @@ static noinline struct module *load_modu
"fault.\n", mod->name);
}
}
@@ -163,7 +163,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
/* Get rid of temporary copy */
vfree(hdr);
-@@ -2776,10 +2784,12 @@ static char *module_flags(struct module
+@@ -2779,10 +2787,12 @@ static char *module_flags(struct module
buf[bx++] = 'F';
if (mod->taints & (1 << TAINT_CRAP))
buf[bx++] = 'C';
@@ -176,7 +176,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
/*
* TAINT_FORCED_RMMOD: could be added.
* TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't
-@@ -2992,7 +3002,9 @@ void print_modules(void)
+@@ -2995,7 +3005,9 @@ void print_modules(void)
if (last_unloaded_module[0])
printk(" [last unloaded: %s]", last_unloaded_module);
printk("\n");
diff --git a/patches.suse/supported-flag-sysfs b/patches.suse/supported-flag-sysfs
index fc26c28ace..0534d20f1a 100644
--- a/patches.suse/supported-flag-sysfs
+++ b/patches.suse/supported-flag-sysfs
@@ -115,7 +115,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
#ifdef CONFIG_MODULE_UNLOAD
&refcnt,
#endif
-@@ -1947,7 +1973,7 @@ static noinline struct module *load_modu
+@@ -1951,7 +1977,7 @@ static noinline struct module *load_modu
Elf_Ehdr *hdr;
Elf_Shdr *sechdrs;
char *secstrings, *args, *modmagic, *strtab = NULL;
@@ -124,7 +124,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
unsigned int i;
unsigned int symindex = 0;
unsigned int strindex = 0;
-@@ -2069,28 +2095,6 @@ static noinline struct module *load_modu
+@@ -2073,28 +2099,6 @@ static noinline struct module *load_modu
mod->name);
}
@@ -153,9 +153,9 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
/* Now copy in args */
args = strndup_user(uargs, ~0UL >> 1);
if (IS_ERR(args)) {
-@@ -2394,6 +2398,26 @@ static noinline struct module *load_modu
- if (mod->sect_attrs)
- add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+@@ -2397,6 +2401,26 @@ static noinline struct module *load_modu
+ add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+ add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+ /* We don't use add_taint() here because it also disables lockdep. */
+ if (mod->taints & (1 << TAINT_EXTERNAL_SUPPORT))
@@ -180,7 +180,7 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
/* Get rid of temporary copy */
vfree(hdr);
-@@ -2968,6 +2992,7 @@ void print_modules(void)
+@@ -2971,6 +2995,7 @@ void print_modules(void)
if (last_unloaded_module[0])
printk(" [last unloaded: %s]", last_unloaded_module);
printk("\n");
diff --git a/patches.xen/pci-guestdev b/patches.xen/pci-guestdev
index 5c7604f04b..5570b057bd 100644
--- a/patches.xen/pci-guestdev
+++ b/patches.xen/pci-guestdev
@@ -3,9 +3,24 @@ From: http://xenbits.xensource.com/linux-2.6.18-xen.hg (tip 898:ca12928cdafe)
Patch-mainline: obsolete
Acked-by: jbeulich@novell.com
---- head-2009-09-02.orig/Documentation/kernel-parameters.txt 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/Documentation/kernel-parameters.txt 2009-09-02 11:48:26.000000000 +0200
-@@ -809,6 +809,24 @@ and is between 256 and 4096 characters.
+---
+ Documentation/kernel-parameters.txt | 22
+ drivers/acpi/pci_root.c | 71 +
+ drivers/acpi/scan.c | 17
+ drivers/pci/Kconfig | 14
+ drivers/pci/Makefile | 2
+ drivers/pci/guestdev.c | 887 ++++++++++++++++++++++
+ drivers/pci/iomulti.c | 1415 ++++++++++++++++++++++++++++++++++++
+ drivers/pci/iomulti.h | 51 +
+ drivers/pci/pci.c | 7
+ drivers/pci/pci.h | 7
+ include/linux/acpi.h | 2
+ include/linux/pci.h | 6
+ 12 files changed, 2501 insertions(+)
+
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -809,6 +809,24 @@ and is between 256 and 4096 characters.
gpt [EFI] Forces disk with valid GPT signature but
invalid Protective MBR to be treated as GPT.
@@ -30,7 +45,7 @@ Acked-by: jbeulich@novell.com
gvp11= [HW,SCSI]
hashdist= [KNL,NUMA] Large hashes allocated during boot
-@@ -2070,6 +2088,10 @@ and is between 256 and 4096 characters.
+@@ -2070,6 +2088,10 @@ and is between 256 and 4096 characters.
Run specified binary instead of /init from the ramdisk,
used for early userspace startup. See initrd.
@@ -41,8 +56,8 @@ Acked-by: jbeulich@novell.com
reboot= [BUGS=X86-32,BUGS=ARM,BUGS=IA-64] Rebooting mode
Format: <reboot_mode>[,<reboot_mode2>[,...]]
See arch/*/kernel/reboot.c or arch/*/kernel/process.c
---- head-2009-09-02.orig/drivers/acpi/pci_root.c 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/drivers/acpi/pci_root.c 2009-09-02 11:48:26.000000000 +0200
+--- a/drivers/acpi/pci_root.c
++++ b/drivers/acpi/pci_root.c
@@ -465,6 +465,40 @@ out:
}
EXPORT_SYMBOL(acpi_pci_osc_control_set);
@@ -132,8 +147,8 @@ Acked-by: jbeulich@novell.com
+ return FALSE;
+}
+#endif
---- head-2009-09-02.orig/drivers/acpi/scan.c 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/drivers/acpi/scan.c 2009-09-02 11:48:26.000000000 +0200
+--- a/drivers/acpi/scan.c
++++ b/drivers/acpi/scan.c
@@ -187,6 +187,16 @@ acpi_device_hid_show(struct device *dev,
}
static DEVICE_ATTR(hid, 0444, acpi_device_hid_show, NULL);
@@ -165,8 +180,8 @@ Acked-by: jbeulich@novell.com
/*
* If device has _EJ0, 'eject' file is created that is used to trigger
* hot-removal function from userland.
---- head-2009-09-02.orig/drivers/pci/Kconfig 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/drivers/pci/Kconfig 2009-09-02 11:48:26.000000000 +0200
+--- a/drivers/pci/Kconfig
++++ b/drivers/pci/Kconfig
@@ -42,6 +42,20 @@ config PCI_DEBUG
When in doubt, say N.
@@ -188,8 +203,8 @@ Acked-by: jbeulich@novell.com
config PCI_STUB
tristate "PCI Stub driver"
depends on PCI
---- head-2009-09-02.orig/drivers/pci/Makefile 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/drivers/pci/Makefile 2009-09-02 11:48:26.000000000 +0200
+--- a/drivers/pci/Makefile
++++ b/drivers/pci/Makefile
@@ -7,6 +7,8 @@ obj-y += access.o bus.o probe.o remove.
irq.o
obj-$(CONFIG_PROC_FS) += proc.o
@@ -199,8 +214,8 @@ Acked-by: jbeulich@novell.com
# Build PCI Express stuff if needed
obj-$(CONFIG_PCIEPORTBUS) += pcie/
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ head-2009-09-02/drivers/pci/guestdev.c 2009-09-02 11:48:26.000000000 +0200
+--- /dev/null
++++ b/drivers/pci/guestdev.c
@@ -0,0 +1,887 @@
+/*
+ * Copyright (c) 2008, 2009 NEC Corporation.
@@ -1089,8 +1104,8 @@ Acked-by: jbeulich@novell.com
+
+fs_initcall(pci_check_guestdev_exists);
+
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ head-2009-09-02/drivers/pci/iomulti.c 2009-09-02 11:48:26.000000000 +0200
+--- /dev/null
++++ b/drivers/pci/iomulti.c
@@ -0,0 +1,1415 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
@@ -2507,8 +2522,8 @@ Acked-by: jbeulich@novell.com
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Isaku Yamahata <yamahata@valinux.co.jp>");
+MODULE_DESCRIPTION("PCI IO space multiplexing driver");
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ head-2009-09-02/drivers/pci/iomulti.h 2009-09-02 11:48:26.000000000 +0200
+--- /dev/null
++++ b/drivers/pci/iomulti.h
@@ -0,0 +1,51 @@
+#ifndef PCI_IOMULTI_H
+#define PCI_IOMULTI_H
@@ -2561,8 +2576,8 @@ Acked-by: jbeulich@novell.com
+#define PCI_IOMUL_OUT _IOW ('P', 3, struct pci_iomul_out)
+
+#endif /* PCI_IOMULTI_H */
---- head-2009-09-02.orig/drivers/pci/pci.c 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/drivers/pci/pci.c 2009-09-02 11:48:26.000000000 +0200
+--- a/drivers/pci/pci.c
++++ b/drivers/pci/pci.c
@@ -2574,6 +2574,13 @@ resource_size_t pci_specified_resource_a
*/
int pci_is_reassigndev(struct pci_dev *dev)
@@ -2577,9 +2592,9 @@ Acked-by: jbeulich@novell.com
return (pci_specified_resource_alignment(dev) != 0);
}
---- head-2009-09-02.orig/drivers/pci/pci.h 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/drivers/pci/pci.h 2009-09-02 11:48:26.000000000 +0200
-@@ -298,4 +298,11 @@ static inline int pci_ats_enabled(struct
+--- a/drivers/pci/pci.h
++++ b/drivers/pci/pci.h
+@@ -299,6 +299,13 @@ static inline int pci_ats_enabled(struct
}
#endif /* CONFIG_PCI_IOV */
@@ -2590,9 +2605,11 @@ Acked-by: jbeulich@novell.com
+#define pci_is_iomuldev(dev) 0
+#endif
+
- #endif /* DRIVERS_PCI_H */
---- head-2009-09-02.orig/include/linux/acpi.h 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/include/linux/acpi.h 2009-09-02 11:48:26.000000000 +0200
+ static inline int pci_resource_alignment(struct pci_dev *dev,
+ struct resource *res)
+ {
+--- a/include/linux/acpi.h
++++ b/include/linux/acpi.h
@@ -251,6 +251,8 @@ int acpi_check_region(resource_size_t st
int acpi_check_mem_region(resource_size_t start, resource_size_t n,
const char *name);
@@ -2602,8 +2619,8 @@ Acked-by: jbeulich@novell.com
#ifdef CONFIG_PM_SLEEP
void __init acpi_no_s4_hw_signature(void);
void __init acpi_old_suspend_ordering(void);
---- head-2009-09-02.orig/include/linux/pci.h 2009-09-02 11:33:03.000000000 +0200
-+++ head-2009-09-02/include/linux/pci.h 2009-09-02 11:48:26.000000000 +0200
+--- a/include/linux/pci.h
++++ b/include/linux/pci.h
@@ -1276,5 +1276,11 @@ extern void pci_hp_create_module_link(st
extern void pci_hp_remove_module_link(struct pci_slot *pci_slot);
#endif
diff --git a/patches.xen/pci-reserve b/patches.xen/pci-reserve
index 31719bafdb..de8fed42b6 100644
--- a/patches.xen/pci-reserve
+++ b/patches.xen/pci-reserve
@@ -8,9 +8,17 @@ by PCI hotplug.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: jbeulich@novell.com
---- head-2009-08-17.orig/Documentation/kernel-parameters.txt 2009-08-17 14:13:29.000000000 +0200
-+++ head-2009-08-17/Documentation/kernel-parameters.txt 2009-08-17 14:13:39.000000000 +0200
-@@ -1935,6 +1935,13 @@ and is between 256 and 4096 characters.
+---
+ Documentation/kernel-parameters.txt | 7 +
+ drivers/pci/Kconfig | 7 +
+ drivers/pci/Makefile | 1
+ drivers/pci/pci.h | 15 +++
+ drivers/pci/reserve.c | 143 ++++++++++++++++++++++++++++++++++++
+ 5 files changed, 173 insertions(+)
+
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -1935,6 +1935,13 @@ and is between 256 and 4096 characters.
off: Turn ECRC off
on: Turn ECRC on.
@@ -24,8 +32,8 @@ Acked-by: jbeulich@novell.com
pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power
Management.
off Disable ASPM.
---- head-2009-08-17.orig/drivers/pci/Kconfig 2009-08-17 14:13:29.000000000 +0200
-+++ head-2009-08-17/drivers/pci/Kconfig 2009-08-17 14:13:39.000000000 +0200
+--- a/drivers/pci/Kconfig
++++ b/drivers/pci/Kconfig
@@ -56,6 +56,13 @@ config PCI_IOMULTI
help
Say Y here if you need io multiplexing.
@@ -40,8 +48,8 @@ Acked-by: jbeulich@novell.com
config PCI_STUB
tristate "PCI Stub driver"
depends on PCI
---- head-2009-08-17.orig/drivers/pci/Makefile 2009-08-17 14:13:29.000000000 +0200
-+++ head-2009-08-17/drivers/pci/Makefile 2009-08-17 14:13:39.000000000 +0200
+--- a/drivers/pci/Makefile
++++ b/drivers/pci/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_SYSFS) += slot.o
obj-$(CONFIG_PCI_GUESTDEV) += guestdev.o
@@ -50,9 +58,9 @@ Acked-by: jbeulich@novell.com
# Build PCI Express stuff if needed
obj-$(CONFIG_PCIEPORTBUS) += pcie/
---- head-2009-08-17.orig/drivers/pci/pci.h 2009-08-17 14:13:29.000000000 +0200
-+++ head-2009-08-17/drivers/pci/pci.h 2009-08-17 14:13:39.000000000 +0200
-@@ -305,4 +305,19 @@ extern int pci_is_iomuldev(struct pci_de
+--- a/drivers/pci/pci.h
++++ b/drivers/pci/pci.h
+@@ -306,6 +306,21 @@ extern int pci_is_iomuldev(struct pci_de
#define pci_is_iomuldev(dev) 0
#endif
@@ -71,9 +79,11 @@ Acked-by: jbeulich@novell.com
+}
+#endif /* CONFIG_PCI_RESERVE */
+
- #endif /* DRIVERS_PCI_H */
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ head-2009-08-17/drivers/pci/reserve.c 2009-08-17 14:13:39.000000000 +0200
+ static inline int pci_resource_alignment(struct pci_dev *dev,
+ struct resource *res)
+ {
+--- /dev/null
++++ b/drivers/pci/reserve.c
@@ -0,0 +1,143 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
@@ -218,33 +228,3 @@ Acked-by: jbeulich@novell.com
+ return 1;
+}
+__setup("pci_reserve=", pci_reserve_setup);
---- head-2009-08-17.orig/drivers/pci/setup-bus.c 2009-08-17 14:02:17.000000000 +0200
-+++ head-2009-08-17/drivers/pci/setup-bus.c 2009-08-17 14:13:39.000000000 +0200
-@@ -25,7 +25,7 @@
- #include <linux/ioport.h>
- #include <linux/cache.h>
- #include <linux/slab.h>
--
-+#include "pci.h"
-
- static void pbus_assign_resources_sorted(const struct pci_bus *bus)
- {
-@@ -341,7 +341,7 @@ static void pbus_size_io(struct pci_bus
- #if defined(CONFIG_ISA) || defined(CONFIG_EISA)
- size = (size & 0xff) + ((size & ~0xffUL) << 2);
- #endif
-- size = ALIGN(size + size1, 4096);
-+ size = ALIGN(max(size + size1, pci_reserve_size_io(bus)), 4096);
- if (!size) {
- b_res->flags = 0;
- return;
-@@ -418,7 +418,8 @@ static int pbus_size_mem(struct pci_bus
- min_align = align1 >> 1;
- align += aligns[order];
- }
-- size = ALIGN(size, min_align);
-+ size = ALIGN(max(size, (resource_size_t)pci_reserve_size_mem(bus)),
-+ min_align);
- if (!size) {
- b_res->flags = 0;
- return 1;
diff --git a/series.conf b/series.conf
index 952401d4da..b312b0c5f5 100644
--- a/series.conf
+++ b/series.conf
@@ -35,6 +35,7 @@
patches.kernel.org/patch-2.6.31-rc5-rc6
patches.kernel.org/patch-2.6.31-rc6-rc7
patches.kernel.org/patch-2.6.31-rc7-rc8
+ patches.kernel.org/patch-2.6.31-rc8-rc9
########################################################
# Build fixes that apply to the vanilla kernel too.
@@ -458,9 +459,6 @@
patches.drivers/alsa-midi-04-oss-remove-magic-numbers
# more udpates
- patches.drivers/alsa-hda-fix-01-add-missing-mux-for-vt1708
- patches.drivers/alsa-hda-fix-02-mbp31-hp-fix
-
patches.drivers/alsa-hda-2.6.32-pre
patches.drivers/alsa-ctxfi-01-Native-timer-support-for-emu20k2