acer-wmi: don't bother loading on unsupported systems
Subsystems (2)
PATCH 1/1 acer-wmi: don't bother loading on unsupported systems
Its both a waste of system resources to load this driver on unsupported systems (which happens often, due to the *Acer* dmi modalias wildcard), and actually causes problems -- we wind up with a sysfs rfkill entry that is always disabled, which throws things like NetworkManager for a loop, causing it to think your wireless card isn't available, even though the *real* rfkill entry for the card says it is. This is triggering on multiple Acer Aspire One's here in the office, like so:
NetworkManager: <info> starting...
NetworkManager: <WARN> nm_generic_enable_loopback(): error -17 returned from rtnl_addr_add():#012Sucess#012
NetworkManager: <info> Found radio killswitch /org/freedesktop/Hal/devices/platform_acer_wmi_rfkill_acer_wireless_wlan
NetworkManager: <info> Found radio killswitch /org/freedesktop/Hal/devices/pci_8086_423a_rfkill_5350AGN_wlan
NetworkManager: <info> (eth0): new Ethernet device (driver: 'r8169')
NetworkManager: <info> (eth0): exported as /org/freedesktop/Hal/devices/net_00_1e_68_8a_a1_f8
NetworkManager: <info> (wlan0): driver supports SSID scans (scan_capa 0x01).
NetworkManager: <info> (wlan0): new 802.11 WiFi device (driver: 'iwlagn')
NetworkManager: <info> (wlan0): exported as /org/freedesktop/Hal/devices/net_00_16_eb_04_31_ea
NetworkManager: <info> Trying to start the supplicant...
NetworkManager: <info> Trying to start the system settings daemon...
NetworkManager: <info> Wireless now disabled by radio killswitch
NetworkManager: <info> (wlan0): supplicant manager state: down -> idle
So have acer-wmi just bail on unsupported systems -- includes only my particular model of the Aspire One atm, but a larger list of unsupported systems can be found here:
http://code.google.com/p/aceracpi/wiki/SupportedHardware
This might well become unnecessary once the WMI sysfs interface mentioned in acer-wmi.c exists and the wild-card dmi modalias is gone, but for now... I prefer to have working wireless, and this isn't exactly an obvious root cause. I lack the hardware to further extend the blacklist, but doing so is trivial. Whether or not loading acer-wmi actually negatively impacts machines other than the AAO is unknown at this time.
--- drivers/platform/x86/acer-wmi.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-)
drivers/platform/x86/acer-wmi.c +23 -0
@@ -355,6 +355,25 @@ static struct dmi_system_id acer_quirks[] = { {} }; +static int __init acer_wmi_unsupported_callback (const struct dmi_system_id *id) +{ +printk (ACER_INFO "%s not supported by Acer Laptop ACPI-WMI Extras\n" , + id->ident); +return 1 ; +} + +static const struct dmi_system_id __initdata acer_wmi_unsupported[] = { + { + .callback = acer_wmi_unsupported_callback, + .ident ="Acer Aspire One" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"AOA110" ), + }, + }, + {} +}; +/* Find which quirks are needed for a particular vendor/ model pair */ static void find_quirks (void ) {
@@ -1252,6 +1271,10 @@ static int __init acer_wmi_init(void) {int err; +/* Check for unsupported systems and bail */ +if (dmi_check_system (acer_wmi_unsupported)) +return -ENODEV ; +printk (ACER_INFO "Acer Laptop ACPI-WMI Extras\n" );find_quirks ();
Signature · 2 lines
Jarod Wilson [email protected]
Quoted 14 lines · On Monday 06 April 2009 15:53:11 Carlos Corbacho wrote:
Quoted 4 lines · On Monday 06 April 2009 14:40:16 Jarod Wilson wrote:
So have acer-wmi just bail on unsupported systems -- includes only my particular model of the Aspire One atm, but a larger list of unsupported systems can be found here:
Quoted 8 lines
http://code.google.com/p/aceracpi/wiki/SupportedHardware
This might well become unnecessary once the WMI sysfs interface mentioned in
acer-wmi.cexists and the wild-card dmi modalias is gone, but for now... I prefer to have working wireless, and this isn't exactly an obvious root cause. I lack the hardware to further extend the blacklist, but doing so is trivial. Whether or not loading acer-wmi actually negatively impacts machines other than the AAO is unknown at this time.
Quoted 7 lines
NAK.
An equivalent patch to this was submitted to the ACPI tree two days ago (which blacklists both the known Aspire One DMI entries) and is now upstream (and will also be backported to the next stable release).
Heh, that's what I get for waiting two days before actually submitting... ;)
Works for me.
Signature · 2 lines
Jarod Wilson [email protected]
Carlos Corbacho
NAKQuoted 4 lines · On Monday 06 April 2009 14:40:16 Jarod Wilson wrote:
So have acer-wmi just bail on unsupported systems -- includes only my particular model of the Aspire One atm, but a larger list of unsupported systems can be found here:
Quoted 8 lines
http://code.google.com/p/aceracpi/wiki/SupportedHardware
This might well become unnecessary once the WMI sysfs interface mentioned in
acer-wmi.cexists and the wild-card dmi modalias is gone, but for now... I prefer to have working wireless, and this isn't exactly an obvious root cause. I lack the hardware to further extend the blacklist, but doing so is trivial. Whether or not loading acer-wmi actually negatively impacts machines other than the AAO is unknown at this time.
NAK.
An equivalent patch to this was submitted to the ACPI tree two days ago (which blacklists both the known Aspire One DMI entries) and is now upstream (and will also be backported to the next stable release).
(The Aspire One is special as, unlike other Acer laptops which are unsupported, it provides the ACPI-WMI inteface we're trying to match on, so it really does have to be blacklisted - so WMI matching won't help in this particular case).
-Carlos
Signature · 3 lines
E-Mail: [email protected] Web: strangeworlds.co.uk GPG Key ID: 0x23EE722D