--- /dev/null
+From ee297533279a802eac8b1cbea8e65b24b36a1aac Mon Sep 17 00:00:00 2001
+From: Yinghai Lu <yhlu.kernel@gmail.com>
+Date: Wed, 24 Sep 2008 19:04:31 -0700
+Subject: ACPI: don't load acpi_cpufreq if acpi=off
+
+From: Yinghai Lu <yhlu.kernel@gmail.com>
+
+commit ee297533279a802eac8b1cbea8e65b24b36a1aac upstream.
+
+Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
++++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+@@ -779,6 +779,9 @@ static int __init acpi_cpufreq_init(void
+ {
+ int ret;
+
++ if (acpi_disabled)
++ return 0;
++
+ dprintk("acpi_cpufreq_init\n");
+
+ ret = acpi_cpufreq_early_init();
--- /dev/null
+From 935e5f290ec1eb0f1c15004421f5fd3154380fd5 Mon Sep 17 00:00:00 2001
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Thu, 11 Dec 2008 16:24:52 -0500
+Subject: ACPI: video: Fix reversed brightness behavior on ThinkPad SL series
+
+From: Zhang Rui <rui.zhang@intel.com>
+
+commit 935e5f290ec1eb0f1c15004421f5fd3154380fd5 upstream.
+
+Section B.6.2 of ACPI 3.0b specification that defines _BCL method
+doesn't require the brightness levels returned to be sorted.
+At least ThinkPad SL300 (and probably all IdeaPads) returns the
+array reversed (i.e. bightest levels have lowest indexes), which
+causes the brightness management behave in completely reversed
+manner on these machines (brightness increases when the laptop is
+idle, while the display dims when used).
+
+Sorting the array by brightness level values after reading the list
+fixes the issue.
+
+http://bugzilla.kernel.org/show_bug.cgi?id=12037
+
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Tested-by: Lubomir Rintel <lkundrak@v3.sk>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/video.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+--- a/drivers/acpi/video.c
++++ b/drivers/acpi/video.c
+@@ -36,6 +36,7 @@
+ #include <linux/backlight.h>
+ #include <linux/thermal.h>
+ #include <linux/video_output.h>
++#include <linux/sort.h>
+ #include <asm/uaccess.h>
+
+ #include <acpi/acpi_bus.h>
+@@ -632,6 +633,16 @@ acpi_video_bus_DOS(struct acpi_video_bus
+ }
+
+ /*
++ * Simple comparison function used to sort backlight levels.
++ */
++
++static int
++acpi_video_cmp_level(const void *a, const void *b)
++{
++ return *(int *)a - *(int *)b;
++}
++
++/*
+ * Arg:
+ * device : video output device (LCD, CRT, ..)
+ *
+@@ -682,6 +693,10 @@ acpi_video_init_brightness(struct acpi_v
+ count++;
+ }
+
++ /* don't sort the first two brightness levels */
++ sort(&br->levels[2], count - 2, sizeof(br->levels[2]),
++ acpi_video_cmp_level, NULL);
++
+ if (count < 2)
+ goto out_free_levels;
+
--- /dev/null
+From bbc241340681557a16982f4d1840f00963bc05b4 Mon Sep 17 00:00:00 2001
+From: Lin Ming <ming.m.lin@intel.com>
+Date: Mon, 4 Aug 2008 13:22:10 +0800
+Subject: ACPICA: Add function to dereference returned reference objects
+
+From: Lin Ming <ming.m.lin@intel.com>
+
+commit bbc241340681557a16982f4d1840f00963bc05b4 upstream.
+
+Examines the return object from a call to acpi_evaluate_object.
+Any Index or RefOf references are automatically dereferenced in
+an attempt to return something useful (these reference types
+cannot be converted into an external ACPI_OBJECT.)
+Lin Ming, Bob Moore.
+
+http://bugzilla.kernel.org/show_bug.cgi?id=11105
+
+Signed-off-by: Lin Ming <ming.m.lin@intel.com>
+Signed-off-by: Bob Moore <robert.moore@intel.com>
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/namespace/nsxfeval.c | 79 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 79 insertions(+)
+
+--- a/drivers/acpi/namespace/nsxfeval.c
++++ b/drivers/acpi/namespace/nsxfeval.c
+@@ -45,9 +45,14 @@
+ #include <acpi/acpi.h>
+ #include <acpi/acnamesp.h>
+ #include <acpi/acinterp.h>
++#include <acpi/amlcode.h>
+
+ #define _COMPONENT ACPI_NAMESPACE
+ ACPI_MODULE_NAME("nsxfeval")
++
++/* Local prototypes */
++static void acpi_ns_resolve_references(struct acpi_evaluate_info *info);
++
+ #ifdef ACPI_FUTURE_USAGE
+ /*******************************************************************************
+ *
+@@ -69,6 +74,7 @@ ACPI_MODULE_NAME("nsxfeval")
+ * be valid (non-null)
+ *
+ ******************************************************************************/
++
+ acpi_status
+ acpi_evaluate_object_typed(acpi_handle handle,
+ acpi_string pathname,
+@@ -283,6 +289,10 @@ acpi_evaluate_object(acpi_handle handle,
+
+ if (ACPI_SUCCESS(status)) {
+
++ /* Dereference Index and ref_of references */
++
++ acpi_ns_resolve_references(info);
++
+ /* Get the size of the returned object */
+
+ status =
+@@ -352,6 +362,74 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object)
+
+ /*******************************************************************************
+ *
++ * FUNCTION: acpi_ns_resolve_references
++ *
++ * PARAMETERS: Info - Evaluation info block
++ *
++ * RETURN: Info->return_object is replaced with the dereferenced object
++ *
++ * DESCRIPTION: Dereference certain reference objects. Called before an
++ * internal return object is converted to an external union acpi_object.
++ *
++ * Performs an automatic dereference of Index and ref_of reference objects.
++ * These reference objects are not supported by the union acpi_object, so this is a
++ * last resort effort to return something useful. Also, provides compatibility
++ * with other ACPI implementations.
++ *
++ * NOTE: does not handle references within returned package objects or nested
++ * references, but this support could be added later if found to be necessary.
++ *
++ ******************************************************************************/
++static void acpi_ns_resolve_references(struct acpi_evaluate_info *info)
++{
++ union acpi_operand_object *obj_desc = NULL;
++ struct acpi_namespace_node *node;
++
++ /* We are interested in reference objects only */
++
++ if (ACPI_GET_OBJECT_TYPE(info->return_object) !=
++ ACPI_TYPE_LOCAL_REFERENCE) {
++ return;
++ }
++
++ /*
++ * Two types of references are supported - those created by Index and
++ * ref_of operators. A name reference (AML_NAMEPATH_OP) can be converted
++ * to an union acpi_object, so it is not dereferenced here. A ddb_handle
++ * (AML_LOAD_OP) cannot be dereferenced, nor can it be converted to
++ * an union acpi_object.
++ */
++ switch (info->return_object->reference.opcode) {
++ case AML_INDEX_OP:
++
++ obj_desc = *(info->return_object->reference.where);
++ break;
++
++ case AML_REF_OF_OP:
++
++ node = info->return_object->reference.object;
++ if (node) {
++ obj_desc = node->object;
++ }
++ break;
++
++ default:
++ return;
++ }
++
++ /* Replace the existing reference object */
++
++ if (obj_desc) {
++ acpi_ut_add_reference(obj_desc);
++ acpi_ut_remove_reference(info->return_object);
++ info->return_object = obj_desc;
++ }
++
++ return;
++}
++
++/*******************************************************************************
++ *
+ * FUNCTION: acpi_walk_namespace
+ *
+ * PARAMETERS: Type - acpi_object_type to search for
+@@ -379,6 +457,7 @@ ACPI_EXPORT_SYMBOL(acpi_evaluate_object)
+ * function, etc.
+ *
+ ******************************************************************************/
++
+ acpi_status
+ acpi_walk_namespace(acpi_object_type type,
+ acpi_handle start_object,
--- /dev/null
+From f0e0da8a6cca44396c7a711e308d58084e881617 Mon Sep 17 00:00:00 2001
+From: Dennis Noordsij <dennis.noordsij@helsinki.fi>
+Date: Fri, 15 Aug 2008 09:37:58 +0800
+Subject: ACPICA: Copy dynamically loaded tables to local buffer
+
+From: Dennis Noordsij <dennis.noordsij@helsinki.fi>
+
+commit f0e0da8a6cca44396c7a711e308d58084e881617 upstream.
+
+Previously, dynamically loaded tables were simply mapped, but on some machines
+this memory is corrupted after suspend. Now copy the table to a local buffer.
+For OpRegion case, added checksum verify. Use the table length from the table header,
+not the region length. For Buffer case, use the table length also.
+
+http://bugzilla.kernel.org/show_bug.cgi?id=10734
+
+Signed-off-by: Dennis Noordsij <dennis.noordsij@helsinki.fi>
+Signed-off-by: Bob Moore <robert.moore@intel.com>
+Signed-off-by: Lin Ming <ming.m.lin@intel.com>
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/executer/exconfig.c | 113 ++++++++++++++++++++++++++++-----------
+ 1 file changed, 82 insertions(+), 31 deletions(-)
+
+--- a/drivers/acpi/executer/exconfig.c
++++ b/drivers/acpi/executer/exconfig.c
+@@ -280,6 +280,7 @@ acpi_ex_load_op(union acpi_operand_objec
+ struct acpi_walk_state *walk_state)
+ {
+ union acpi_operand_object *ddb_handle;
++ struct acpi_table_header *table;
+ struct acpi_table_desc table_desc;
+ u32 table_index;
+ acpi_status status;
+@@ -294,9 +295,8 @@ acpi_ex_load_op(union acpi_operand_objec
+ switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
+ case ACPI_TYPE_REGION:
+
+- ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Load from Region %p %s\n",
+- obj_desc,
+- acpi_ut_get_object_type_name(obj_desc)));
++ ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
++ "Load table from Region %p\n", obj_desc));
+
+ /* Region must be system_memory (from ACPI spec) */
+
+@@ -316,61 +316,112 @@ acpi_ex_load_op(union acpi_operand_objec
+ }
+
+ /*
+- * We will simply map the memory region for the table. However, the
+- * memory region is technically not guaranteed to remain stable and
+- * we may eventually have to copy the table to a local buffer.
++ * Map the table header and get the actual table length. The region
++ * length is not guaranteed to be the same as the table length.
++ */
++ table = acpi_os_map_memory(obj_desc->region.address,
++ sizeof(struct acpi_table_header));
++ if (!table) {
++ return_ACPI_STATUS(AE_NO_MEMORY);
++ }
++
++ length = table->length;
++ acpi_os_unmap_memory(table, sizeof(struct acpi_table_header));
++
++ /* Must have at least an ACPI table header */
++
++ if (length < sizeof(struct acpi_table_header)) {
++ return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
++ }
++
++ /*
++ * The memory region is not guaranteed to remain stable and we must
++ * copy the table to a local buffer. For example, the memory region
++ * is corrupted after suspend on some machines. Dynamically loaded
++ * tables are usually small, so this overhead is minimal.
+ */
++
++ /* Allocate a buffer for the table */
++
++ table_desc.pointer = ACPI_ALLOCATE(length);
++ if (!table_desc.pointer) {
++ return_ACPI_STATUS(AE_NO_MEMORY);
++ }
++
++ /* Map the entire table and copy it */
++
++ table = acpi_os_map_memory(obj_desc->region.address, length);
++ if (!table) {
++ ACPI_FREE(table_desc.pointer);
++ return_ACPI_STATUS(AE_NO_MEMORY);
++ }
++
++ ACPI_MEMCPY(table_desc.pointer, table, length);
++ acpi_os_unmap_memory(table, length);
++
+ table_desc.address = obj_desc->region.address;
+- table_desc.length = obj_desc->region.length;
+- table_desc.flags = ACPI_TABLE_ORIGIN_MAPPED;
+ break;
+
+ case ACPI_TYPE_BUFFER: /* Buffer or resolved region_field */
+
+ ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+- "Load from Buffer or Field %p %s\n", obj_desc,
+- acpi_ut_get_object_type_name(obj_desc)));
+-
+- length = obj_desc->buffer.length;
++ "Load table from Buffer or Field %p\n",
++ obj_desc));
+
+ /* Must have at least an ACPI table header */
+
+- if (length < sizeof(struct acpi_table_header)) {
++ if (obj_desc->buffer.length < sizeof(struct acpi_table_header)) {
+ return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
+ }
+
+- /* Validate checksum here. It won't get validated in tb_add_table */
++ /* Get the actual table length from the table header */
+
+- status =
+- acpi_tb_verify_checksum(ACPI_CAST_PTR
+- (struct acpi_table_header,
+- obj_desc->buffer.pointer), length);
+- if (ACPI_FAILURE(status)) {
+- return_ACPI_STATUS(status);
++ table =
++ ACPI_CAST_PTR(struct acpi_table_header,
++ obj_desc->buffer.pointer);
++ length = table->length;
++
++ /* Table cannot extend beyond the buffer */
++
++ if (length > obj_desc->buffer.length) {
++ return_ACPI_STATUS(AE_AML_BUFFER_LIMIT);
++ }
++ if (length < sizeof(struct acpi_table_header)) {
++ return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
+ }
+
+ /*
+- * We need to copy the buffer since the original buffer could be
+- * changed or deleted in the future
++ * Copy the table from the buffer because the buffer could be modified
++ * or even deleted in the future
+ */
+ table_desc.pointer = ACPI_ALLOCATE(length);
+ if (!table_desc.pointer) {
+ return_ACPI_STATUS(AE_NO_MEMORY);
+ }
+
+- ACPI_MEMCPY(table_desc.pointer, obj_desc->buffer.pointer,
+- length);
+- table_desc.length = length;
+- table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED;
++ ACPI_MEMCPY(table_desc.pointer, table, length);
++ table_desc.address = ACPI_TO_INTEGER(table_desc.pointer);
+ break;
+
+ default:
+ return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
+ }
+
+- /*
+- * Install the new table into the local data structures
+- */
++ /* Validate table checksum (will not get validated in tb_add_table) */
++
++ status = acpi_tb_verify_checksum(table_desc.pointer, length);
++ if (ACPI_FAILURE(status)) {
++ ACPI_FREE(table_desc.pointer);
++ return_ACPI_STATUS(status);
++ }
++
++ /* Complete the table descriptor */
++
++ table_desc.length = length;
++ table_desc.flags = ACPI_TABLE_ORIGIN_ALLOCATED;
++
++ /* Install the new table into the local data structures */
++
+ status = acpi_tb_add_table(&table_desc, &table_index);
+ if (ACPI_FAILURE(status)) {
+ goto cleanup;
+@@ -379,7 +430,7 @@ acpi_ex_load_op(union acpi_operand_objec
+ /*
+ * Add the table to the namespace.
+ *
+- * Note: We load the table objects relative to the root of the namespace.
++ * Note: Load the table objects relative to the root of the namespace.
+ * This appears to go against the ACPI specification, but we do it for
+ * compatibility with other ACPI implementations.
+ */
+@@ -415,7 +466,7 @@ acpi_ex_load_op(union acpi_operand_objec
+ cleanup:
+ if (ACPI_FAILURE(status)) {
+
+- /* Delete allocated buffer or mapping */
++ /* Delete allocated table buffer */
+
+ acpi_tb_delete_table(&table_desc);
+ }
--- /dev/null
+From 2da2c21d7508d34bc6d600df665d84871b65d2b9 Mon Sep 17 00:00:00 2001
+From: Tom Tucker <tom@opengridcomputing.com>
+Date: Sun, 23 Nov 2008 09:58:08 -0600
+Subject: Add a reference to sunrpc in svc_addsock
+
+From: Tom Tucker <tom@opengridcomputing.com>
+
+commit 2da2c21d7508d34bc6d600df665d84871b65d2b9 upstream.
+
+The svc_addsock function adds transport instances without taking a
+reference on the sunrpc.ko module, however, the generic transport
+destruction code drops a reference when a transport instance
+is destroyed.
+
+Add a try_module_get call to the svc_addsock function for transport
+instances added by this function.
+
+Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
+Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
+Tested-by: Jeff Moyer <jmoyer@redhat.com>
+Cc: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/sunrpc/svcsock.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/net/sunrpc/svcsock.c
++++ b/net/sunrpc/svcsock.c
+@@ -1171,7 +1171,11 @@ int svc_addsock(struct svc_serv *serv,
+ else if (so->state > SS_UNCONNECTED)
+ err = -EISCONN;
+ else {
+- svsk = svc_setup_socket(serv, so, &err, SVC_SOCK_DEFAULTS);
++ if (!try_module_get(THIS_MODULE))
++ err = -ENOENT;
++ else
++ svsk = svc_setup_socket(serv, so, &err,
++ SVC_SOCK_DEFAULTS);
+ if (svsk) {
+ struct sockaddr_storage addr;
+ struct sockaddr *sin = (struct sockaddr *)&addr;
+@@ -1184,7 +1188,8 @@ int svc_addsock(struct svc_serv *serv,
+ spin_unlock_bh(&serv->sv_lock);
+ svc_xprt_received(&svsk->sk_xprt);
+ err = 0;
+- }
++ } else
++ module_put(THIS_MODULE);
+ }
+ if (err) {
+ sockfd_put(so);
--- /dev/null
+From b81aa1c79201cb424114fd198607951900babe18 Mon Sep 17 00:00:00 2001
+From: Chandra Seetharaman <sekharan@us.ibm.com>
+Date: Thu, 13 Nov 2008 23:39:00 +0000
+Subject: dm mpath: avoid attempting to activate null path
+
+From: Chandra Seetharaman <sekharan@us.ibm.com>
+
+commit b81aa1c79201cb424114fd198607951900babe18 upstream.
+
+Path activation code is called even when the pgpath is NULL. This could
+lead to a panic in activate_path(). Such a panic is seen in -rt kernel.
+
+This problem has been there before the pg_init() was moved to a
+workqueue.
+
+Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
+Signed-off-by: Alasdair G Kergon <agk@redhat.com>
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/md/dm-mpath.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/dm-mpath.c
++++ b/drivers/md/dm-mpath.c
+@@ -427,13 +427,13 @@ static void process_queued_ios(struct wo
+ __choose_pgpath(m);
+
+ pgpath = m->current_pgpath;
+- m->pgpath_to_activate = m->current_pgpath;
+
+ if ((pgpath && !m->queue_io) ||
+ (!pgpath && !m->queue_if_no_path))
+ must_queue = 0;
+
+- if (m->pg_init_required && !m->pg_init_in_progress) {
++ if (m->pg_init_required && !m->pg_init_in_progress && pgpath) {
++ m->pgpath_to_activate = pgpath;
+ m->pg_init_count++;
+ m->pg_init_required = 0;
+ m->pg_init_in_progress = 1;
--- /dev/null
+From db053c6b447d083f3c63e5540b70a3e521b468ca Mon Sep 17 00:00:00 2001
+From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+Date: Tue, 4 Nov 2008 13:32:31 +0200
+Subject: hso: rfkill type should be WWAN
+
+From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+
+commit db053c6b447d083f3c63e5540b70a3e521b468ca upstream.
+
+Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+Cc: Denis Joseph Barrow <D.Barow@option.com>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Frank Seidel <fseidel@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/usb/hso.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/usb/hso.c
++++ b/drivers/net/usb/hso.c
+@@ -2047,7 +2047,7 @@ static void hso_create_rfkill(struct hso
+ char *rfkn;
+
+ hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev,
+- RFKILL_TYPE_WLAN);
++ RFKILL_TYPE_WWAN);
+ if (!hso_net->rfkill) {
+ dev_err(dev, "%s - Out of memory", __func__);
+ return;
--- /dev/null
+From 14a4dfe2ff8c353f59ae8324059ded1cfe22c7d9 Mon Sep 17 00:00:00 2001
+From: Helmut Schaa <helmut.schaa@googlemail.com>
+Date: Wed, 10 Dec 2008 13:17:26 +0100
+Subject: ipw2200: fix scanning while associated
+
+From: Helmut Schaa <helmut.schaa@googlemail.com>
+
+commit 14a4dfe2ff8c353f59ae8324059ded1cfe22c7d9 upstream.
+
+This patch fixes sporadic firmware restarts when scanning while associated.
+
+The firmware will quietly cancel a scan (while associated) if the dwell time
+for a channel to be scanned is larger than the time it may stay away from the
+operating channel (because of DTIM catching). Unfortunately the driver is not
+notified about the canceled scan and therefore the scan watchdog timeout will
+be hit and the driver causes a firmware restart which results in
+disassociation. This mainly happens on passive channels which use a dwell time
+of 120 whereas a typical beacon interval is around 100.
+
+The patch changes the dwell time for passive channels to be slightly smaller
+than the actual beacon interval to work around the firmware issue. Furthermore
+the number of allowed beacon misses is increased from one to three as otherwise
+most scans (while associated) won't complete successfully.
+
+However scanning while associated will still fail in corner cases such as a
+beacon intervals below 30.
+
+Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ipw2200.c | 28 ++++++++++++++++++++++------
+ drivers/net/wireless/ipw2200.h | 1 +
+ 2 files changed, 23 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/wireless/ipw2200.c
++++ b/drivers/net/wireless/ipw2200.c
+@@ -4346,7 +4346,8 @@ static void ipw_handle_missed_beacon(str
+ return;
+ }
+
+- if (priv->status & STATUS_SCANNING) {
++ if (priv->status & STATUS_SCANNING &&
++ missed_count > IPW_MB_SCAN_CANCEL_THRESHOLD) {
+ /* Stop scan to keep fw from getting
+ * stuck (only if we aren't roaming --
+ * otherwise we'll never scan more than 2 or 3
+@@ -6276,6 +6277,20 @@ static void ipw_add_scan_channels(struct
+ }
+ }
+
++static int ipw_passive_dwell_time(struct ipw_priv *priv)
++{
++ /* staying on passive channels longer than the DTIM interval during a
++ * scan, while associated, causes the firmware to cancel the scan
++ * without notification. Hence, don't stay on passive channels longer
++ * than the beacon interval.
++ */
++ if (priv->status & STATUS_ASSOCIATED
++ && priv->assoc_network->beacon_interval > 10)
++ return priv->assoc_network->beacon_interval - 10;
++ else
++ return 120;
++}
++
+ static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct)
+ {
+ struct ipw_scan_request_ext scan;
+@@ -6319,16 +6334,16 @@ static int ipw_request_scan_helper(struc
+ scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee));
+
+ if (type == IW_SCAN_TYPE_PASSIVE) {
+- IPW_DEBUG_WX("use passive scanning\n");
+- scan_type = IPW_SCAN_PASSIVE_FULL_DWELL_SCAN;
++ IPW_DEBUG_WX("use passive scanning\n");
++ scan_type = IPW_SCAN_PASSIVE_FULL_DWELL_SCAN;
+ scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] =
+- cpu_to_le16(120);
++ cpu_to_le16(ipw_passive_dwell_time(priv));
+ ipw_add_scan_channels(priv, &scan, scan_type);
+ goto send_request;
+ }
+
+ /* Use active scan by default. */
+- if (priv->config & CFG_SPEED_SCAN)
++ if (priv->config & CFG_SPEED_SCAN)
+ scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] =
+ cpu_to_le16(30);
+ else
+@@ -6338,7 +6353,8 @@ static int ipw_request_scan_helper(struc
+ scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] =
+ cpu_to_le16(20);
+
+- scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120);
++ scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] =
++ cpu_to_le16(ipw_passive_dwell_time(priv));
+ scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20);
+
+ #ifdef CONFIG_IPW2200_MONITOR
+--- a/drivers/net/wireless/ipw2200.h
++++ b/drivers/net/wireless/ipw2200.h
+@@ -244,6 +244,7 @@ enum connection_manager_assoc_states {
+ #define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED 31
+
+ #define HOST_NOTIFICATION_STATUS_BEACON_MISSING 1
++#define IPW_MB_SCAN_CANCEL_THRESHOLD 3
+ #define IPW_MB_ROAMING_THRESHOLD_MIN 1
+ #define IPW_MB_ROAMING_THRESHOLD_DEFAULT 8
+ #define IPW_MB_ROAMING_THRESHOLD_MAX 30
--- /dev/null
+From ea43ddd8491feccf36267349748ea91b1194481e Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Mon, 13 Oct 2008 11:55:11 +1100
+Subject: md: Allow metadata_version to be updated for externally managed metadata.
+
+From: NeilBrown <neilb@suse.de>
+
+commit ea43ddd8491feccf36267349748ea91b1194481e upstream.
+
+For externally managed metadata, the 'metadata_version' sysfs
+attribute is really just a channel for user-space programs to
+communicate about how the array is being managed.
+It can be useful for this to be changed while the array is active.
+
+Normally changes to metadata_version are not permitted while the array
+is active. Change that so that if the metadata is externally managed,
+the metadata_version can be changed to a different flavour of external
+management.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/md/md.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -2960,7 +2960,13 @@ metadata_store(mddev_t *mddev, const cha
+ {
+ int major, minor;
+ char *e;
+- if (!list_empty(&mddev->disks))
++ /* Changing the details of 'external' metadata is
++ * always permitted. Otherwise there must be
++ * no devices attached to the array.
++ */
++ if (mddev->external && strncmp(buf, "external:", 9) == 0)
++ ;
++ else if (!list_empty(&mddev->disks))
+ return -EBUSY;
+
+ if (cmd_match(buf, "none")) {
--- /dev/null
+From 80268ee9270ebe4847365a7426de91d179e870d0 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Mon, 13 Oct 2008 11:55:12 +1100
+Subject: md: Don't try to set an array to 'read-auto' if it is already in that state.
+
+From: NeilBrown <neilb@suse.de>
+
+commit 80268ee9270ebe4847365a7426de91d179e870d0 upstream.
+
+'read-auto' is a variant of 'readonly' which will switch to writable
+on the first write attempt.
+
+Calling do_md_stop to set the array readonly when it is already readonly
+returns an error. So make sure not to do that.
+
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/md/md.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -2742,9 +2742,9 @@ array_state_store(mddev_t *mddev, const
+ break;
+ case read_auto:
+ if (mddev->pers) {
+- if (mddev->ro != 1)
++ if (mddev->ro == 0)
+ err = do_md_stop(mddev, 1, 0);
+- else
++ else if (mddev->ro == 1)
+ err = restart_array(mddev);
+ if (err == 0) {
+ mddev->ro = 2;
--- /dev/null
+From 6841c8e26357904ef462650273f5d5015f7bb370 Mon Sep 17 00:00:00 2001
+From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Date: Tue, 9 Dec 2008 13:14:16 -0800
+Subject: mm: remove UP version of lru_add_drain_all()
+
+From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+
+commit 6841c8e26357904ef462650273f5d5015f7bb370 upstream.
+
+Currently, lru_add_drain_all() has two version.
+ (1) use schedule_on_each_cpu()
+ (2) don't use schedule_on_each_cpu()
+
+Gerald Schaefer reported it doesn't work well on SMP (not NUMA) S390
+machine.
+
+ offline_pages() calls lru_add_drain_all() followed by drain_all_pages().
+ While drain_all_pages() works on each cpu, lru_add_drain_all() only runs
+ on the current cpu for architectures w/o CONFIG_NUMA. This let us run
+ into the BUG_ON(!PageBuddy(page)) in __offline_isolated_pages() during
+ memory hotplug stress test on s390. The page in question was still on the
+ pcp list, because of a race with lru_add_drain_all() and drain_all_pages()
+ on different cpus.
+
+Actually, Almost machine has CONFIG_UNEVICTABLE_LRU=y. Then almost machine use
+(1) version lru_add_drain_all although the machine is UP.
+
+Then this ifdef is not valueable.
+simple removing is better.
+
+Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Cc: Christoph Lameter <cl@linux-foundation.org>
+Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
+Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Cc: Dave Hansen <dave@linux.vnet.ibm.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Nick Piggin <npiggin@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/swap.c | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+--- a/mm/swap.c
++++ b/mm/swap.c
+@@ -244,7 +244,6 @@ void lru_add_drain(void)
+ put_cpu();
+ }
+
+-#ifdef CONFIG_NUMA
+ static void lru_add_drain_per_cpu(struct work_struct *dummy)
+ {
+ lru_add_drain();
+@@ -258,18 +257,6 @@ int lru_add_drain_all(void)
+ return schedule_on_each_cpu(lru_add_drain_per_cpu);
+ }
+
+-#else
+-
+-/*
+- * Returns 0 for success
+- */
+-int lru_add_drain_all(void)
+-{
+- lru_add_drain();
+- return 0;
+-}
+-#endif
+-
+ /*
+ * Batched page_cache_release(). Decrement the reference count on all the
+ * passed pages. If it fell to zero then remove the page from the LRU and
--- /dev/null
+From 93f78da405685a756beeaeae4b5e41fcec39eab3 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Tue, 14 Oct 2008 12:12:02 -0700
+Subject: Revert "vt: fix background color on line feed"
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 93f78da405685a756beeaeae4b5e41fcec39eab3 upstream.
+
+This reverts commit c9e587abfdec2c2aaa55fab83bcb4972e2f84f9b, and the
+subsequent commits that fixed it up:
+
+ - afa9b649 "fbcon: prevent cursor disappearance after switching to 512
+ character font"
+
+ - d850a2fa "vt/fbcon: fix background color on line feed"
+
+ - 7fe3915a "vt/fbcon: update scrl_erase_char after 256/512-glyph font
+ switch"
+
+by request of Alan Cox. Quoth Alan:
+ "Unfortunately it's wrong and its been causing breakages because
+ various apps like ncurses expect our previous (and correct)
+ behaviour."
+
+Alexander sent out a similar patch.
+
+Requested-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Tested-by: Jan Engelhardt <jengelh@medozas.de>
+Cc: Alexander V. Lukyanov <lav@netis.ru>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Tony Jones <tonyj@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/vt.c | 5 ++---
+ drivers/video/console/fbcon.c | 39 ++++++++++-----------------------------
+ drivers/video/console/mdacon.c | 2 +-
+ drivers/video/console/sticon.c | 4 ++--
+ drivers/video/console/vgacon.c | 4 ++--
+ include/linux/console_struct.h | 1 -
+ 6 files changed, 17 insertions(+), 38 deletions(-)
+
+--- a/drivers/char/vt.c
++++ b/drivers/char/vt.c
+@@ -301,7 +301,7 @@ static void scrup(struct vc_data *vc, un
+ d = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
+ s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * (t + nr));
+ scr_memmovew(d, s, (b - t - nr) * vc->vc_size_row);
+- scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_scrl_erase_char,
++ scr_memsetw(d + (b - t - nr) * vc->vc_cols, vc->vc_video_erase_char,
+ vc->vc_size_row * nr);
+ }
+
+@@ -319,7 +319,7 @@ static void scrdown(struct vc_data *vc,
+ s = (unsigned short *)(vc->vc_origin + vc->vc_size_row * t);
+ step = vc->vc_cols * nr;
+ scr_memmovew(s + step, s, (b - t - nr) * vc->vc_size_row);
+- scr_memsetw(s, vc->vc_scrl_erase_char, 2 * step);
++ scr_memsetw(s, vc->vc_video_erase_char, 2 * step);
+ }
+
+ static void do_update_region(struct vc_data *vc, unsigned long start, int count)
+@@ -434,7 +434,6 @@ static void update_attr(struct vc_data *
+ vc->vc_blink, vc->vc_underline,
+ vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic);
+ vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' ';
+- vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, vc->vc_decscnm, false) << 8) | ' ';
+ }
+
+ /* Note: inverting the screen twice should revert to the original state */
+--- a/drivers/video/console/fbcon.c
++++ b/drivers/video/console/fbcon.c
+@@ -1855,8 +1855,6 @@ static int fbcon_scroll(struct vc_data *
+ struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
+ struct display *p = &fb_display[vc->vc_num];
+ int scroll_partial = info->flags & FBINFO_PARTIAL_PAN_OK;
+- unsigned short saved_ec;
+- int ret;
+
+ if (fbcon_is_inactive(vc, info))
+ return -EINVAL;
+@@ -1869,11 +1867,6 @@ static int fbcon_scroll(struct vc_data *
+ * whole screen (prevents flicker).
+ */
+
+- saved_ec = vc->vc_video_erase_char;
+- vc->vc_video_erase_char = vc->vc_scrl_erase_char;
+-
+- ret = 0;
+-
+ switch (dir) {
+ case SM_UP:
+ if (count > vc->vc_rows) /* Maximum realistic size */
+@@ -1890,9 +1883,9 @@ static int fbcon_scroll(struct vc_data *
+ scr_memsetw((unsigned short *) (vc->vc_origin +
+ vc->vc_size_row *
+ (b - count)),
+- vc->vc_scrl_erase_char,
++ vc->vc_video_erase_char,
+ vc->vc_size_row * count);
+- ret = 1;
++ return 1;
+ break;
+
+ case SCROLL_WRAP_MOVE:
+@@ -1962,10 +1955,9 @@ static int fbcon_scroll(struct vc_data *
+ scr_memsetw((unsigned short *) (vc->vc_origin +
+ vc->vc_size_row *
+ (b - count)),
+- vc->vc_scrl_erase_char,
++ vc->vc_video_erase_char,
+ vc->vc_size_row * count);
+- ret = 1;
+- break;
++ return 1;
+ }
+ break;
+
+@@ -1982,9 +1974,9 @@ static int fbcon_scroll(struct vc_data *
+ scr_memsetw((unsigned short *) (vc->vc_origin +
+ vc->vc_size_row *
+ t),
+- vc->vc_scrl_erase_char,
++ vc->vc_video_erase_char,
+ vc->vc_size_row * count);
+- ret = 1;
++ return 1;
+ break;
+
+ case SCROLL_WRAP_MOVE:
+@@ -2052,15 +2044,12 @@ static int fbcon_scroll(struct vc_data *
+ scr_memsetw((unsigned short *) (vc->vc_origin +
+ vc->vc_size_row *
+ t),
+- vc->vc_scrl_erase_char,
++ vc->vc_video_erase_char,
+ vc->vc_size_row * count);
+- ret = 1;
+- break;
++ return 1;
+ }
+- break;
+ }
+- vc->vc_video_erase_char = saved_ec;
+- return ret;
++ return 0;
+ }
+
+
+@@ -2522,9 +2511,6 @@ static int fbcon_do_set_font(struct vc_d
+ c = vc->vc_video_erase_char;
+ vc->vc_video_erase_char =
+ ((c & 0xfe00) >> 1) | (c & 0xff);
+- c = vc->vc_scrl_erase_char;
+- vc->vc_scrl_erase_char =
+- ((c & 0xFE00) >> 1) | (c & 0xFF);
+ vc->vc_attr >>= 1;
+ }
+ } else if (!vc->vc_hi_font_mask && cnt == 512) {
+@@ -2555,14 +2541,9 @@ static int fbcon_do_set_font(struct vc_d
+ if (vc->vc_can_do_color) {
+ vc->vc_video_erase_char =
+ ((c & 0xff00) << 1) | (c & 0xff);
+- c = vc->vc_scrl_erase_char;
+- vc->vc_scrl_erase_char =
+- ((c & 0xFF00) << 1) | (c & 0xFF);
+ vc->vc_attr <<= 1;
+- } else {
++ } else
+ vc->vc_video_erase_char = c & ~0x100;
+- vc->vc_scrl_erase_char = c & ~0x100;
+- }
+ }
+
+ }
+--- a/drivers/video/console/mdacon.c
++++ b/drivers/video/console/mdacon.c
+@@ -533,7 +533,7 @@ static void mdacon_cursor(struct vc_data
+
+ static int mdacon_scroll(struct vc_data *c, int t, int b, int dir, int lines)
+ {
+- u16 eattr = mda_convert_attr(c->vc_scrl_erase_char);
++ u16 eattr = mda_convert_attr(c->vc_video_erase_char);
+
+ if (!lines)
+ return 0;
+--- a/drivers/video/console/sticon.c
++++ b/drivers/video/console/sticon.c
+@@ -170,12 +170,12 @@ static int sticon_scroll(struct vc_data
+ switch (dir) {
+ case SM_UP:
+ sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols);
+- sti_clear(sti, b - count, 0, count, conp->vc_cols, conp->vc_scrl_erase_char);
++ sti_clear(sti, b - count, 0, count, conp->vc_cols, conp->vc_video_erase_char);
+ break;
+
+ case SM_DOWN:
+ sti_bmove(sti, t, 0, t + count, 0, b - t - count, conp->vc_cols);
+- sti_clear(sti, t, 0, count, conp->vc_cols, conp->vc_scrl_erase_char);
++ sti_clear(sti, t, 0, count, conp->vc_cols, conp->vc_video_erase_char);
+ break;
+ }
+
+--- a/drivers/video/console/vgacon.c
++++ b/drivers/video/console/vgacon.c
+@@ -1350,7 +1350,7 @@ static int vgacon_scroll(struct vc_data
+ } else
+ c->vc_origin += delta;
+ scr_memsetw((u16 *) (c->vc_origin + c->vc_screenbuf_size -
+- delta), c->vc_scrl_erase_char,
++ delta), c->vc_video_erase_char,
+ delta);
+ } else {
+ if (oldo - delta < vga_vram_base) {
+@@ -1363,7 +1363,7 @@ static int vgacon_scroll(struct vc_data
+ } else
+ c->vc_origin -= delta;
+ c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
+- scr_memsetw((u16 *) (c->vc_origin), c->vc_scrl_erase_char,
++ scr_memsetw((u16 *) (c->vc_origin), c->vc_video_erase_char,
+ delta);
+ }
+ c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
+--- a/include/linux/console_struct.h
++++ b/include/linux/console_struct.h
+@@ -53,7 +53,6 @@ struct vc_data {
+ unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */
+ struct console_font vc_font; /* Current VC font set */
+ unsigned short vc_video_erase_char; /* Background erase character */
+- unsigned short vc_scrl_erase_char; /* Erase character for scroll */
+ /* VT terminal data */
+ unsigned int vc_state; /* Escape sequence parser state */
+ unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */
seq_file-fix-big-enough-lseek-read.patch
serial-set-correct-baud_base-for-oxford-semiconductor-ltd-exsys-ex-41092-dual-16950-serial-adapter.patch
elf-core-dump-fix-get_user-use.patch
+xfs-set-b_error-from-bio-error-in-xfs_buf_bio_end_io.patch
+add-a-reference-to-sunrpc-in-svc_addsock.patch
+mm-remove-up-version-of-lru_add_drain_all.patch
+revert-vt-fix-background-color-on-line-feed.patch
+md-don-t-try-to-set-an-array-to-read-auto-if-it-is-already-in-that-state.patch
+md-allow-metadata_version-to-be-updated-for-externally-managed-metadata.patch
+ipw2200-fix-scanning-while-associated.patch
+hso-rfkill-type-should-be-wwan.patch
+dm-mpath-avoid-attempting-to-activate-null-path.patch
+acpica-copy-dynamically-loaded-tables-to-local-buffer.patch
+acpica-add-function-to-dereference-returned-reference-objects.patch
+acpi-don-t-load-acpi_cpufreq-if-acpi-off.patch
+acpi-video-fix-reversed-brightness-behavior-on-thinkpad-sl-series.patch
--- /dev/null
+From cfbe52672fbc6f333892e8dde82c35e0a76aa5f5 Mon Sep 17 00:00:00 2001
+From: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
+Date: Fri, 12 Dec 2008 15:27:25 +1100
+Subject: XFS: set b_error from bio error in xfs_buf_bio_end_io
+
+From: Lachlan McIlroy <lachlan@redback.melbourne.sgi.com>
+
+commit cfbe52672fbc6f333892e8dde82c35e0a76aa5f5 upstream.
+
+Preserve any error returned by the bio layer.
+
+Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
+Reviewed-by: Tim Shimmin <tes@sgi.com>
+Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
+Cc: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/xfs/linux-2.6/xfs_buf.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/fs/xfs/linux-2.6/xfs_buf.c
++++ b/fs/xfs/linux-2.6/xfs_buf.c
+@@ -1114,8 +1114,7 @@ xfs_buf_bio_end_io(
+ unsigned int blocksize = bp->b_target->bt_bsize;
+ struct bio_vec *bvec = bio->bi_io_vec + bio->bi_vcnt - 1;
+
+- if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
+- bp->b_error = EIO;
++ xfs_buf_ioerror(bp, -error);
+
+ do {
+ struct page *page = bvec->bv_page;