[Debian-eeepc-devel] WLAN toggle on 900A - here comes the patch
Andreas Schreiner
andreas.schreiner at sonnenmulde.at
Wed Sep 23 21:54:59 UTC 2009
Hello!
I have now changed /etc/init.d/eeepc-acpi-scripts to fix the issues
with WLAN toggle on the EeePC 900A. The fix is quite trivial, the
script now checks if it's running on a 900A and enables pciehp until
kernel verision 2.6.32. It has been tested on a 900A and does work as
expected.
A patch against the git-HEAD is included as provided by "git
format-patch". It inlcudes the changes in
/etc/init.d/eeepc-acpi-scripts and a description in the changelog file.
Please let me know if there is anything more I should provide or what
is still missing for patch inclusion. Since this is the first patch I
send in I more or less expect some "room for improvement"
So here is the patch-
regards,
Andreas
From 2845196e9b4e3814ecce970bb5017ce97649e647 Mon Sep 17 00:00:00 2001
From: Andreas Schreiner <andreas.schreiner at sonnenmulde.at>
Date: Wed, 23 Sep 2009 23:12:35 +0200
Subject: [PATCH 1/1] Fix WLAN toggle using fn-F2 on EeePC 900A. This
EeePC model needs to
load the pciehp kernel module with the pciehp_force=1 option up to kernel
version 2.6.32. /etc/init.d/eeepc-acpi-script now checks if it is running
on a 900A and loads the module accordingly.
---
debian/changelog | 6 ++++++
debian/eeepc-acpi-scripts.init | 15 ++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index faa0fcf..79eff75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,12 @@ eeepc-acpi-scripts (1.1.3) UNRELEASED; urgency=low
the real situation. Thanks to Paul Menzel for reporting and Raphael
Geissert for the fix.
+ [ Andreas Schreiner ]
+ * Fix WLAN toggle using fn-F2 on EeePC 900A. This EeePC model needs to
+ load the pciehp kernel module with the pciehp_force=1 option up to kernel
+ version 2.6.32. /etc/init.d/eeepc-acpi-script now checks if it is running
+ on a 900A and loads the module accordingly.
+
-- Darren Salt <linux at youmustbejoking.demon.co.uk> Fri, 14 Aug
2009 13:10:21 +0100
eeepc-acpi-scripts (1.1.2) unstable; urgency=low
diff --git a/debian/eeepc-acpi-scripts.init b/debian/eeepc-acpi-scripts.init
index 48290da..c62af37 100644
--- a/debian/eeepc-acpi-scripts.init
+++ b/debian/eeepc-acpi-scripts.init
@@ -57,11 +57,17 @@ case "$1" in
# There are three recognised cases:
# - kernel 2.6.26 & older: two parameters required
# - kernel 2.6.27 & .28 : one of those parameters has been removed
- # - kernel 2.6.29 & newer: hotplugging is handled in eeepc-laptop
+ # - kernel 2.6.29 & newer: hotplugging is handled in eeepc-laptop
except on the
+ # EeePC 900A model
+ # - kernel 2.6.32 & newer: eeepc-laptop also works on the EeePC 900A
if [ -d /sys/module/pciehp ]; then
# Hmm, already present
- if [ "$KERNEL" -ge 29 ]; then
- # 2.6.29 and newer (problem)
+ if [ "$KERNEL" -ge 29 -a "`cat /sys/class/dmi/id/product_name`"
!= "900A" ]; then
+ # 2.6.29 and newer on all but the EeePC 900A - unload pciehp
if loaded
+ log_warning_msg 'Module "pciehp" is loaded; trying to unload'
+ maybe_warn modprobe -r pciehp
+ elif [ "$KERNEL" -ge 32 ]; then
+ # 2.6.32 and newer on all EeePC models - unload pciehp if loaded
log_warning_msg 'Module "pciehp" is loaded; trying to unload'
maybe_warn modprobe -r pciehp
fi
@@ -73,6 +79,9 @@ case "$1" in
elif [ "$KERNEL" -lt 29 ]; then
# 2.6.27 and 2.6.28
load_module pciehp pciehp_force=1
+ elif [ "$KERNEL" -lt 32 -a "`cat
/sys/class/dmi/id/product_name`" = "900A" ]; then
+ # 2.6.29 to 2.6.31 on the EeePC 900A
+ load_module pciehp pciehp_force=1
fi
fi
--
1.6.4.3
--
.
..:
More information about the Debian-eeepc-devel
mailing list