From patchwork Thu Aug 20 13:38:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Jenkins X-Patchwork-Id: 42916 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7KDdsG2007399 for ; Thu, 20 Aug 2009 13:39:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754206AbZHTNi7 (ORCPT ); Thu, 20 Aug 2009 09:38:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754497AbZHTNi7 (ORCPT ); Thu, 20 Aug 2009 09:38:59 -0400 Received: from mail-fx0-f217.google.com ([209.85.220.217]:35002 "EHLO mail-fx0-f217.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754365AbZHTNi5 (ORCPT ); Thu, 20 Aug 2009 09:38:57 -0400 Received: by fxm17 with SMTP id 17so448228fxm.37 for ; Thu, 20 Aug 2009 06:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=PTHRRxcMJ21Vk0UKXAJVmMrYYOaol060PIPD5fPESTQ=; b=UKw8EKcywjvnQQ4pYrwH1iAXmwbbQ25PJVhL3Ll3WHVc6YS7JqZ96UVEIS48NMDUBv 4dsNmrwZCrYp1jiuywOO7nDPJ/gZ4XcNslFjuhzBF1amF1sC/IXvTY4FF0YCEXFExRmh IewEls1vZ6Vk3bSx8s+DrvL561ppKZBf1NU+8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=k1yxgIzNfLiShcP+31pf23ejlaSnVb09+JN3huSsiXK8lwh+OkMefyY10Cc20B8zBl 21UPw3LT+TqDFiKSVWOpD5YCjIJbDILqF7rHsLFFQ8C7z7xxxVXLaxEEdWDAZc/69z3B 9cOSTmMU9WA84bHiQ+4AT6xric9nVeG0NO/h0= MIME-Version: 1.0 Received: by 10.204.34.14 with SMTP id j14mr6127993bkd.55.1250775538070; Thu, 20 Aug 2009 06:38:58 -0700 (PDT) In-Reply-To: <4A8D32A8.8000702@oss42.com> References: <4A8D32A8.8000702@oss42.com> Date: Thu, 20 Aug 2009 14:38:58 +0100 Message-ID: <9b2b86520908200638y75c0c80cm4faf9a5c67b61397@mail.gmail.com> Subject: Re: [Debian-eeepc-devel] Problems with wlan on a 1005HA-M From: Alan Jenkins To: Karsten Jaeger Cc: debian-eeepc-devel@lists.alioth.debian.org, Kernel Testers List , acpi4asus-user , ACPI Devel Maling List Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On 8/20/09, Karsten Jaeger wrote: > Hi there, > > I've just ask in IRC for help and was ask to write it to the list. > > Last week I bought my EeePC 1005HA-M. It comes with Windows and Ubuntu > Installation, everything works fine. > Because my favorite OS is Debian I install it on the EeePC with > Standard-Lenny and kernel linux-image-2.6.31-rc5, updating it to sid and > everything worked fine. I updated it last sunday with latest sid and > kernel linux-image-2.6.31-rc6, put in in sleep mode (which worked fine > before) and want to restart it again on monday but nothing worked, I > have a black screen and it do not return from sleep. So I do an cold reboot. > After that, my wlan said, it have an segmentation fault and also gives > the line back: > > SIOCSIFFLAGS: Unknown error 132 > Because I want to change some more, I do reinstalling it all, but since > than, I can't get wlan to work again. > > As attachment I give you some files, that I do think are nessesary. If > you need more, just give a hint. That looks like the new rfkill error code. Basically it means the wireless has been disabled. I guess the segmentation fault is a userspace bug, unless you also see a BUG message in dmesg. You should definitely be able to re-enable the wireless using the BIOS setup screen... try these instructions: Are you able to confirm that this happens just by upgrading the kernel? If so, there's only one eeepc-laptop commit between -rc5 and -rc6, and I'm afraid it's mine. I re-wrote it again for 2.6.32 in a slightly more sensible way. If we're lucky, your problem is fixed by the re-write and it can be expedited for 2.6.31. I've attached the relevant changes as a test patch; it should apply cleanly to 2.6.31-rc6. Regards Alan diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 222ffb8..1790103 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -143,7 +143,7 @@ struct eeepc_hotk { struct rfkill *bluetooth_rfkill; struct rfkill *wwan3g_rfkill; struct hotplug_slot *hotplug_slot; - struct work_struct hotplug_work; + struct mutex hotplug_lock; }; /* The actual device the driver binds to */ @@ -661,24 +661,31 @@ static int eeepc_get_adapter_status(struct hotplug_slot *hotplug_slot, return 0; } -static void eeepc_hotplug_work(struct work_struct *work) +static void eeepc_rfkill_hotplug(void) { struct pci_dev *dev; - struct pci_bus *bus = pci_find_bus(0, 1); - bool blocked; + struct pci_bus *bus; + bool blocked = eeepc_wlan_rfkill_blocked(); + + rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); + + mutex_lock(&ehotk->hotplug_lock); + if (ehotk->hotplug_slot == NULL) + goto out_unlock; + + bus = pci_find_bus(0, 1); if (!bus) { pr_warning("Unable to find PCI bus 1?\n"); - return; + goto out_unlock; } - blocked = eeepc_wlan_rfkill_blocked(); if (!blocked) { dev = pci_get_slot(bus, 0); if (dev) { /* Device already present */ pci_dev_put(dev); - return; + goto out_unlock; } dev = pci_scan_single_device(bus, 0); if (dev) { @@ -694,7 +701,8 @@ static void eeepc_hotplug_work(struct work_struct *work) } } - rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); +out_unlock: + mutex_unlock(&ehotk->hotplug_lock); } static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) @@ -702,7 +710,7 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) if (event != ACPI_NOTIFY_BUS_CHECK) return; - schedule_work(&ehotk->hotplug_work); + eeepc_rfkill_hotplug(); } static void eeepc_hotk_notify(struct acpi_device *device, u32 event) @@ -893,7 +901,7 @@ static int eeepc_hotk_resume(struct acpi_device *device) rfkill_set_sw_state(ehotk->wlan_rfkill, wlan != 1); - schedule_work(&ehotk->hotplug_work); + eeepc_rfkill_hotplug(); } if (ehotk->bluetooth_rfkill) @@ -1094,7 +1102,7 @@ static int eeepc_rfkill_init(struct device *dev) { int result = 0; - INIT_WORK(&ehotk->hotplug_work, eeepc_hotplug_work); + mutex_init(&ehotk->hotplug_lock); eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6"); eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7");