Bug 42903 - ath9k causes complete freeze of the system
Summary: ath9k causes complete freeze of the system
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-11 11:56 UTC by Gilles Habran
Modified: 2012-08-15 21:58 UTC (History)
15 users (show)

See Also:
Kernel Version: 3.2.9-1 and 2.6.32-5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Output for lspci -vvvxx (56.92 KB, text/plain)
2012-03-13 06:08 UTC, Gilles Habran
Details
wpa_supplicant.conf (1.26 KB, text/plain)
2012-03-17 17:38 UTC, Gilles Habran
Details
wifihome (125 bytes, text/plain)
2012-03-17 17:39 UTC, Gilles Habran
Details
WiFi routeur properties (1.87 KB, text/plain)
2012-03-17 17:39 UTC, Gilles Habran
Details
fix for the panic with TKIP security (792 bytes, patch)
2012-03-20 11:43 UTC, shafi
Details | Diff
Syslog messages with debug=0xffffffff before the lockup (851.99 KB, text/plain)
2012-06-08 05:43 UTC, Panayiotis Karabassis
Details

Description Gilles Habran 2012-03-11 11:56:05 UTC
Hi,

I bought this PCI card TP-LINK TL-WN851ND twice. One is for my main computer (ArchLinux 64bits with kernel 3.2.9-1), the other one is for my debian server (2.6.32-5-amd64).

I tried at first on the ArchLinux computer with wicd when the freezes started so I thought about a conflict because I had networkmanager installed too. I uninstalled wicd, networkmanager, networkmanager-openvpn. I couldn't find any errors in /var/log regarding this problem. 

I get a freeze after less than a minute when I'm on KDE (before that, the wifi network works correctly) but I get the freeze even if I'm in a tty and KDE isn't started

I still thought about a conflict problem with ArchLinux or something I would have done wrong in the configuration so I decided to install it on my server and see how it goes.

Unfortunately, I get the same result. After a while in a tty while connected to the wifi network, it freezes. I can't do anything, I have to "hard reset". I didn't install anything on the server except wireless-tools and wpasupplicant like the documentation said.

Everything works fine when I have a wired connection.

The WiFi AP is a Vodafone Box from Germany with WPA2 encryption key.

I don't find anything useful in the /var/log folder but let me know if you have something in mind, I'll be more than glad to search in this folder again.
Comment 1 shafi 2012-03-13 05:45:44 UTC
please provide lspci -vvvxx output and also please look out for WPA2 encryption, is it AES or TKIP?
Comment 2 Gilles Habran 2012-03-13 06:08:14 UTC
Created attachment 72572 [details]
Output for lspci -vvvxx
Comment 3 Gilles Habran 2012-03-13 06:15:31 UTC
Regarding the WPA2 encryption, I think I made a mistake. It's WPA, not WPA2. 

How can I find if it's AES or TKIP, my laptop works fine with the WiFi, can I check that with a command from it or should I check in the Vodafone Box ?

I look our for that information in the Vodafone Box admin panel but I can't find this information.

Network Security : WPA Only PSK

I don't see anywhere if it's AES or TKIP.
Comment 4 shafi 2012-03-13 07:10:08 UTC
hi,

i don't have AR9227 cards, i will check with my other cards with WPA. a recent commit seems interesting to fix this

commit 9bbb8168ed3d8b946f9c1901a63a675012de88f2
Author: Felix Fietkau <nbd@openwrt.org>
Date:   Wed Feb 15 19:31:20 2012 +0100

    ath9k_hw: prevent writes to const data on AR9160
    
    Duplicate the data for iniAddac early on, to avoid having to do redundant
    memcpy calls later. While we're at it, make AR5416 < v2.2 use the same
    codepath. Fixes a reported crash on x86.
    
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
    Reported-by: Magnus Määttä <magnus.maatta@logica.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
Comment 5 Gilles Habran 2012-03-13 07:33:41 UTC
Hi,

thank you for your help. Should I apply this patch in the kernel, compile it and try it to see if I still have the problem ?

I keep looking about the AES or TKIP on Vodafone box in Germany.

Thanks.
Comment 6 shafi 2012-03-13 07:53:45 UTC
(In reply to comment #5)
> Hi,
> 
> thank you for your help. Should I apply this patch in the kernel, compile it
> and try it to see if I still have the problem ?

yes you can, an easy idea to quickly check with the latest compat wireless
http://linuxwireless.org/en/users/Download#Where_to_download_bleeding_edge

> 
> I keep looking about the AES or TKIP on Vodafone box in Germany.
> 
> Thanks.
Comment 7 shafi 2012-03-13 07:54:25 UTC
i would also just try to issue if i can get the issue with WPA alone
Comment 8 Gilles Habran 2012-03-13 08:13:11 UTC
Unfortunately, I can only test this evening. I will try compat-wireless and then remove it (if that doesn't work) and try the patch.

Thanks again.
Comment 9 Gilles Habran 2012-03-13 21:47:26 UTC
I tried compat-wireless-2012-03-12 but I still have the problem. My network has a WPA encryption with TKIP (I found that with a scan).

Unfortunately, I checked and the patch is already in compat-wireless source code.

To be sure that I load the compat-wireless wifi drivers, I moved the drivers from /lib/modules/3.2.9.1-ARCH/ ...

Isn't there any log in /var/log to help ? :(
Comment 10 shafi 2012-03-14 07:07:21 UTC
hi,

had just used AR9287 card associated with WPA-PSK TKIP, no freeze. do i have to do something else to trigger the freeze ? i used 64 bit ubuntu test machine with wireless-testing 3.3.-rc6-wl
Comment 11 Gilles Habran 2012-03-14 07:37:11 UTC
Hi,

thank you again for your time. I don't think you have to do something else.

Basically, on ArchLinux, the drivers ath9k, ath9k_hw, ath9k_common I think and others things like mac8011 (not sure of the name though) are loaded. If I don't use them, everything is fine.

I can "start" my wifi with this command : ifconfig wlan0 up. I can even start net-profiles (ArchLinux thing I think) to start eth0 and wlan0 for me.

The problem happens when I connect my computer to a WiFi. After that, I can use the wifi for less than a minute and my computer freezes : I can't move the mouse, can't access the tty.

I will try to uninstall every network packages and see how it goes but I have the problem on Debian too with an older kernel and I didn't install fancy network packages on the server.

I will try a Ubuntu Live CD too, actually I should have tried this first.

I'll give more news this evening probably.

Thanks.
Comment 12 Gilles Habran 2012-03-14 23:13:10 UTC
Good evening,

I just tried with the Ubuntu Live CD (11.10 I think, I just downloaded it) and I have the same problem. 

I get a freeze once I'm connected to the wifi. I think we can conclude that it's driver related. I didn't check the kernel version and that kind of things since I have the same problem with compat-wireless.

I wish I could help you figure out what's wrong with some logs but I don't know in what file(s) I have to look nor what error messages I should pay attention to.

If I can do anything to help you, please let me know.

Thanks.
Comment 13 shafi 2012-03-15 11:39:10 UTC
if you have another machine is it possbile for you to capture the trace in case the system had freezed due to a panic. i just don't know why i am not getting this in my other chipsets.

*connect your test machine with wifi with another machine via ethernet
*give IPS 192.168.2.45 for your wifi/test machine and 192.168.2.35 for the
machine that collects the logs

in the machine collecting log

nc -l -u 1111


in your test machine this script should be started

#!/bin/sh
#sudo service network-manager stop
sudo ifconfig eth0 192.168.2.45 netmask 255.255.255.0 up
sudo dmesg -n 8
sudo modprobe netconsole
netconsole=4444@192.168.2.45/eth0,1111@192.168.2.35/00:15:58:c3:bf:25

the last one is your mac address of  machine you collect logs

http://www.mjmwired.net/kernel/Documentation/networking/netconsole.txt
- Show quoted text -
Comment 14 shafi 2012-03-15 11:39:36 UTC
hey please try with the latest compat wireless too!
Comment 15 Gilles Habran 2012-03-15 11:44:45 UTC
Okay I will do that tonight.

My Archlinux already has compat wireless so I will try with this one. Is it better to use a machine with a wired connection for the log machine ?

I have a debian server (wired) or my laptop (wifi).

Thanks again.
Comment 16 shafi 2012-03-15 11:54:46 UTC
its best to connect your test machine and the machine that collects the log with an ethernet wire,.. also i would be out of station for another 3 days atleast. will not be able to look into this, hope i can recreate it next week
Comment 17 Gilles Habran 2012-03-15 18:54:46 UTC
yeah well, it doesn't work but I don't know what I'm doing wrong.

I tried like you said : 

A) laptop with wired connection (remote log)
1) static IP 192.168.2.35, netmask 255.255.255.0
2) I started nc -l -u 1111 (the command never ends, I suppose it waits for informations to display them in the terminal)

no error but when my archlinux crashes, I don't get any message.

B) main computer wired connection
I tried with the script but nothing in the remote log but I had a problem with dmesg -n 8, I got unknown level 8 so I replaced that with dmesg --console-level debug, I even started my kernel with the debug parameters. Is it the same ?

I tried the command manually, still nothing. 

Since it didn't work, I tried to follow this https://wiki.archlinux.org/index.php/Netconsole

I replaced dmesg -n 8 like before, I get the netconsole : network logging started with dmesg | tail but still nothing. I don't get any message on my remote terminal.

I can ping my laptop from my main and my main from my laptop.

What am I doing wrong ?

Thanks.
Comment 18 Gilles Habran 2012-03-15 19:25:58 UTC
Well, sorry for the multiple messages.

I just connected my PS3 for the wifi and it said that my wifi encryption is AES. I checked with my laptop and iwlist wlan0 scanning returns TKIP.

Which one can I trust ? Is it possible that this kind of thing causes problems ? That's strange because I can connect to the Wifi, my computer freezes after a few seconds.
Comment 19 Gilles Habran 2012-03-15 19:55:41 UTC
I tried to use the WiFi without any security (WEP, WPA, ...) and I still have the problem. 

I think my only hope is to figure out what netconsole doesn't work.
Comment 20 Gilles Habran 2012-03-17 17:35:14 UTC
Hi,

I tried to get logs from my main computer (archlinux) on the server this time and it worked.

Unfortunately, I don't get a lot of logs. I have the parameters "debug" in ArchLinux kernel so I suppose I get every possible logs.

Here is what I do : 

1) nc -l -u -p 6666 on the server
2) start this script from ArchLinux


cat test-wifi.sh 
#!/bin/sh
modprobe configfs
modprobe netconsole
mount none -t configfs /sys/kernel/config

mkdir /sys/kernel/config/netconsole/target1
cd /sys/kernel/config/netconsole/target1

# set local IP address
echo 192.168.2.104 > local_ip
# set destination IP address
echo 192.168.2.150 > remote_ip
# find destination MAC address
arping `cat remote_ip` -f |grep -o ..:..:..:..:..:.. > remote_mac

echo 1 > enabled

3) to check if everything is correct, I plug an USB stick to get informations about it.

4) if it's working, I do this : 

# ifconfig wlan0 up
# newlan -u wifihome

and I wait for the freeze.

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

Here is the logs from Arch that I can see on the server : 

ADDRCONF(NETDEV_UP): wlan0: link is not ready
ADDRCONF(NETDEV_UP): wlan0: link is not ready
wlan0: authenticate with 88:25:2c:93:20:8a (try 1)
wlan0: authenticated
wlan0: associate with 88:25:2c:93:20:8a (try 1)
wlan0: RX AssocResp from 88:25:2c:93:20:8a (capab=0x411 status=0 aid=2)
wlan0: associated
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Intel AES-NI instructions are not detected.
wlan0: no IPv6 routers present

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

My CPU is an Intel 860 2.8 GHz and it doesn't support AES so the "Intel AES-NI instructions are not detected" is normal

After that, I have the freeze so no more log.

I will attach my /etc/wpa_supplicant.conf, /etc/network.d/wifihome... maybe I didn't configure it well.
Comment 21 Gilles Habran 2012-03-17 17:38:16 UTC
Created attachment 72635 [details]
wpa_supplicant.conf
Comment 22 Gilles Habran 2012-03-17 17:39:13 UTC
Created attachment 72636 [details]
wifihome

Configuration file for newlan (ArchLinux - AUR)
Comment 23 Gilles Habran 2012-03-17 17:39:56 UTC
Created attachment 72637 [details]
WiFi routeur properties

Result of iwlist wlan0 scanning
Comment 24 Gilles Habran 2012-03-17 18:03:41 UTC
Someone suggested that I "block" my wifi mode to b and g because n caused problem.
Unfortunately, it didn't change anything.

I get one more line in netconsole but I don't think it's wifi related : 

hda-intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.

By the way, when I did some tests, there was something strange. When I start my computer with dhcp on eth0 and start the wifi for my tests, the computer doesn't freeze. 

If I start the computer with a manual IP address, netmask, broadcast (so no internet) and I start the wifi tests, I get internet with the wifi but then I have the freeze.

I suppose it keeps using the "eth0 internet" once it's connected with a wifi connection so that's why it doesn't freeze.

I hope this could be of any help.
Comment 25 shafi 2012-03-20 11:31:20 UTC
i was trying to connect with a 5ghz AP and with TKIP, the issue did not come. why 11n is enabled getting enabled in 5ghz.

i got the fix. sorry for such a long thread, its quite very very simple and 
the issue is very straight forward and you found it.
the discussion and analysis is there in
http://www.spinics.net/lists/linux-wireless/msg87172.html

this should fix it

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Date: Tue, 20 Mar 2012 13:51:26 +0530
Subject: [PATCH] ath9k: Use HW HT capabilites properly

The commit "ath9k: Remove aggregation flags" changed how
nodes were being initialized. Use the HW HT cap bits
to initialize/de-initialize nodes, else we would be
accessing an uninitialized entry during a suspend/resume cycle,
resulting in a panic.

Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3879485..215eb25 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -640,7 +640,7 @@ static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta,
       an->sta = sta;
       an->vif = vif;

-       if (sta->ht_cap.ht_supported) {
+       if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
               ath_tx_node_init(sc, an);
               an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
                                    sta->ht_cap.ampdu_factor);
@@ -659,7 +659,7 @@ static void ath_node_detach(struct ath_softc *sc, struct ieee80211_sta *sta)
       an->sta = NULL;
 #endif

-       if (sta->ht_cap.ht_supported)
+       if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
               ath_tx_node_cleanup(sc, an);
 }
Comment 26 Gilles Habran 2012-03-20 11:42:58 UTC
I will apply this patch this evening and let you know if it is fixed.

Thank you very much for your help.
Comment 27 shafi 2012-03-20 11:43:59 UTC
Created attachment 72658 [details]
fix for the panic with TKIP security

the panic happens as the 'tid' structure is not initialized while we later try to access its elements.
with TKIP mac80211 tells the driver ht_supported is false, while the driver seems to not initialize the tid structure because of this, while the better way is to check for drivers HW ht capability ATH9K_HW_CAP_HT on deciding whether to initialize or not the tid structure. the attached patch from Sujith with analysis from our side and the root cause.
Comment 28 shafi 2012-03-20 11:45:02 UTC
(In reply to comment #26)
> I will apply this patch this evening and let you know if it is fixed.
> 
> Thank you very much for your help.

i had attached the manual patch for you, incase you cannot find that. pls let me know if you have any issues. i am confident this is going to fix this
Comment 29 Gilles Habran 2012-03-20 22:03:53 UTC
Hi,

I tried to patch the wireless compat with the patch but it's strange.

In the ath/ath9k/main.c, I can find the exact same code than the patch but if I take a look at ath/ath9k/main.c from linux-3.3 gitweb for exemple, I can see this

sc->sc_flags & SC_OP_TXAGGR instead of sta->ht_cap.ht_supported

By the way, I tried the compat wireless you gave me : http://linuxwireless.org/en/users/Download#Where_to_download_bleeding_edge

Shouldn't I try this one http://linuxwireless.org/en/users/Download/stable#compat-wireless_3.3_stable_releases instead ?

Isn't your link for 2.6 ? 

I tried the patch you gave me on the wireless compat you gave me so I'm going to try with the source code from the stable kernel git repo but since my kernel is 3.2.11-1, I don't have much hope.

Should I change sc->sc_flags & SC_OP_TXAGGR with sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT like the patch or should I try first with sc->sc_flags & SC_OP_TXAGGR (I suppose I already have this source code for the drivers in my kernel) ?

I'm really confused now.
Comment 30 shafi 2012-03-21 04:56:30 UTC
hi,

please take the latest compat wireless 2012-03-18 from
http://linuxwireless.org/en/users/Download#Where_to_download_bleeding_edge
and please apply the patch
compat-wireless-2012-03-18 $ patch -p1 < /home/shafi/fix-panic-with-tkip.patch
Comment 31 Gilles Habran 2012-03-21 06:29:23 UTC
Hi,

I downloaded compat-wireless-2012-03-18, applied the patch, compiled everything (I didn't even select my ath9k driver) so I have every possible wireless drivers up to date.

I installed them and reboot (just to be sure). I can see that : 

lsmod | grep ath9k                                                                                                                                                                                                       
ath9k                  92919  0                                                                                                                                                                                                                                                
ath9k_common            2096  1 ath9k                                                                                                                                                                                                                                          
ath9k_hw              340491  2 ath9k_common,ath9k                                                                                                                                                                                                                             
ath                    15553  3 ath9k_hw,ath9k_common,ath9k                                                                                                                                                                                                                    
mac80211              407387  1 ath9k                                                                                                                                                                                                                                          
cfg80211              177100  3 mac80211,ath,ath9k                                                                                                                                                                                                                             
compat                  2481  5 cfg80211,mac80211,ath9k_hw,ath9k_common,ath9k

So... I suppose everything is okay, I have the good drivers loaded. I'm gonna try to find a command to see the path of the modules loaded (just to be sure again)... because I still have the problem, unfortunately.

I also tested with the Ubuntu Live CD and same result.

Maybe I keep doing something wrong but I have no idea what it is.
Comment 32 shafi 2012-03-21 07:11:36 UTC
(In reply to comment #31)
> Hi,
> 
> I downloaded compat-wireless-2012-03-18, applied the patch, compiled
> everything
> (I didn't even select my ath9k driver) so I have every possible wireless
> drivers up to date.
> 
> I installed them and reboot (just to be sure). I can see that : 
> 
> lsmod | grep ath9k                                                            
> ath9k                  92919  0                                               
> ath9k_common            2096  1 ath9k                                         
> ath9k_hw              340491  2 ath9k_common,ath9k                            
> ath                    15553  3 ath9k_hw,ath9k_common,ath9k                   
> mac80211              407387  1 ath9k                                         
> cfg80211              177100  3 mac80211,ath,ath9k                            
> compat                  2481  5 cfg80211,mac80211,ath9k_hw,ath9k_common,ath9k
> 
> So... I suppose everything is okay, I have the good drivers loaded. I'm gonna
> try to find a command to see the path of the modules loaded (just to be sure
> again)... because I still have the problem, unfortunately.
> 
> I also tested with the Ubuntu Live CD and same result.
> 
> Maybe I keep doing something wrong but I have no idea what it is.

in ubuntu

please do
locate ath9k.ko
then do cksum ~/compatwireless /drivers/net/wireless/ath/ath9k/ath9k.ko

do
cksum /lib/modules/2.6.32-21-generic/updates/drivers/net/wireless/ath/ath9k/ath9k.ko
Comment 33 Gilles Habran 2012-03-21 20:07:00 UTC
Hi,

find / -name ath9k.ko* | xargs cksum

2899500608 167567 /home/awesome/tmp/compat-wireless-2012-03- 18/drivers/net/wireless/ath/ath9k/ath9k.ko

1282321748 155904 /lib/modules/3.2.11-1-ARCH/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko

2899500608 167567 /lib/modules/3.2.11-1-ARCH/updates/drivers/net/wireless/ath/ath9k/ath9k.ko

I gunzip'ed the second one with cksum (1282321748). It was .ko.gz.

================

modinfo ath9k
filename:       /lib/modules/3.2.11-1-ARCH/updates/drivers/net/wireless/ath/ath9k/ath9k.ko
license:        Dual BSD/GPL
description:    Support for Atheros 802.11n wireless LAN cards.
author:         Atheros Communications
alias:          platform:ar934x_wmac
alias:          platform:ar933x_wmac
alias:          platform:ath9k
alias:          pci:v0000168Cd00000034sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000033sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000032sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000030sv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Esv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Dsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Csv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Bsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Asv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000029sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000027sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000024sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000023sv*sd*bc*sc*i*
depends:        ath9k_hw,ath9k_common,mac80211,ath,cfg80211,compat
vermagic:       3.2.11-1-ARCH SMP preempt mod_unload modversions 
parm:           debug:Debugging mask (uint)
parm:           nohwcrypt:Disable hardware encryption (int)
parm:           blink:Enable LED blink on activity (int)
parm:           btcoex_enable:Enable wifi-BT coexistence (int)
Comment 34 Martin Hallerbach 2012-03-21 20:43:57 UTC
Just to inform you
I am using oneiric 11.10 and have the same issue (total freeze) with the same WiFi card.

I just installed "linux-backports-modules-cw-3.2-3.0.0-16-generic-pae" via synaptic
did not reinstall the card.. will do that later and report back

There is a comment to install a meta-package instead but I cannot find what this actually means or a download which calls itself a meta package.

rgds
Martin
Comment 35 Gilles Habran 2012-03-23 16:26:26 UTC
Hi,

"good" to know... at least, I am not alone with this problem.

Could you add your informations (WiFi security and other things) to compare with me ? This could help figure out what the problem is.

Cheers.
Comment 36 chee rabbits 2012-03-24 00:53:20 UTC
I'm using Arch Linux current, have a AR9485 Wireless Network (168c:0032) in an acer aspire one.

Total freeze when using the wifi.

very frustrating :c
Comment 37 chee rabbits 2012-03-24 00:54:20 UTC
( in addition, this problem is when using the card at all. The connection in this house is WEP, so it is not a WPA issue )
Comment 38 bnjbouv+signup 2012-03-30 21:46:44 UTC
Hi
I'm experiencing the same trouble with a AR9285 Atheros Wifi card, on a Toshiba Satellite C650-15X, with ArchLinux too. The connection is randomly succesful, about once per five tries. Otherwise, I get a kernel panic and there is nothing to do but reboot.
Comment 39 Gilles Habran 2012-03-31 06:33:55 UTC
I don't think it's ArchLinux related.

I bought another wifi pci card that uses rt2800pci drivers and everything is fine with it. Same OS, same wifi, ...
Comment 40 Bálint Szilakszi 2012-03-31 18:00:43 UTC
I am also seeing this issue with a TL-WN851ND card and a Debian 3.1.0.1-686-pae kernel.

The card connects successfully to a Cisco EPC3925 AP, but freezes after any significant traffic (ssh-ing into a server and opening a screened irssi doesn't do it, while trying to load bbc.co.uk in a browser causes a freeze after some traffic).

I've applied the TKIP patch for the latest nightly compat-wireless and I'm still seeing the freeze, I've also tried switching to AES only mode at the AP, no effect either.
Comment 41 Christopher Broome 2012-04-03 06:14:53 UTC
I'm having a similar issue with a TP-Link TL-WN851ND (Ver 1.0) card, except instead of freezing, the machine is rebooting.  I'm using kernel version 3.2.12 on a gentoo build (I can post my .config if you want).

/# lspci -nn

00:00.0 Memory controller [0580]: nVidia Corporation CK804 Memory Controller [10de:005e] (rev a3)
00:01.0 ISA bridge [0601]: nVidia Corporation CK804 ISA Bridge [10de:0050] (rev f3)
00:01.1 SMBus [0c05]: nVidia Corporation CK804 SMBus [10de:0052] (rev a2)
00:02.0 USB controller [0c03]: nVidia Corporation CK804 USB Controller [10de:005a] (rev a2)
00:02.1 USB controller [0c03]: nVidia Corporation CK804 USB Controller [10de:005b] (rev a3)
00:06.0 IDE interface [0101]: nVidia Corporation CK804 IDE [10de:0053] (rev f2)
00:07.0 IDE interface [0101]: nVidia Corporation CK804 Serial ATA Controller [10de:0054] (rev f3)
00:08.0 IDE interface [0101]: nVidia Corporation CK804 Serial ATA Controller [10de:0055] (rev f3)
00:09.0 PCI bridge [0604]: nVidia Corporation CK804 PCI Bridge [10de:005c] (rev f2)
00:0a.0 Bridge [0680]: nVidia Corporation CK804 Ethernet Controller [10de:0057] (rev f3)
00:0b.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge [10de:005d] (rev f3)
00:0c.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge [10de:005d] (rev f3)
00:0d.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge [10de:005d] (rev f3)
00:0e.0 PCI bridge [0604]: nVidia Corporation CK804 PCIE Bridge [10de:005d] (rev a3)
00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration [1022:1100]
00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map [1022:1101]
00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller [1022:1102]
00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control [1022:1103]
01:07.0 Network controller [0280]: Atheros Communications Inc. AR9227 Wireless Network Adapter [168c:002d] (rev 01)
02:00.0 Audio device [0403]: Creative Labs X-Fi Titanium series [EMU20k2] [1102:000b] (rev 04)
05:00.0 VGA compatible controller [0300]: nVidia Corporation GF108 [GeForce GT 430] [10de:0de1] (rev a1)
05:00.1 Audio device [0403]: nVidia Corporation GF108 High Definition Audio Controller [10de:0bea] (rev a1)

I'm using the following steps to manually bring up the card - note that for some reason it's wlan1 instead of wlan0.  I think that's because I had a wireless USB adapter at one point.  Anyway, here's 
what I'm doing:

/# ifconfig wlan1 up
/# /etc/init.d/wpa_supplicant start
/# dhcpcd wlan1

The interface comes up, wpa_supplicant starts, and I can get an address using dhcpcd.  Well, usually at least.  I've had the machine reboot in the process of starting wpa_supplicant, but that's rare (once or twice at the most).

My wireless AP is using WPA2/PSK/AES.

The usual behavior is that I'll get it up and running, try to run

/# emerge --sync

and many times it will reboot during the sync.  If it doesn't reboot during the sync, it will shortly thereafter with any other network activity.

I apologize if this should be a separate bug, but I think I might be experiencing a different symptom of the same underlying problem.

Tomorrow I might try debugging over a wired ethernet connection using the aforementioned method.  I'm assuming I can just plug both machines into a switch (not the wireless AP) and that I don't need a 
crossover cable.

Thanks for the help btw.  It's just good to know I'm not the only person that has issues with this card.
Comment 42 shafi 2012-04-03 06:23:51 UTC
well, not sure some other issue had crept up. the patch should fix the issue,
i am just building up my latest wireless-testing, let me see if i can get something. i was into some tight project, was not able to follow up with this.
Comment 43 Fran 2012-04-05 18:04:08 UTC
Same problem here with TL-WN851ND v1.0, I tried the latest compat-wireless drivers (compat-wireless-2012-04-04), which already have the above patch applied. I would say they even make the freeze happen earlier.

I think I will just return the card...
Comment 44 shafi 2012-04-06 04:59:17 UTC
(In reply to comment #43)
> Same problem here with TL-WN851ND v1.0, I tried the latest compat-wireless
> drivers (compat-wireless-2012-04-04), which already have the above patch
> applied. I would say they even make the freeze happen earlier.
> 
> I think I will just return the card...

hey, thanks a lot for that info. yes i did saw the patch is there in that bleeding edge compat wireless. then it should be some other freeze i am missing.
please help me by providing as much info as possible.

*lspci -vvvvxxx
*what's your AP configuration (2ghz/5ghz) ? legacy or HT20 or ht40+ HT40-
*any security, is there any other useful info

i am going to spend some good amount of time to recreate this, i was bit busy with WoW in ath9k
Comment 45 shafi 2012-04-06 05:45:30 UTC
(In reply to comment #37)
> ( in addition, this problem is when using the card at all. The connection in
> this house is WEP, so it is not a WPA issue )

hi,

could you please confirm with bleeding edge comapt wireless , with WEP ?
what card you are using ? whats your AP configurations, 2ghz/ 5ghz ?
Comment 46 Fran 2012-04-06 10:08:24 UTC
I attach the output of lspci and iwconfig (I managed to connect for a few seconds, before the computer froze, and save it). To help with the debugging, I set my router to g operation (54Mbps) and disabled the security.

I also provoked the freeze while in tty1 (console) to see if I would get any kernel ooops dump, but it just froze in a very hard way (no sysrq magic).

If I can help in any other way before tomorrow, I'll be glad.

lspci -vvvvxxx
==============
08:00.0 Network controller: Atheros Communications Inc. AR9287 Wireless Network Adapter (rev 01)
        Subsystem: Atheros Communications Inc. Device 0300
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 168, Cache Line Size: 256 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at fbef0000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [44] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=100mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: ath9k
        Kernel modules: ath9k
00: 8c 16 2d 00 16 01 b0 02 01 00 80 02 40 a8 00 00
10: 00 00 ef fb 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 8c 16 00 03
30: 00 00 00 00 44 00 00 00 00 00 00 00 0f 01 00 00
40: 80 00 00 00 01 00 82 48 00 00 00 00 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

iwconfig
========
wlan0     IEEE 802.11bgn  ESSID:"Tomatet"  
          Mode:Managed  Frequency:2.472 GHz  Access Point: A0:21:B7:D9:EC:99   
          Bit Rate=54 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=54/70  Signal level=-56 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:34   Missed beacon:0
Comment 47 shafi 2012-04-06 10:31:17 UTC
(In reply to comment #46)
> I attach the output of lspci and iwconfig (I managed to connect for a few
> seconds, before the computer froze, and save it). To help with the debugging,
> I
> set my router to g operation (54Mbps) and disabled the security.
> 
> I also provoked the freeze while in tty1 (console) to see if I would get any
> kernel ooops dump, but it just froze in a very hard way (no sysrq magic).
> 
> If I can help in any other way before tomorrow, I'll be glad.
> 
> lspci -vvvvxxx
> ==============
> 08:00.0 Network controller: Atheros Communications Inc. AR9287 Wireless
> Network
> Adapter (rev 01)
>         Subsystem: Atheros Communications Inc. Device 0300
>         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
>         Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 168, Cache Line Size: 256 bytes
>         Interrupt: pin A routed to IRQ 16
>         Region 0: Memory at fbef0000 (32-bit, non-prefetchable) [size=64K]
>         Capabilities: [44] Power Management version 2
>                 Flags: PMEClk- DSI- D1- D2- AuxCurrent=100mA
> PME(D0+,D1-,D2-,D3hot+,D3cold-)
>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>         Kernel driver in use: ath9k
>         Kernel modules: ath9k
> 00: 8c 16 2d 00 16 01 b0 02 01 00 80 02 40 a8 00 00
> 10: 00 00 ef fb 00 00 00 00 00 00 00 00 00 00 00 00
> 20: 00 00 00 00 00 00 00 00 00 00 00 00 8c 16 00 03
> 30: 00 00 00 00 44 00 00 00 00 00 00 00 0f 01 00 00
> 40: 80 00 00 00 01 00 82 48 00 00 00 00 00 00 00 00
> 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 
> iwconfig
> ========
> wlan0     IEEE 802.11bgn  ESSID:"Tomatet"  
>           Mode:Managed  Frequency:2.472 GHz  Access Point: A0:21:B7:D9:EC:99  
>           Bit Rate=54 Mb/s   Tx-Power=20 dBm   
>           Retry  long limit:7   RTS thr:off   Fragment thr:off
>           Power Management:off
>           Link Quality=54/70  Signal level=-56 dBm  
>           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
>           Tx excessive retries:0  Invalid misc:34   Missed beacon:0

hi i used AR9287 and connected to the 802.11g AP and channel 6 legacy mode
comapt wrieless 2012-04-04, still now no freeze, may be i need to change the channel , PM on in my card , anything else
Comment 48 shafi 2012-04-06 10:34:01 UTC
(In reply to comment #46)
> I attach the output of lspci and iwconfig (I managed to connect for a few
> seconds, before the computer froze, and save it). To help with the debugging,
> I
> set my router to g operation (54Mbps) and disabled the security.
> 
> I also provoked the freeze while in tty1 (console) to see if I would get any
> kernel ooops dump, but it just froze in a very hard way (no sysrq magic).
> 
> If I can help in any other way before tomorrow, I'll be glad.
> 
> lspci -vvvvxxx
> ==============
> 08:00.0 Network controller: Atheros Communications Inc. AR9287 Wireless
> Network
> Adapter (rev 01)
>         Subsystem: Atheros Communications Inc. Device 0300
>         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
>         Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 168, Cache Line Size: 256 bytes
>         Interrupt: pin A routed to IRQ 16
>         Region 0: Memory at fbef0000 (32-bit, non-prefetchable) [size=64K]
>         Capabilities: [44] Power Management version 2
>                 Flags: PMEClk- DSI- D1- D2- AuxCurrent=100mA
> PME(D0+,D1-,D2-,D3hot+,D3cold-)
>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>         Kernel driver in use: ath9k
>         Kernel modules: ath9k
> 00: 8c 16 2d 00 16 01 b0 02 01 00 80 02 40 a8 00 00
> 10: 00 00 ef fb 00 00 00 00 00 00 00 00 00 00 00 00
> 20: 00 00 00 00 00 00 00 00 00 00 00 00 8c 16 00 03
> 30: 00 00 00 00 44 00 00 00 00 00 00 00 0f 01 00 00
> 40: 80 00 00 00 01 00 82 48 00 00 00 00 00 00 00 00
> 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 
> iwconfig
> ========
> wlan0     IEEE 802.11bgn  ESSID:"Tomatet"  
>           Mode:Managed  Frequency:2.472 GHz  Access Point: A0:21:B7:D9:EC:99  
>           Bit Rate=54 Mb/s   Tx-Power=20 dBm   
>           Retry  long limit:7   RTS thr:off   Fragment thr:off
>           Power Management:off
>           Link Quality=54/70  Signal level=-56 dBm  
>           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
>           Tx excessive retries:0  Invalid misc:34   Missed beacon:0


can you please get some trace in netconsole, its quite unlikely please check you have the bleeding edge compat wireless installed, like my previous comment to check

please do
locate ath9k.ko
then do cksum ~/compatwireless /drivers/net/wireless/ath/ath9k/ath9k.ko

do
cksum
/lib/modules/2.6.32-21-generic/updates/drivers/net/wireless/ath/ath9k/ath9k.ko
Comment 49 Fran 2012-04-06 11:22:05 UTC
Ok, I did the cksum + modinfo ath9k. Yes I am running the kernel module I compiled.

As for the netconsole, just tried it, nothing of interest gets printed there at freeze time. I paste the interesting bits, before and after the freeze.


[  353.850773] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  355.560047] wlan0: authenticate with a0:21:b7:d9:ec:99
[  355.580883] wlan0: send auth to a0:21:b7:d9:ec:99 (try 1/3)
[  355.582968] wlan0: authenticated
[  355.599506] wlan0: associate with a0:21:b7:d9:ec:99 (try 1/3)
[  355.602220] wlan0: RX AssocResp from a0:21:b7:d9:ec:99 (capab=0x431 status=0 aid=3)
[  355.602225] wlan0: associated
[  355.604054] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  355.705453] Intel AES-NI instructions are not detected.
[  355.827236] padlock: VIA PadLock not detected.
[  374.647347] CE: hpet increased min_delta_ns to 7500 nsec
[  374.647926] CE: hpet increased min_delta_ns to 11250 nsec
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.35-32-generic (buildd@allspice) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5.1) ) #68-Ubuntu SMP Tue Mar 27 18:07:17 UTC 2012 (Ubuntu 2.6.35-32.68-generic 2.6.35.14)
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-2.6.35-32-generic root=/dev/mapper/volumegroup-rootlv ro debug ignore_loglevel
Comment 50 Igor 2012-05-04 11:55:27 UTC
ACER 5250, AR9485, Debian sid amd64, latest compat-wireless

Tried everything recommended: 
network boot as the first option in BIOS, blacklist atl1c, "options ath9k nohwcrypt=1", router 802.11g only
but still got occasional system freezes.

The only remedy for now is
iwconfig wlan0 power off

Hope this helps.
Comment 51 Peter Janeck 2012-05-10 09:00:28 UTC
I have the same problem with TP-Link TL-WN851N PCI Card. I am using fedora 17 beta with kernel 3.3.4
The system freeze occurs after each event described in the former posts and I have tried all mentioned solutions.

Thanks for any help,
cheers Peter
Comment 52 Panayiotis Karabassis 2012-05-24 18:54:31 UTC
I'd like to confirm this on Debian Wheezy with kernel 3.3.0-trunk-amd64 from experimental with the TP-LINK card TL-WN851ND (AR9227 chip).

I have the exact same symptoms: complete system freeze with no messages in neither disk logs, nor virtual terminal, nor netconsole. Unfortunately freezes happen every three-four hours. I thought it was a hardware failure, but the symptoms and other parameters fit too closely. Ironically, I bought this card because I thought it work well on GNU/Linux.

Until this is fixed, I have reverted to my previous proprietary driver card, despite its shortcomings. Unfortunately I don't have much time to invest in this right now, because as I said testing for crashes takes several hours on my machine.
Comment 53 Panayiotis Karabassis 2012-06-08 05:43:14 UTC
Created attachment 73539 [details]
Syslog messages with debug=0xffffffff before the lockup

I'd like to attach the relevant parts of my syslog, before the crash. This was with the ath9k module loaded with debug=0xffffffff. A second time the lockup took place just after the same message: 'ath: phy1: tx queue 0 (c70ca3b8), link ffff8800c70ca3b8', obviously with different addresses.

I tried to insert ath_dbg() messages in ath_tx_processq() in xmit.c, where this message is printed, but they weren't flushed to disk in time. Although generally they show up in syslog.
Comment 54 Panayiotis Karabassis 2012-06-11 09:17:09 UTC
Correction: the hangs happen quite randomly. I'd really like to help debug this, but I don't know where to start. Not even NMI watchdog catches the hang. :-(
Comment 55 fynivx 2012-06-18 18:11:27 UTC
Due to the randomness of errors, I decided that the problem in threading. It is.

After some searching I made ​​the following correction:

494c494
< 		ah->config.serialize_regmode = SER_REG_MODE_AUTO;
---
>               ah->config.serialize_regmode = SER_REG_MODE_ON;

(line 494 in drivers/net/wireless/ath/ath9k/hw.c )

The driver began to work steadily. But this is a bad patch and need something more appropriate - it is unlikely to work with older cards. But with the AR9227 running - and I do not need more)

PS: Sorry for my English. This Google Translete from Russian)
Comment 56 Panayiotis Karabassis 2012-06-18 19:08:56 UTC
Would this patch be more appropriate:

561c561
< 		    ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) &&
---
>                   ((AR_SREV_9160(ah) || AR_SREV_9280(ah) || AR_SREV_9287(ah))
> &&

I will try it in the morning. If this works, you are amazing! Can I ask how you found it?
Comment 57 fynivx 2012-06-18 21:50:27 UTC
(In reply to comment #56)
>Can I ask how you found it?

I added the output "function * from drivers/net/wireless/ath/ath9k/*.c called." to all functions. It is possible to find several functions, which occurred after the call to freeze (  ath9k_iowrite32, ath9k_ioread32, etc. ).

Then I added a more detailed derivation of these functions (message about the call spin_lock and spin_unlock after calling these functions.) It helped to know that these functions are not called at all (condition "NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_ON" is not respected).

This meant that the driver runs in multiple threads, but the lock does not occur, because of what an error.

Then I just found a file that initialized variable "config" (hw.c). That's all)

PS: Again, sorry for my english)
Comment 58 Panayiotis Karabassis 2012-06-19 06:57:31 UTC
My hat off to you!

I've applied the patch (my version), debug shows serialize_reg to be set to 1. Now I just have to wait about two days to proclaim this fixed.

P.S. Your english is not bad.
Comment 59 Gilles Habran 2012-06-19 07:32:12 UTC
Thank you guys for this. I will install the card again this week-end to test the patch. :)

Have a nice day.
Comment 60 shafi 2012-06-19 07:47:45 UTC
(In reply to comment #56)
> Would this patch be more appropriate:
> 
> 561c561
> <             ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) &&
> ---
> >                 ((AR_SREV_9160(ah) || AR_SREV_9280(ah) || AR_SREV_9287(ah))
> &&
> 
> I will try it in the morning. If this works, you are amazing! Can I ask how
> you
> found it?

amazing a similar fix, time back
    https://bugzilla.kernel.org/show_bug.cgi?id=16476

commit 4c85ab11ca56da1aa59b58c80cc6a356515cc645
Author: John W. Linville <linville@tuxdriver.com>
Date:   Wed Jul 28 10:06:35 2010 -0400

    ath9k: enable serialize_regmode for non-PCIE AR9160
    
    https://bugzilla.kernel.org/show_bug.cgi?id=16476
    
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
    Cc: stable@kernel.org

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 2f83f97..8d291cc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -532,7 +532,8 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 
        if (ah->config.serialize_regmode == SER_REG_MODE_AUTO) {
                if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI ||
-                   (AR_SREV_9280(ah) && !ah->is_pciexpress)) {
+                   ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) &&
+                    !ah->is_pciexpress)) {
                        ah->config.serialize_regmode =
                                SER_REG_MODE_ON;
                } else {
Comment 61 Panayiotis Karabassis 2012-06-20 00:53:05 UTC
Well, after almost 24 hours without a hang, I think I can safely say the hang won't occur.

@fynivx: Whenever you come to Greece, I owe you a barrel of beer! ;-)

Can I suggest that we put a big note about this, somewhere where it will be seen by developers who add support for new cards? :-) We shouldn't go through all this pain for a problem that's already fixed.

Many thanks to everybody!
Comment 62 shafi 2012-06-23 13:26:34 UTC
(In reply to comment #56)
> Would this patch be more appropriate:
> 
> 561c561
> <             ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) &&
> ---
> >                 ((AR_SREV_9160(ah) || AR_SREV_9280(ah) || AR_SREV_9287(ah))
> &&
> 
> I will try it in the morning. If this works, you are amazing! Can I ask how
> you
> found it?

please send an upstream patch to wireless testing. thanks!
http://linuxwireless.org/en/developers/Documentation/git-guide
Comment 63 Florian Mickler 2012-07-25 19:38:55 UTC
A patch referencing this bug report has been merged in Linux v3.5-rc6:

commit 7508b657967cf664b5aa0f6367d05016e7e3bc2a
Author: Panayiotis Karabassis <panayk@gmail.com>
Date:   Tue Jun 26 23:37:17 2012 +0300

    ath9k: enable serialize_regmode for non-PCIE AR9287
Comment 64 Florian Mickler 2012-08-12 09:32:51 UTC
A patch referencing this bug report has been merged in Linux v3.5-rc6:

commit ca33c00fff12b15428003b7b0423b313190ef03a
Merge: 9740e00 de03309
Author: David S. Miller <davem@davemloft.net>
Date:   Thu Jun 28 16:58:09 2012 -0700

Note You need to log in before you can comment on or make changes to this bug.