You are not logged in.

#1 2013-12-05 03:48:27

Gavster
Member
From: Connecticut
Registered: 2012-11-07
Posts: 11

Stuck interrupt when scanning for wireless networks (Athero chipset)

I'm working on getting wireless running on my Thinkpad T40 with an Atheros AR5211 a/b adapter. The ath5k module loads automatically, and the dmesg output seems to indicate that it is properly detecting the card:

% dmesg|grep ath
[    4.767272] ath5k 0000:02:02.0: registered as 'phy0'
[    5.042780] ath: EEPROM regdomain: 0x61
[    5.042787] ath: EEPROM indicates we should expect a direct regpair map
[    5.042793] ath: Country alpha2 being used: 00
[    5.042796] ath: Regpair used: 0x61
[    5.478542] ath5k: phy0: Atheros AR5211 chip found (MAC: 0x42, PHY: 0x30)
[    5.478549] ath5k: phy0: RF5111 5GHz radio found (0x17)
[    5.478553] ath5k: phy0: RF2111 2GHz radio found (0x23)

I brought the interface up using ip:

% ip link show wlan0
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether [redacted] brd ff:ff:ff:ff:ff:ff

The trouble comes when I try to scan for wireless networks. I run "sudo iw dev wlan0 scan". At this point, the system becomes very sluggish, and the load average began to monotonically increase. The scan never completes; I left it for 15-20 minutes and cut it off when the load passed 3.5. The load average did not go down after iw was killed. Checking in top, the CPU was pretty evenly split between a kworker process and ksoftirqd, even with the scan terminated.

I've searched around, and while there are all manner of problems reported with getting various wireless configurations to work, no one seems to get tripped up at the scanning phase like this. Does anyone know of diagnostics I could try (or perhaps other scan tools?) to narrow down what is actually causing the CPU to get hammered?

Last edited by Gavster (2014-01-15 02:57:56)

Offline

#2 2014-01-15 02:57:25

Gavster
Member
From: Connecticut
Registered: 2012-11-07
Posts: 11

Re: Stuck interrupt when scanning for wireless networks (Athero chipset)

I got a chance to play around with this a bit more, trying wireless_tools this time:

% sudo iwlist wlan0 scan
wlan0    Failed to read scan data : Resource temporarily unavailable

As before, the load average then continues to increase until the system becomes unusable. This would lead me to believe that I have a driver or kernel issue, since that would be the commonality between the two tools.

The other interesting output is this:

% dmesg|tail
[  280.973316] ath5k: phy0: too many interrupts, giving up for now
[  280.989985] ath5k: phy0: too many interrupts, giving up for now
[  281.004548] ath5k: phy0: too many interrupts, giving up for now
[  281.019983] ath5k: phy0: too many interrupts, giving up for now
[  281.034543] ath5k: phy0: too many interrupts, giving up for now
[  281.049984] ath5k: phy0: too many interrupts, giving up for now
[  281.064543] ath5k: phy0: too many interrupts, giving up for now
[  281.079983] ath5k: phy0: too many interrupts, giving up for now
[  281.094544] ath5k: phy0: too many interrupts, giving up for now
[  281.109122] ath5k: phy0: too many interrupts, giving up for now

Looking at longer tails, this message repeats many many times, interspersed with:

net_ratelimit: 321 callbacks suppressed

With various values for 321. Some interrupt getting stuck would make sense for why the load average blows up, but I really don't know how to fix that ...

I verified on the ath5k site (http://wireless.kernel.org/en/users/Dri … rted_Chips) that my chip is supported:

% lspci
...
02:02.0 Ethernet controller: Qualcomm Atheros AR5211 Wireless Network Adapter [AR5001X 802.11ab] (rev 01)
...

Any tips for what might cause a stuck interrupt like that?

Offline

#3 2014-01-18 16:21:08

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Stuck interrupt when scanning for wireless networks (Athero chipset)

Hey, Gavster! This reminds me of a problem I had on an old Toshiba laptop a while back.

https://bbs.archlinux.org/viewtopic.php?id=101844

I WISH it was a Thinkpad... hmm

Offline

#4 2014-01-18 16:38:26

Gavster
Member
From: Connecticut
Registered: 2012-11-07
Posts: 11

Re: Stuck interrupt when scanning for wireless networks (Athero chipset)

I gave Hardy Heron a try, as you did, and the ath_pci module that kernel 2.6.24 used works like a champ. I doubt getting that module to build for 3.12 would be an easy task, but at least it confirms that my creaky old wireless card still works. Software problems are cheap!

Last edited by Gavster (2014-01-18 16:39:16)

Offline

#5 2014-01-18 20:53:53

Gavster
Member
From: Connecticut
Registered: 2012-11-07
Posts: 11

Re: Stuck interrupt when scanning for wireless networks (Athero chipset)

I uncovered this mailing list post (http://permalink.gmane.org/gmane.linux. … devel/5613) which appears to document exactly the sort of issue I'm having, and conveniently provides a patch! I applied the patch and rebuilt the kernel, but it doesn't seem to have had an effect on my particular issue. It does indicate that interrupt handling in the ath5k driver is still being developed, though, so hopefully there will be something in 3.13 or 3.14 that fixes it ...

Edit: The patch provided in that post doesn't actually appear to modify the file (I don't know enough about diff/patch to know why; assuming because it's made with the --git option?). I manually applied the 1 code line change though, and it still doesn't appear the be the fix.

Last edited by Gavster (2014-01-19 16:07:09)

Offline

#6 2014-01-19 20:51:44

Gavster
Member
From: Connecticut
Registered: 2012-11-07
Posts: 11

Re: Stuck interrupt when scanning for wireless networks (Athero chipset)

There is a similar bug on the kernel bugzilla (https://bugzilla.kernel.org/show_bug.cgi?id=49941). The guy in comment #5 proposes a different change to the same line as the gmane mailing list thread. This also doesn't correct my issue, but again is heartening that I'm not the only one with a Thinkpad whose wireless doesn't work with an up-to-date kernel.

In other news, I tried Ubuntu 10.04, 11.04 and 12.04 live CDs; my gen-1 Pentium M is missing enough features that 12.04 won't boot, but 11.04's 2.6.38 kernel uses the ath5k driver (vice the older ath_pci driver that 2.6.24 had) and successfully scans for networks. Comparing the versions (3.11: https://git.kernel.org/cgit/linux/kerne … ux-3.11.y) (2.6.38: https://git.kernel.org/cgit/linux/kerne … -2.6.38.y) of dma.c, the ath5k_hw_get_isr routine (which is where the gmane and bugzilla threads think the issue is) is totally different, so there's a lot of research to be done into what changes might be causing this issue.

Offline

Board footer

Powered by FluxBB