lkml.org 
[lkml]   [2010]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjecteeepc: rfkill on 900A defunct
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


\
 
 \ /
  Last update: 2010-11-24 15:55    [W:0.129 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site