Bug 595586 - rfkill fails to reenable WLAN on eeepc900A
Summary: rfkill fails to reenable WLAN on eeepc900A
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.3
Classification: openSUSE
Component: Mobile Devices (show other bugs)
Version: Final
Hardware: i686 All
: P3 - Medium : Normal with 2 votes (vote)
Target Milestone: Final
Assignee: Jiri Slaby
QA Contact: E-mail List
URL:
Whiteboard: maint:released:11.3:42359 maint:relea...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-11 13:36 UTC by Bernhard Wiedemann
Modified: 2011-08-02 08:01 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
/var/log/messages of first crash (18.43 KB, text/plain)
2010-06-19 04:25 UTC, Bernhard Wiedemann
Details
/var/log/messages of second crash (18.92 KB, text/plain)
2010-06-19 04:26 UTC, Bernhard Wiedemann
Details
lspci -nnvvxxx of eeepc 900A (36.98 KB, text/plain)
2010-06-21 14:25 UTC, Bernhard Wiedemann
Details
complete dmesg since boot (88.56 KB, text/plain)
2010-06-21 14:43 UTC, Bernhard Wiedemann
Details
dmesg with pciehp loaded (58.52 KB, text/plain)
2010-06-22 03:12 UTC, Bernhard Wiedemann
Details
dmidecode on eeepc 900A (9.31 KB, text/plain)
2010-11-22 19:10 UTC, Bernhard Wiedemann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Wiedemann 2010-04-11 13:36:10 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.0) Gecko/20100115 SUSE/3.6.0-2.1 Firefox/3.6

After disabling WLAN on Asus eeepc 900A using rfkill button (Fn+F2) it does not get back into a working state without a reboot.

Reproducible: Always

Steps to Reproduce:
1. boot up eeepc900A with WLAN enabled
2. press Fn+F2 (rfkill button) to disable WLAN
3. press Fn+F2 again to enable WLAN
Actual Results:  

-----
1. lspci before rfkill
01:00.0 Ethernet controller: Atheros Communications AR8121/AR8113/AR8114 Gigabit or Fast Ethernet (rev b0)
02:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)
-----
2. lspci after rfkill
01:00.0 Ethernet controller: Attansic Technology Corp. Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller (rev b0)
02:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev ff)

3. lspci is the same as with 1.

happens even when doing ifdown wlan0, rmmod ath5k ath mac80211 cfg80211 and modprobe ath5k afterwards.

dmesg:
[  194.874849] ath5k phy0: unsupported jumbo
[  248.253217] wlan0: deauthenticating by local choice (reason=3)
[  306.919033] ath5k phy0: failed to wakeup the MAC Chip
[  306.919060] ath5k phy0: can't reset hardware (-5)
[  307.135998] ath5k phy0: failed to wakeup the MAC Chip
[  307.136073] ath5k phy0: can't reset hardware (-5)
[  338.296975] ath5k 0000:02:00.0: PCI INT A disabled

[  427.297426] cfg80211: Calling CRDA to update world regulatory domain
[  427.412907] ath5k 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[  427.412964] ath5k 0000:02:00.0: setting latency timer to 64
[  427.413078] ath5k 0000:02:00.0: registered as 'phy0'
[  427.423569] ath5k phy0: failed to wakeup the MAC Chip
[  427.423672] ath5k 0000:02:00.0: PCI INT A disabled
[  427.423724] ath5k: probe of 0000:02:00.0 failed with error -5


Expected Results:  
during rfkill, the AR5001 should possibly disappear, not the revision be "ff"
after re-enabling WLAN, it should be back working (as was the case with preinstalled Xandros)

Bug also occurs on 11.3-MS4, only that there Ethernet also disappears and reappears when using Fn+F2 key.
Comment 1 Bernhard Wiedemann 2010-04-11 13:46:07 UTC
bug can also be triggered with

echo 0 > /sys/devices/platform/eeepc/rfkill/rfkill0/state
sleep 2
echo 1 > /sys/devices/platform/eeepc/rfkill/rfkill0/state
Comment 2 Vladimir Botka 2010-04-12 09:23:35 UTC
Would it be possible to install the rfkill package and post the output of the command "rfkill list all" when the problem happens. rfkill can also manipulate the state of the switch. Can you bring the adapter up with the command "rfkill unblock ..." ?
Comment 3 Bernhard Wiedemann 2010-04-12 09:55:30 UTC
This is from 11.3-MS4:
# rfkill list all #after disabling 
0: eeepc-wlan: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: no

# rfkill list all #after reenabling
0: eeepc-wlan: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
(just the same as before disabling WLAN)

# rfkill unblock 0
# rfkill unblock 1
executed without error - but
# ifconfig wlan0 up
SIOCSIFFLAGS: Input/output error


just noticed that while WLAN is disabled, there is another strange error
# ifconfig wlan0 up
SIOCSIFFLAGS: Unknown error 132


dmesg has
[30899.160245] ATL1E 0000:01:00.0: PCI INT A disabled
[30917.801242] pci 0000:01:00.0: reg 10: [mem 0xf3f00000-0xf3f3ffff 64bit]
[30917.801271] pci 0000:01:00.0: reg 18: [io  0xd000-0xd07f]
[30917.801391] pci 0000:01:00.0: PME# supported from D3hot D3cold
[30917.801407] pci 0000:01:00.0: PME# disabled
[30917.801461] pci 0000:01:00.0: BAR 0: assigned [mem 0xf3f00000-0xf3f3ffff 64bit]
[30917.801488] pci 0000:01:00.0: BAR 0: set to [mem 0xf3f00000-0xf3f3ffff 64bit] (PCI address [0xf3f00000-0xf3f3ffff]
[30917.801504] pci 0000:01:00.0: BAR 2: assigned [io  0xd000-0xd07f]
[30917.801523] pci 0000:01:00.0: BAR 2: set to [io  0xd000-0xd07f] (PCI address [0xd000-0xd07f]
[30917.801813] ATL1E 0000:01:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[30917.801856] ATL1E 0000:01:00.0: setting latency timer to 64
[30918.701809] ATL1E 0000:01:00.0: irq 28 for MSI/MSI-X
[30918.702446] ADDRCONF(NETDEV_UP): eth0: link is not ready
[30919.420530] ATL1E 0000:01:00.0: ATL1E: eth0 NIC Link is Up<100 Mbps Full Duplex>
[30919.421109] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[30933.932597] ath5k phy0: failed to wakeup the MAC Chip
[30933.932616] ath5k phy0: can't reset hardware (-5)
Comment 4 Vladimir Botka 2010-04-12 10:43:36 UTC
(In reply to comment #3)
> just noticed that while WLAN is disabled, there is another strange error
> # ifconfig wlan0 up
> SIOCSIFFLAGS: Unknown error 132
> 
> dmesg has
<snip>
> [30933.932597] ath5k phy0: failed to wakeup the MAC Chip
> [30933.932616] ath5k phy0: can't reset hardware (-5)

Moreover there is "can't reset hardware" message. It would be good to know if this problem is still present in 11.3.
Comment 5 Bernhard Wiedemann 2010-04-12 10:52:11 UTC
The above output is from 11.3-MS4, as stated in the first line. Actually, the vanishing of eth0 (AR8121/AR8113/AR8114) only happens on 11.3-MS4 and not 11.2, so there is also some regression.
Comment 6 Vladimir Botka 2010-04-14 22:02:12 UTC
(In reply to comment #5)
> The above output is from 11.3-MS4, as stated in the first line.

Would it be possible to try new nl80211 wpa driver ? As stated in [1] you can set WIRELESS_WPA_DRIVER='nl80211' in interface ifcfg config file [3]. You shall see then wpa_supplicant running with -Dnl80211 [4].

[1] /etc/sysconfig/network/config

[2]
# Note: in wpa_supplicant mode, it is currently (openSUSE 11.2)
# not supported by our default 'wext', but by the new 'nl80211'
# wpa driver. You can set WIRELESS_WPA_DRIVER='nl80211' in the
# per interface ifcfg config file. We will switch to use the
# new driver as soon as we've tested it with more chipsets.

[3] /etc/sysconfig/network/ifcfg-wlan0

[4] # ps ax | grep wpa_supplicant
23935 ?        Ss     0:00 wpa_supplicant -iwlan0 -c/var/run/wpa_supplicant-wlan0.conf -Dnl80211 -P/var/run/wpa_supplicant/wlan0.pid -B
Comment 7 Bernhard Wiedemann 2010-04-15 07:34:56 UTC
All below done on 11.3-MS4.
I added WIRELESS_WPA_DRIVER='nl80211' to ifcfg-wlan0 and after a reboot wpa_supplicant had those parameters you gave, but after disabling and re-enabling WLAN, it stopped working again. Possibly some problem at a lower level.

Here is something interesting I found:
When I disable WLAN before a reboot, the system comes up with neither eth0 nor wlan0 and when I press Fn+F2, it enables only eth0. Then lspci shows only AR8121/AR8113/AR8114 with no trace of WLAN.
but rfkill list all shows
0: eeepc-wlan: Wireless LAN
        Soft blocked: no
        Hard blocked: no

So maybe it kills/starts the wrong device(s)?

Also, when I rfkill block 1, wlan goes off and I can re-enable it with rfkill unblock 0 && ifup wlan0
Comment 8 Vladimir Botka 2010-04-20 11:45:27 UTC
(In reply to comment #7)
> Here is something interesting I found:
> When I disable WLAN before a reboot, the system comes up with neither eth0 nor
> wlan0 and when I press Fn+F2, it enables only eth0. Then lspci shows only
> AR8121/AR8113/AR8114 with no trace of WLAN.
> but rfkill list all shows
> 0: eeepc-wlan: Wireless LAN
>         Soft blocked: no
>         Hard blocked: no
>
> Also, when I rfkill block 1, wlan goes off and I can re-enable it with rfkill
> unblock 0 && ifup wlan0

The eeepc-wlan rfkill interface must be created by the ACPI modul. Let us gather the info and report it to upstream.

I have AR5211 [1] in IBM TP40 with 2.6.34-rc3-3-default installed. These modules are loaded [2] and rfkill interfaces [3] created. The killswitch states [4] [5] shows the the Fn-F5 toggle. This is complete mess. 

[1]
  Model: "Atheros AR5211 802.11ab NIC"
  Vendor: pci 0x168c "Atheros Communications Inc."
  Device: pci 0x0012 "AR5211 802.11ab NIC"

[2]
# lsmod | grep ath
ath5k                 135683  0 
mac80211              242949  1 ath5k
ath                     8739  1 ath5k
cfg80211              155985  3 ath5k,mac80211,ath
led_class               2841  2 ath5k,thinkpad_acpi

[3]
# ls -la /sys/class/rfkill/
rfkill0 -> ../../devices/platform/thinkpad_acpi/rfkill/rfkill0
rfkill2 -> ../../devices/pci0000:00/0000:00:1e.0/0000:02:02.0/ieee80211/phy1/rfkill2
rfkill3 -> ../../devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0/bluetooth/hci0/rfkill3

[4]
# rfkill list all
0: tpacpi_bluetooth_sw: Bluetooth
        Soft blocked: yes
        Hard blocked: no
2: phy1: Wireless LAN
        Soft blocked: no
        Hard blocked: no

[5]
 # rfkill list all
0: tpacpi_bluetooth_sw: Bluetooth
        Soft blocked: no
        Hard blocked: no
2: phy1: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
4: hci0: Bluetooth
        Soft blocked: yes
        Hard blocked: no

--------------------------

Would it be possible to produce report similar to this one ? We can cut&paste it to [99]. If there are any BIOS options it would be good to know them either.

[99] http://linuxwireless.org/en/developers/MailingLists
Comment 9 Bernhard Wiedemann 2010-05-14 14:14:11 UTC
[1]
Vendor: pci 0x168c "Atheros Communications Inc."
Device: pci 0x001c "AR5001 Wireless Network Adapter"

[2]
# lsmod | grep ath
ath5k                 135687  0 
mac80211              243305  1 ath5k
ath                     8743  1 ath5k
cfg80211              155985  3 ath5k,mac80211,ath

[3]
# ls -l /sys/class/rfkill/
lrwxrwxrwx 1 root root 0 May  8 05:18 rfkill0 -> ../../devices/platform/eeepc/rfkill/rfkill0
lrwxrwxrwx 1 root root 0 May  8 05:18 rfkill1 -> ../../devices/pci0000:00/0000:00:1c.1/0000:02:00.0/ieee80211/phy0/rfkill1

[4]
# rfkill list all 
0: eeepc-wlan: Wireless LAN
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no

[5]
# rfkill list all 
0: eeepc-wlan: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
Comment 10 Vladimir Botka 2010-05-14 21:10:35 UTC
Is this known atheros wlan driver issue in 2.6.34 ? Are you still involved with atheros wlan driver ?
Comment 11 Bernhard Wiedemann 2010-06-19 04:23:39 UTC
I am still using ath5k on openSUSE-11.3-RC1 on 2.6.34-9-default i686 kernel. At least now the Ethernet part of the problem is no more there.

However, the WLAN part is still broken.
I also tried to unload the driver (ifdown wlan0 ; rmmod ath5k ; rmmod ath) before rfkill causing different kernel BUG messages after rfkill unblock ... ; modprobe ath5k
Comment 12 Bernhard Wiedemann 2010-06-19 04:25:27 UTC
Created attachment 370255 [details]
/var/log/messages of first crash
Comment 13 Bernhard Wiedemann 2010-06-19 04:26:43 UTC
Created attachment 370257 [details]
/var/log/messages of second crash
Comment 14 Vladimir Botka 2010-06-21 12:33:06 UTC
Jiri, are you still involved with atheros wlan driver ?

Jun 19 05:19:58 eeepc kernel: [  397.105863] ath5k: probe of 0000:02:00.0 failed with error -5
Jun 19 05:20:01 eeepc kernel: [  400.546292] ------------[ cut here ]------------
Jun 19 05:20:01 eeepc kernel: [  400.546311] kernel BUG at /usr/src/packages/BUILD/kernel-default-2.6.34/linux-2.6.34/mm/slab.c:3086!
Jun 19 05:20:01 eeepc kernel: [  400.546326] invalid opcode: 0000 [#1] SMP
Comment 15 Jiri Slaby 2010-06-21 12:46:45 UTC
(In reply to comment #14)
> Jiri, are you still involved with atheros wlan driver ?

I think, it's more or less in the maintenance mode, nobody actively develops ath5k anymore.

> Jun 19 05:20:01 eeepc kernel: [  400.546311] kernel BUG at

But hey, BUGs are tried to be fixed, will look into that.
Comment 16 Jiri Slaby 2010-06-21 13:23:07 UTC
Could you attach lspci -nnvvxxx (under root) of your system?
Comment 17 Jiri Slaby 2010-06-21 13:24:35 UTC
And also attach full dmesg since boot.
Comment 18 Bernhard Wiedemann 2010-06-21 14:25:30 UTC
Created attachment 370529 [details]
lspci -nnvvxxx of eeepc 900A
Comment 19 Bernhard Wiedemann 2010-06-21 14:43:26 UTC
Created attachment 370538 [details]
complete dmesg since boot 

this was saved after ifdown wlan0 ; rmmod ath5k ; rmmod ath ; rfkill block 0 ; rfkill unblock 0 ; modprobe ath5k
error msg is again a different one.
Comment 20 Jiri Slaby 2010-06-21 21:00:33 UTC
It looks like rfkill is done there by pci hotplug. Could you modprobe pciehp before trying to play with rfkill?

Likely it will scream about missing _OSC method in ACPI to dmesg, then you have to: modprobe pciehp pciehp_force=1
Comment 21 Bernhard Wiedemann 2010-06-22 03:12:35 UTC
Created attachment 370655 [details]
dmesg with pciehp loaded

reloading ath5k once did not BUG, but on second time crashed the machine, so I have no log from that.
Comment 22 Jiri Slaby 2010-11-08 13:51:03 UTC
I think I've found the problem. eeepc driver tries to bind to 01:00:00 PCI device, but wifi is at 02:00:00. Could you try the kernel at:
http://labs.suse.cz/jslaby/bug-595586/
?
Comment 23 Bernhard Wiedemann 2010-11-21 21:38:37 UTC
Your kernel version worked really nice on the eeepc 900A. Disabling and re-enabling WLAN worked great.
Comment 24 Jiri Slaby 2010-11-21 22:19:55 UTC
(In reply to comment #23)
> Your kernel version worked really nice on the eeepc 900A. Disabling and
> re-enabling WLAN worked great.

Great. I need a dmidecode output to push it upstream. Could you attach it?
Comment 25 Bernhard Wiedemann 2010-11-22 19:10:27 UTC
Created attachment 401633 [details]
dmidecode on eeepc 900A
Comment 26 Jiri Slaby 2010-11-25 19:05:44 UTC
(In reply to comment #23)
> Your kernel version worked really nice on the eeepc 900A.

Could you try the kernel one more time? It contains a fix proposed by upstream.
Comment 27 Bernhard Wiedemann 2010-12-11 12:39:12 UTC
I finally could test the new version on eeepc 900A and it also worked fine.
Comment 28 Vladimir Psenicka 2011-04-10 19:21:58 UTC
I have same problem on opensuse 11.4 and atheros wifi pci card:

lspci:
04:07.0 Ethernet controller: Atheros Communications Inc. AR5212 802.11abg NIC (rev 01)

dmesg:
[    5.639514] ath5k 0000:04:07.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[    5.639593] ath5k 0000:04:07.0: registered as 'phy0'
[    5.650036] ath5k phy0: failed to wakeup the MAC Chip
[    5.650056] ath5k 0000:04:07.0: PCI INT A disabled
[    5.650085] ath5k: probe of 0000:04:07.0 failed with error -5
Comment 29 Jiri Slaby 2011-05-15 13:10:55 UTC
The fix finally was merged upstream. So I pushed it:
   ed47fe3..985c52e  openSUSE-11.3 -> openSUSE-11.3
   8783dfd..1c6d6bd  openSUSE-11.4 -> openSUSE-11.4
   e9cc2c5..3c190ca  stable -> stable
Comment 30 Swamp Workflow Management 2011-08-02 07:59:28 UTC
Update released for: kernel-debug, kernel-debug-base, kernel-debug-base-debuginfo, kernel-debug-debuginfo, kernel-debug-debugsource, kernel-debug-devel, kernel-debug-devel-debuginfo, kernel-default, kernel-default-base, kernel-default-base-debuginfo, kernel-default-debuginfo, kernel-default-debugsource, kernel-default-devel, kernel-default-devel-debuginfo, kernel-desktop, kernel-desktop-base, kernel-desktop-base-debuginfo, kernel-desktop-debuginfo, kernel-desktop-debugsource, kernel-desktop-devel, kernel-desktop-devel-debuginfo, kernel-devel, kernel-ec2, kernel-ec2-base, kernel-ec2-base-debuginfo, kernel-ec2-debuginfo, kernel-ec2-debugsource, kernel-ec2-devel, kernel-ec2-devel-debuginfo, kernel-ec2-extra, kernel-ec2-extra-debuginfo, kernel-pae, kernel-pae-base, kernel-pae-base-debuginfo, kernel-pae-debuginfo, kernel-pae-debugsource, kernel-pae-devel, kernel-pae-devel-debuginfo, kernel-source, kernel-source-vanilla, kernel-syms, kernel-trace, kernel-trace-base, kernel-trace-base-debuginfo, kernel-trace-debuginfo, kernel-trace-debugsource, kernel-trace-devel, kernel-trace-devel-debuginfo, kernel-vanilla, kernel-vanilla-base, kernel-vanilla-base-debuginfo, kernel-vanilla-debuginfo, kernel-vanilla-debugsource, kernel-vanilla-devel, kernel-vanilla-devel-debuginfo, kernel-vmi, kernel-vmi-base, kernel-vmi-base-debuginfo, kernel-vmi-debuginfo, kernel-vmi-debugsource, kernel-vmi-devel, kernel-vmi-devel-debuginfo, kernel-xen, kernel-xen-base, kernel-xen-base-debuginfo, kernel-xen-debuginfo, kernel-xen-debugsource, kernel-xen-devel, kernel-xen-devel-debuginfo, preload-kmp-default, preload-kmp-desktop
Products:
openSUSE 11.3 (debug, i586, x86_64)
Comment 31 Swamp Workflow Management 2011-08-02 08:01:47 UTC
Update released for: kernel-debug, kernel-debug-base, kernel-debug-base-debuginfo, kernel-debug-debuginfo, kernel-debug-debugsource, kernel-debug-devel, kernel-debug-devel-debuginfo, kernel-default, kernel-default-base, kernel-default-base-debuginfo, kernel-default-debuginfo, kernel-default-debugsource, kernel-default-devel, kernel-default-devel-debuginfo, kernel-desktop, kernel-desktop-base, kernel-desktop-base-debuginfo, kernel-desktop-debuginfo, kernel-desktop-debugsource, kernel-desktop-devel, kernel-desktop-devel-debuginfo, kernel-devel, kernel-docs, kernel-ec2, kernel-ec2-base, kernel-ec2-base-debuginfo, kernel-ec2-debuginfo, kernel-ec2-debugsource, kernel-ec2-devel, kernel-ec2-devel-debuginfo, kernel-ec2-extra, kernel-ec2-extra-debuginfo, kernel-pae, kernel-pae-base, kernel-pae-base-debuginfo, kernel-pae-debuginfo, kernel-pae-debugsource, kernel-pae-devel, kernel-pae-devel-debuginfo, kernel-source, kernel-source-vanilla, kernel-syms, kernel-trace, kernel-trace-base, kernel-trace-base-debuginfo, kernel-trace-debuginfo, kernel-trace-debugsource, kernel-trace-devel, kernel-trace-devel-debuginfo, kernel-vanilla, kernel-vanilla-base, kernel-vanilla-base-debuginfo, kernel-vanilla-debuginfo, kernel-vanilla-debugsource, kernel-vanilla-devel, kernel-vanilla-devel-debuginfo, kernel-vmi, kernel-vmi-base, kernel-vmi-base-debuginfo, kernel-vmi-debuginfo, kernel-vmi-debugsource, kernel-vmi-devel, kernel-vmi-devel-debuginfo, kernel-xen, kernel-xen-base, kernel-xen-base-debuginfo, kernel-xen-debuginfo, kernel-xen-debugsource, kernel-xen-devel, kernel-xen-devel-debuginfo, preload-kmp-default, preload-kmp-desktop
Products:
openSUSE 11.4 (debug, i586, x86_64)