From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Bob Copeland <me@bobcopeland.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>,
ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org,
"Luis R. Rodriguez" <mcgrof@bombadil.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH v2] ath5k: disable ASPM
Date: Sat, 19 Jun 2010 10:49:34 +0300 [thread overview]
Message-ID: <1276933774.16697.11.camel@maxim-laptop> (raw)
In-Reply-To: <1276870309.23783.3.camel@maxim-laptop>
On Fri, 2010-06-18 at 17:11 +0300, Maxim Levitsky wrote:
> On Fri, 2010-06-18 at 09:59 -0400, Bob Copeland wrote:
> > On Fri, Jun 18, 2010 at 7:05 AM, Maxim Levitsky <maximlevitsky@gmail.com> wrote:
> > >> Patch I made uses GPL code from e1000e, but since ath5k is
> > >> dual-licensed so patch can't be accepted. So if I got it right, patch
> > >> has to be remade from scratch by someone who really knows about pci
> > >> registers etc. I don't, and learning this to fix something that is
> > >> already fixed in my point of view is waste of (my) time.
> > > Sure, regardless of licensing, this patch has to be redone (and e1000
> > > with it)
> >
> > At any rate, Jussi, thanks a bundle for tracking it down. I owe you a
> > beer, lots of bugs have been reported on these devices.
> >
> > Maxim, this device was always broken in the same way, right? Just
> > curious if anything made it worse recently.
>
> Always was broken, of course even with madwifi.
>
> Recently I think driver stopped doing reset on RXORN, which sometimes
> helped. This did made things a bit worse.
>
> Anyway, just disable L0S, and card works perfectly.
How this patch?
Its same patch but without open coded ASPM disabler.
Of course to work therefore you need CONFIG_PCIEASPM.
Without it, this reduces to noop.
However I asked at linux-pci, and they said that its not a bad idea to
just remove CONFIG_PCIEASPM and make it default.
I hope there won't be a silly GPL vs BSD debate over one line of code...
commit ac5de416f822917b927958b21186a82141550da7
Author: Maxim Levitsky <maximlevitsky@gmail.com>
Date: Thu Jun 17 23:21:42 2010 +0300
ath5k: disable ASPM
Atheros card on 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.
Reproduced with pcie_aspm=force and by using 'nc < /dev/zero > /dev/null' at
both ends (usually stalls within seconds).
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 3abbe75..e7a189a 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>
@@ -469,6 +470,9 @@ ath5k_pci_probe(struct pci_dev *pdev,
int ret;
u8 csz;
+ /* Disable PCIE ASPM L0S. It is never enabled by windows driver */
+ 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");
@@ -722,6 +726,8 @@ static int ath5k_pci_resume(struct device *dev)
struct ieee80211_hw *hw = pci_get_drvdata(pdev);
struct ath5k_softc *sc = hw->priv;
+ pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
+
/*
* Suspend/Resume resets the PCI configuration space, so we have to
* re-disable the RETRY_TIMEOUT register (0x41) to keep
next prev parent reply other threads:[~2010-06-19 7:49 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100528100901.14580.1322.stgit@fate.lan>
[not found] ` <20100528212523.213125g8t0an4mn4@hayate.sektori.org>
[not found] ` <1275078476.18152.10.camel@mj>
[not found] ` <201005311006.15282.br1@einfach.org>
2010-06-01 20:43 ` [ath5k-devel] [PATCH] ath5k: disable ASPM Luis R. Rodriguez
[not found] ` <1276806785.20754.8.camel@maxim-laptop>
[not found] ` <20100618112026.17623g6uhdjk8hts@naisho.dyndns.info>
[not found] ` <1276856142.9114.1.camel@maxim-laptop>
[not found] ` <20100618134930.124225d4fsi8w1fk@naisho.dyndns.info>
2010-06-18 11:05 ` Maxim Levitsky
2010-06-18 13:59 ` Bob Copeland
2010-06-18 14:11 ` Maxim Levitsky
2010-06-19 7:49 ` Maxim Levitsky [this message]
2010-06-19 12:38 ` [PATCH v2] " Bob Copeland
2010-06-19 13:02 ` Maxim Levitsky
2010-06-19 15:32 ` [PATCH v3] " Maxim Levitsky
2010-07-26 20:13 ` [ath5k-devel] " Luis R. Rodriguez
2010-07-26 20:49 ` Maxim Levitsky
2010-07-26 21:06 ` Luis R. Rodriguez
2010-07-26 21:14 ` Matthew Garrett
2010-07-26 22:20 ` Luis R. Rodriguez
2010-07-26 22:24 ` Matthew Garrett
2010-07-26 22:29 ` Luis R. Rodriguez
2010-07-26 21:17 ` Maxim Levitsky
2010-07-26 21:25 ` Matthew Garrett
2010-07-26 22:15 ` Luis R. Rodriguez
2010-07-26 22:21 ` Matthew Garrett
2010-07-26 22:26 ` Luis R. Rodriguez
2010-07-26 22:29 ` Matthew Garrett
2010-07-26 22:31 ` Luis R. Rodriguez
2010-07-26 22:33 ` Matthew Garrett
2010-07-26 22:43 ` Luis R. Rodriguez
2010-07-26 22:50 ` Matthew Garrett
2010-07-27 9:35 ` Maxim Levitsky
2010-07-27 15:57 ` Luis R. Rodriguez
2010-07-28 23:48 ` Maxim Levitsky
2010-07-29 0:06 ` Luis R. Rodriguez
2010-07-26 22:13 ` Luis R. Rodriguez
2010-07-26 22:56 ` Luis R. Rodriguez
2010-06-20 8:13 ` [ath5k-devel] [PATCH v2] " Luis R. Rodriguez
2010-06-20 11:18 ` Maxim Levitsky
2010-06-20 18:04 ` Maxim Levitsky
2010-06-21 5:53 ` Luis R. Rodriguez
2010-06-21 20:01 ` Jussi Kivilinna
2010-06-21 20:16 ` Maxim Levitsky
2010-06-21 20:33 ` Jussi Kivilinna
2010-06-21 20:39 ` Luis R. Rodriguez
2010-06-22 16:31 ` Matthew Garrett
2010-06-22 16:48 ` Luis R. Rodriguez
2010-06-22 16:52 ` Matthew Garrett
2010-06-22 17:17 ` Luis R. Rodriguez
2010-06-22 17:25 ` Matthew Garrett
2010-06-22 17:40 ` Luis R. Rodriguez
2010-06-22 17:50 ` Matthew Garrett
2010-06-22 18:28 ` Luis R. Rodriguez
2010-06-22 18:44 ` Matthew Garrett
2010-06-22 19:13 ` Luis R. Rodriguez
2010-06-22 19:31 ` Johannes Stezenbach
2010-06-22 19:37 ` Luis R. Rodriguez
2010-06-22 19:38 ` Luis R. Rodriguez
2010-06-23 14:39 ` Johannes Stezenbach
2010-06-23 16:28 ` Luis R. Rodriguez
2010-06-23 19:07 ` Johannes Stezenbach
2010-06-23 19:23 ` Johannes Stezenbach
2010-06-21 20:37 ` Luis R. Rodriguez
2010-06-21 23:55 ` Maxim Levitsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1276933774.16697.11.camel@maxim-laptop \
--to=maximlevitsky@gmail.com \
--cc=ath5k-devel@venema.h4ckr.net \
--cc=jussi.kivilinna@mbnet.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@bombadil.infradead.org \
--cc=me@bobcopeland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox