[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.

Andreas Schreiner andreas.schreiner at sonnenmulde.at
Wed Sep 23 21:12:35 UTC 2009


---
 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


--=_15cnbhjpsx40--




More information about the Debian-eeepc-devel mailing list