Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Working around 3.x kernel ath5k disconnects
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Wed May 30, 2012 12:46 am    Post subject: Working around 3.x kernel ath5k disconnects Reply with quote

I apologize if this is in the wrong place. Please move if appropriate.

It seems to be a widespread problem with the 3.x kernels that the ath5k module periodically disconnects and leaves messages about a gain calibration timeout, for me this seems to have been associated with high internet usage. There is a workaround for those interested:

Add pcie_aspm=force to the kernel command line.

I tested this by downloading some data unnecessary data (Ubuntu iso ~700 mb) and so far this workaround has been stable.

EDIT: After a few weeks, I can say this did not entirely solve the problem, but it does make the failures much less frequent. I have only had it happen once or twice since I did this.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.


Last edited by The Doctor on Mon Jun 11, 2012 6:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon Jun 11, 2012 2:09 pm    Post subject: Reply with quote

penguin ...

I've been using 3.x kernels for a while and haven't had this particular issue.

Code:
% uname -r
3.2.12-gentoo
% lspci | awk '/Atheros/'
02:00.0 Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)
% dmesg | awk '/Atheros/'
ath5k phy0: Atheros AR5414 chip found (MAC: 0xa3, PHY: 0x61)


This may be an issue with a specific chipset, but anyhow, I'm sure those that have this problem will recognise the symptoms so I'm being somwhat redundant.

best ... khay
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Mon Jun 11, 2012 6:51 pm    Post subject: Reply with quote

Thats interesting.

Here is what my lspci spits out:
Code:
01:03.0 Ethernet controller: Atheros Communications Inc. AR5413/AR5414 Wireless Network Adapter [AR5006X(S) 802.11abg] (rev 01)


So it looks like we don't have quite the same card.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon Jun 11, 2012 8:13 pm    Post subject: Reply with quote

Penguin ...

Yes, your seems to be a more recent card ... they are both 'abg' however.

Code:
% awk '{RS="\n\n"}/Atheros/{print}' <(lspci -v)
02:00.0 Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)
        Subsystem: Apple Computer Inc. AR5BXB6 802.11abg Wireless Mini PCIe Card
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at 90100000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 2
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [90] MSI-X: Enable- Count=1 Masked-
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Kernel driver in use: ath5k
        Kernel modules: ath5k
Back to top
View user's profile Send private message
Steve_Mac_G
n00b
n00b


Joined: 13 Dec 2005
Posts: 19
Location: MiddleEarth

PostPosted: Tue Jul 17, 2012 7:34 am    Post subject: Re: Working around 3.x kernel ath5k disconnects Reply with quote

Hi Guys

I have the same Problem with my ath5k (Kernel 3.2.12)

This is my Device:
Code:
arwen ~ # lspci -v -s 02:00.0
02:00.0 Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)
   Subsystem: Askey Computer Corp. Device 7131
   Flags: bus master, fast devsel, latency 0, IRQ 16
   Memory at f0100000 (64-bit, non-prefetchable) [size=64K]
   Capabilities: [40] Power Management version 2
   Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
   Capabilities: [60] Express Legacy Endpoint, MSI 00
   Capabilities: [90] MSI-X: Enable- Count=1 Masked-
   Capabilities: [100] Advanced Error Reporting
   Capabilities: [140] Virtual Channel
   Kernel driver in use: ath5k


I've searched long for a Solution but didn't found any working .... Till now!

penguin swordmaster wrote:
...

Add pcie_aspm=force to the kernel command line.

...


works for me to :D, the connection to my Router is now up since over a day instead of maximum 5 min.

Thanks for the Post Penguin Swordmaster :thumbsup:



Peace
Steve
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jul 17, 2012 3:00 pm    Post subject: Reply with quote

all ...

oddly I have the exact same card as Steve_Mac_G and have never experienced this issue, including with 3.2.12-gentoo which I used for some time.

Code:
02:00.0 Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)
        Subsystem: Apple Inc. AR5BXB6 802.11abg Wireless Mini PCIe Card
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at 90100000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 2
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [90] MSI-X: Enable- Count=1 Masked-
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Kernel driver in use: ath5k
        Kernel modules: ath5k

best ... khay
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Tue Jul 17, 2012 3:56 pm    Post subject: Reply with quote

The kernel parameter pcie_aspm=force activate the Active-State Power Management for all PCIe devices even if they do not support Aspm. It do not take in account the devices performances result. This is what the /usr/src/linux/Documentation/kernel-prameters.txt say:
Code:
pcie_aspm=      [PCIE] Forcibly enable or disable PCIe Active State Power
                        Management.
                off     Disable ASPM.
                force   Enable ASPM even on devices that claim not to support it.
                        WARNING: Forcing ASPM on may cause system lockups.

Devices who do not support PCIe ASPM can make a system lockup. It's the reason for the warning. All devices connected to PCIe have to support ASPM to advoid lokups.

Me I use on a desktop computer the pci_aspm=off by the way of
Code:
echo performance > /sys/module/pcie_aspm/parameters/policy


The policy can be one of default (BIOS, EFI, Coreboot, etc settings for all devices), powersave and performance. The one in brakets [] is the active one.

Disable pcie_aspm make the devices connected to PCIe have the best performances. You can try pcie_aspm=off for test and compare with the other policys.
_________________
Paul
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jul 17, 2012 4:39 pm    Post subject: Reply with quote

paul ... thanks for the info, this may explain why Steve_Mac_G has the issue and me not, pcie_aspm/parameters/policy is currently [default] and so set via EFI ...

best ... khay
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Tue Jul 17, 2012 6:02 pm    Post subject: Reply with quote

Hi everybody,
I check. I pass pcie_aspm=off at the kernel command line and /sys/module/pcie_aspm/parameters/policy is default. So It look that the pcie_aspm kernel parameter do not change the policy in sysfs. So, to change the aspm policy I continue to work with the /sys directory.
_________________
Paul
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum