From patchwork Tue Jun 29 13:49:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 57269 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id BC175B6EE8 for ; Tue, 29 Jun 2010 23:50:06 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OTbCF-0004cq-Gc; Tue, 29 Jun 2010 14:49:55 +0100 Received: from mail.tpi.com ([70.99.223.143]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OTbCC-0004ce-FJ for kernel-team@lists.ubuntu.com; Tue, 29 Jun 2010 14:49:53 +0100 Received: from [10.0.2.5] (unknown [10.0.2.5]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.tpi.com (Postfix) with ESMTP id DED95251ED7; Tue, 29 Jun 2010 06:48:38 -0700 (PDT) Message-ID: <4C29F9F5.50104@canonical.com> Date: Tue, 29 Jun 2010 07:49:41 -0600 From: Tim Gardner User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: Greg KH Subject: Re: [stable] Request to include SHAID: bc9d24a3aeb1532fc3e234907a8b6d671f7ed68f in 2.6.32 stable. References: <20100625224941.GG10683@kroah.com> In-Reply-To: <20100625224941.GG10683@kroah.com> Cc: corentincj@iksaif.net, acpi4asus-user@lists.sourceforge.net, Ubuntu Kernel Team , alan-jenkins@tuffmail.co.uk, stable@kernel.org X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list Reply-To: tim.gardner@canonical.com List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com On 06/25/2010 04:49 PM, Greg KH wrote: > On Thu, Jun 10, 2010 at 03:29:26PM -0500, Manoj Iyer wrote: >> >> Please include the following patch in 2.6.32 stable. >> >> SHAID: bc9d24a3aeb1532fc3e234907a8b6d671f7ed68f >> Subject: eeepc-laptop: check wireless hotplug events > > It does not apply to the 2.6.32-stable kernel, care to provide a > backported version of this patch? > > thanks, > > greg k-h > Please find attached a backport of commit bc9d24a3aeb1532fc3e234907a8b6d671f7ed68f. The only minor difference is that the 2.6.32 version of eeepc_wlan_rfkill_blocked() does not require a context whereas 2.6.35 does. rtg From cb29b9140007b64fa158b3474c58e595dab4a22e Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Mon, 22 Feb 2010 16:03:58 +0000 Subject: [PATCH] eeepc-laptop: check wireless hotplug events Backported from bc9d24a3aeb1532fc3e234907a8b6d671f7ed68f. Before we mark the wireless device as unplugged, check PCI config space to see whether the wireless device is really disabled (and vice versa). This works around newer models which don't want the hotplug code, where we end up disabling the wired network device. My old 701 still works correctly with this. I can also simulate an afflicted model by changing the hardcoded PCI bus/slot number in the driver, and it seems to work nicely (although it is a bit noisy). In future this type of hotplug support will be implemented by the PCI core. The existing blacklist and the new warning message will be removed at that point. Signed-off-by: Alan Jenkins Signed-off-by: Corentin Chary Signed-off-by: Tim Gardner --- drivers/platform/x86/eeepc-laptop.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 329093e..c533b1c 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -752,6 +752,8 @@ static void eeepc_rfkill_hotplug(void) struct pci_dev *dev; struct pci_bus *bus; bool blocked = eeepc_wlan_rfkill_blocked(); + bool absent; + u32 l; if (ehotk->wlan_rfkill) rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); @@ -765,6 +767,22 @@ static void eeepc_rfkill_hotplug(void) goto out_unlock; } + if (pci_bus_read_config_dword(bus, 0, PCI_VENDOR_ID, &l)) { + pr_err("Unable to read PCI config space?\n"); + goto out_unlock; + } + absent = (l == 0xffffffff); + + if (blocked != absent) { + pr_warning("BIOS says wireless lan is %s, " + "but the pci device is %s\n", + blocked ? "blocked" : "unblocked", + absent ? "absent" : "present"); + pr_warning("skipped wireless hotplug as probably " + "inappropriate for this model\n"); + goto out_unlock; + } + if (!blocked) { dev = pci_get_slot(bus, 0); if (dev) { -- 1.7.0.4