[Bug 369005] Re: ath5k : disconnection / slow network - "unsupported jumbo" error

Roman Yepishev roman.yepishev at canonical.com
Sat Aug 7 19:48:22 UTC 2010


https://lists.ath5k.org/pipermail/ath5k-devel/2010-August/004028.html

Atheros PCIe wireless cards handled by ath5k, don't work well with PCIe
ASPM L0s enabled.

For example,  Acer Aspire One (AOA150, Atheros Communications Inc. AR5001
Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well with ASPM
enabled. With ASPM ath5k will eventually stall on heavy traffic with often
'unsupported jumbo' warnings appearing. Disabling ASPM L0s in ath5k fixes
these problems.

Also card sends a storm of RXORN interrupts even though medium is idle.
According to vendor, all PCIe ath5k supported cards should have L0s disabled.
Also, its safe to reenable L1, even if device is pre 1.1 PCIe device, in which case
kernel ASPM code unconditionaly disables L0s/L1.

you must have CONFIG_PCIEASPM enabled, or otherwise this patch reduces to no-op.
Note that usually this patch will do nothing anyway, because as soon as CONFIG_PCIEASPM
is enabled, Linux will usualy disable ASPM on this device due to it beeing a 'Legacy' PCIE
device. This patch ensures that L0s is always disabled regardless of that 'Legacy' setting

All credit for finding and fixing that bug,
goes to Jussi Kivilinna <jussi.kivilinna at mbnet.fi>


Signed-off-by: Maxim Levitsky <maximlevitsky at gmail.com>
---
 drivers/net/wireless/ath/ath5k/base.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 648972d..d691325 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -48,6 +48,7 @@
 #include <linux/netdevice.h>
 #include <linux/cache.h>
 #include <linux/pci.h>
+#include <linux/pci-aspm.h>
 #include <linux/ethtool.h>
 #include <linux/uaccess.h>
 #include <linux/slab.h>
@@ -472,6 +473,18 @@ ath5k_pci_probe(struct pci_dev *pdev,
 	int ret;
 	u8 csz;
 
+	/*
+	 * Disable PCIE ASPM L0S on the card.
+	 * ASPM triggers hardware bug, that makes card stall transmission
+	 * untill reset, and even that doesn't always help.
+	 * This happens on meduim to heavy transmit utilization.
+	 * In addition to stall, hardware usually gives a storm of
+	 * RXORN interrupts, despite idle channel, and otherwise doesn't work.
+	 * According to vendor, indeed L0s must be disabled.
+	 * Note: to benefit from this fix, please _enable_ CONFIG_PCIEASPM
+	 */
+	pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
+
 	ret = pci_enable_device(pdev);
 	if (ret) {
 		dev_err(&pdev->dev, "can't enable device\n");
-- 
1.7.0.4

-- 
ath5k : disconnection / slow network - "unsupported jumbo" error
https://bugs.launchpad.net/bugs/369005
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux in ubuntu.




More information about the kernel-bugs mailing list