public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: mjg@redhat.com
Cc: corentincj@iksaif.net, acpi4asus-user@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: eeepc: rfkill on 900A defunct
Date: Wed, 24 Nov 2010 15:53:35 +0100	[thread overview]
Message-ID: <4CED26EF.5000109@suse.cz> (raw)

Hi,

there is a 900A model out there with wifi at the 2nd bus:
02:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR5001
Wireless Network Adapter [168c:001c] (rev 01)

but without hotplug support (pciehp cannot be bound to it). However the
eeepc-laptop driver expects the wifi on the 1st bus (pci_find_bus(0,
1)), so it operates on a NIC on this machine instead of wifi.

Changing the code to pci_find_bus(0, 2) indeed fixes the problem, but I
see no way how to determine when to do this. model == "900A" seems to be
wrong, because there are other 900A devices which work OK with bus == 1.

Any ideas?

lspci -vvnnxxx:
https://bugzillafiles.novell.org/attachment.cgi?id=370529
dmidecode:
https://bugzillafiles.novell.org/attachment.cgi?id=401633
dmesg:
https://bugzillafiles.novell.org/attachment.cgi?id=370538

The workaround for such machines:
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -588,7 +588,7 @@ static void eeepc_rfkill_hotplug(struct eeepc_laptop
*eeepc)
        mutex_lock(&eeepc->hotplug_lock);

        if (eeepc->hotplug_slot) {
-               bus = pci_find_bus(0, 1);
+               bus = pci_find_bus(0, 2);
                if (!bus) {
                        pr_warning("Unable to find PCI bus 1?\n");
                        goto out_unlock;
@@ -714,7 +714,7 @@ static struct hotplug_slot_ops
eeepc_hotplug_slot_ops = {
 static int eeepc_setup_pci_hotplug(struct eeepc_laptop *eeepc)
 {
        int ret = -ENOMEM;
-       struct pci_bus *bus = pci_find_bus(0, 1);
+       struct pci_bus *bus = pci_find_bus(0, 2);

        if (!bus) {
                pr_err("Unable to find wifi PCI bus\n");

thanks,
-- 
js
suse labs

             reply	other threads:[~2010-11-24 14:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 14:53 Jiri Slaby [this message]
2010-11-24 14:57 ` eeepc: rfkill on 900A defunct Matthew Garrett
2010-11-24 20:18 ` Matthew Garrett
2010-11-26 13:01   ` Woody Suwalski
2010-12-13 10:19   ` Jiri Slaby
2011-02-28  9:49   ` Jiri Slaby
2011-03-08 10:06     ` Jiri Slaby
2011-03-08 10:22       ` Corentin Chary
2011-03-08 10:51         ` Jiri Slaby
2011-03-09 12:50           ` Woody Suwalski
2011-04-19 13:53             ` [ping] " Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CED26EF.5000109@suse.cz \
    --to=jslaby@suse.cz \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=corentincj@iksaif.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox