When turning off the Wireless device with Fn+F2 on EeePC 100h and others, usually the kernel
freezes completely.
Steps to reproduce:
1. Boot EeePC 901 with WiFi off
2. On the text console press Fn+F2: the blue WiFi feedback LED turns on and
some messages appears on the dmesg (see attached).
3. After having established a connection to a wireless network, press the Fn+F2 again: the blue WiFi LED turns off and the system freezes. A hard reset is needed to restart the computer.
Workaround
Patch the kernel source, (eeepc-laptop.c) with this patch, see also this bug report: http://bugzilla.kernel.org/show_bug.cgi?id=13390
-----------------------------------------------------------------------------------------------------------------------------------
Avoid an eeepc-laptop/rt2860sta panic if associated when the hw disappears.
This is a workaround. It is expected to become unnecessary when rt2800pci
makes it into a kernel release.
When turning off the Wireless device with Fn+F2 on EeePC 100h and others, usually the kernel
freezes completely.
Steps to reproduce:
1. Boot EeePC 901 with WiFi off
2. On the text console press Fn+F2: the blue WiFi feedback LED turns on and
some messages appears on the dmesg (see attached).
3. After having established a connection to a wireless network, press the Fn+F2 again: the blue WiFi LED turns off and the system freezes. A hard reset is needed to restart the computer.
Workaround
Patch the kernel source, (eeepc-laptop.c) with this patch, see also this bug report: http:// bugzilla. kernel. org/show_ bug.cgi? id=13390 ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- rt2860sta panic if associated when the hw disappears.
-------
Avoid an eeepc-laptop/
This is a workaround. It is expected to become unnecessary when rt2800pci
makes it into a kernel release.
Signed-off-by: Darren Salt <email address hidden> ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- platform/ x86/eeepc- laptop. c.dist 2009-08-14 12:30:30.385461620 +0100 platform/ x86/eeepc- laptop. c 2009-08-14 16:33:17.113557519 +0100 pci_hotplug. h>
-------
--- ./drivers/
+++ ./drivers/
@@ -32,6 +32,7 @@
#include <linux/uaccess.h>
#include <linux/input.h>
#include <linux/rfkill.h>
+#include <linux/semaphore.h>
#include <linux/pci.h>
#include <linux/
@@ -139,6 +140,7 @@ adapter_ status,
u16 event_count[128]; /* count for each event */
struct input_dev *inputdev;
u16 *keycode_map;
+ struct semaphore rfkill_sem;
struct rfkill *wlan_rfkill;
struct rfkill *bluetooth_rfkill;
struct rfkill *wwan3g_rfkill;
@@ -223,6 +225,8 @@
.get_power_status = eeepc_get_
};
+static void eeepc_hotplug_ work(struct work_struct *work); backlight */ backlight_ device;
+
/* The backlight device /sys/class/
static struct backlight_device *eeepc_
@@ -335,7 +339,16 @@ set(void *data, bool blocked) work(NULL) ;
static int eeepc_rfkill_
{
unsigned long asl = (unsigned long)data;
- return set_acpi(asl, !blocked);
+ int ret;
+
+ if (asl != CM_ASL_WLAN)
+ return set_acpi(asl, !blocked);
+
+ /* hack to avoid panic with rt2860sta */
+ if (blocked)
+ eeepc_hotplug_
+ ret = set_acpi(asl, !blocked);
+ return ret;
}
static const struct rfkill_ops eeepc_rfkill_ops = {
@@ -667,18 +680,20 @@
struct pci_bus *bus = pci_find_bus(0, 1);
bool blocked;
+ while (down_interrupt ible(&ehotk- >rfkill_ sem)) /**/; "Unable to find PCI bus 1?\n");
+
if (!bus) {
pr_warning(
- return;
+ goto done;
}
- blocked = eeepc_wlan_ rfkill_ blocked( ); rfkill_ blocked( ) : true; dev_put( dev); single_ device( bus, 0);
+ blocked = work ? eeepc_wlan_
if (!blocked) {
dev = pci_get_slot(bus, 0);
if (dev) {
/* Device already present */
pci_
- return;
+ goto done;
}
dev = pci_scan_
if (dev) {
@@ -695,6 +710,8 @@
}
rfkill_ set_sw_ state(ehotk- >wlan_rfkill, blocked); >rfkill_ sem);
+done:
+ up(&ehotk-
}
static void eeepc_rfkill_ notify( acpi_handle handle, u32 event, void *data) sizeof( struct eeepc_hotk), GFP_KERNEL); &ehotk- >rfkill_ sem, 1); ASL_DISPLAYSWIT CH; acpi_device_ name(device) , EEEPC_HOTK_ DEVICE_ NAME);
@@ -849,6 +866,7 @@
ehotk = kzalloc(
if (!ehotk)
return -ENOMEM;
+ sema_init(
ehotk->init_flag = DISABLE_ASL_WLAN | DISABLE_
ehotk->handle = device->handle;
strcpy(