eeepc 1000h, rfkill hotkey freezes eeepc when switching off an active wireless connection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Confirmed
|
Unknown
|
|||
linux (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
When turning off the Wireless device with Fn+F2 on EeePC 1000h and others, usually the kernel
freezes completely.
Steps to reproduce:
1. Boot EeePC with WiFi off
2. Press Fn+F2: the blue WiFi feedback LED turns on and
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://
-------
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>
-------
--- ./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 @@
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_
+
/* The backlight device /sys/class/
static struct backlight_device *eeepc_
@@ -335,7 +339,16 @@
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
+
if (!bus) {
pr_warning(
- return;
+ goto done;
}
- blocked = eeepc_wlan_
+ 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_
+done:
+ up(&ehotk-
}
static void eeepc_rfkill_
@@ -849,6 +866,7 @@
ehotk = kzalloc(
if (!ehotk)
return -ENOMEM;
+ sema_init(
ehotk->init_flag = DISABLE_ASL_WLAN | DISABLE_
ehotk->handle = device->handle;
strcpy(
description: | updated |
description: | updated |
Changed in linux: | |
status: | Unknown → Confirmed |
Hi meijer.o,
It's preferable for patches to be merged upstream first and then pulled into the Ubuntu kernel. Do you know if the author has submitted for inclusion upstream? As we're now approaching the kernel freeze for Karmic it's likely this may have to wait for Karmic+1 for either rt2800pci or this patch to be merged.
Just for some additional info, the following is a discussion that took place earlier regarding the rt2800pci driver being merged - http:// www.linux- archive. org/ubuntu- kernel- team/336204- review- these-rt2x00- adds-rt2800pci. html