This is a note to let you know that I've just added the patch titled
acer-wmi: does not set persistence state by rfkill_init_sw_state
to the 2.6.38-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
acer-wmi-does-not-set-persistence-state-by-rfkill_init_sw_state.patch
and it can be found in the queue-2.6.38 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
From 8215af019040ce9182728afee9642d8fdeb17f59 Mon Sep 17 00:00:00 2001
From: Lee, Chun-Yi <[email protected]>
Date: Mon, 28 Mar 2011 16:52:02 +0800
Subject: acer-wmi: does not set persistence state by rfkill_init_sw_state
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Lee, Chun-Yi <[email protected]>
commit 8215af019040ce9182728afee9642d8fdeb17f59 upstream.
Acer BIOS keeps devices state when system reboot, but reset to default
device states (Wlan on, Bluetooth off, wwan on) if system cold boot.
That means BIOS's initial state is not always real persistence.
So, removed rfkill_init_sw_state because it sets initial state to
persistence then replicate to other new killswitch when rfkill-input
enabled.
After removed it, acer-wmi set initial soft-block state after rfkill
register, and doesn't allow set_block until rfkill initial finished.
Reference: bko#31002
https://bugzilla.kernel.org/show_bug.cgi?id=31002
Cc: Carlos Corbacho <[email protected]>
Cc: Matthew Garrett <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Corentin Chary <[email protected]>
Cc: OldÅich JedliÄka <[email protected]>
Cc: Johannes Berg <[email protected]>
Signed-off-by: Lee, Chun-Yi <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/platform/x86/acer-wmi.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -222,6 +222,7 @@ struct acer_debug {
static struct rfkill *wireless_rfkill;
static struct rfkill *bluetooth_rfkill;
static struct rfkill *threeg_rfkill;
+static bool rfkill_inited;
/* Each low-level interface must define at least some of the following */
struct wmi_interface {
@@ -1161,9 +1162,13 @@ static int acer_rfkill_set(void *data, b
{
acpi_status status;
u32 cap = (unsigned long)data;
- status = set_u32(!blocked, cap);
- if (ACPI_FAILURE(status))
- return -ENODEV;
+
+ if (rfkill_inited) {
+ status = set_u32(!blocked, cap);
+ if (ACPI_FAILURE(status))
+ return -ENODEV;
+ }
+
return 0;
}
@@ -1187,14 +1192,16 @@ static struct rfkill *acer_rfkill_regist
return ERR_PTR(-ENOMEM);
status = get_device_status(&state, cap);
- if (ACPI_SUCCESS(status))
- rfkill_init_sw_state(rfkill_dev, !state);
err = rfkill_register(rfkill_dev);
if (err) {
rfkill_destroy(rfkill_dev);
return ERR_PTR(err);
}
+
+ if (ACPI_SUCCESS(status))
+ rfkill_set_sw_state(rfkill_dev, !state);
+
return rfkill_dev;
}
@@ -1229,6 +1236,8 @@ static int acer_rfkill_init(struct devic
}
}
+ rfkill_inited = true;
+
schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ));
return 0;
Patches currently in stable-queue which might be from [email protected]
are
queue-2.6.38/acer-wmi-does-not-set-persistence-state-by-rfkill_init_sw_state.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable