From patchwork Sat Jun 19 15:32:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 106989 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5JFXAE7012861 for ; Sat, 19 Jun 2010 15:33:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756205Ab0FSPcv (ORCPT ); Sat, 19 Jun 2010 11:32:51 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:56850 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756157Ab0FSPcu (ORCPT ); Sat, 19 Jun 2010 11:32:50 -0400 Received: by fxm10 with SMTP id 10so1067257fxm.19 for ; Sat, 19 Jun 2010 08:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=Be5B/hJQs1yRB8sab9olksQMTbb1Ifr4xJXAFvDLlhk=; b=fcCJkCgQnTec/TzEPspPIDcWWm0ksJefdqdeO+PFtYOnR4DOERERmEBJoDemgRU5H1 eWy1xUsa6a/SOnQnDYVxRZM+SyzwRkl/ZSD/6wN0zt8MwD8SGWESCDBduZ0WUcWWPrVi XCM7jRlTv6yKZqlK/I/h3qdTPW+awWg9LnGH8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=iVugfJBVQY9NIG7fgZZkBxmYbudJyBBUBhPVRvVqw2sZrzaQf1jmF3J+4hee3VYpvK bhC/BtEf9JXv0fIU+xiRPWqnP0QwtjXEgCfOrMmrEB1hDkWmxSiwy1/2nnJfmkVvsxnm mwTKYPS9TBuHdB+8kz777WTN8HV4Wv9RDOhSI= Received: by 10.87.72.2 with SMTP id z2mr4464797fgk.29.1276961568559; Sat, 19 Jun 2010 08:32:48 -0700 (PDT) Received: from [10.1.0.2] ([77.126.14.181]) by mx.google.com with ESMTPS id d8sm4898390fga.26.2010.06.19.08.32.46 (version=SSLv3 cipher=RC4-MD5); Sat, 19 Jun 2010 08:32:47 -0700 (PDT) Subject: [PATCH v3] ath5k: disable ASPM From: Maxim Levitsky To: Bob Copeland Cc: Jussi Kivilinna , ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org, "Luis R. Rodriguez" , linux-kernel In-Reply-To: <1276952554.3332.3.camel@maxim-laptop> References: <20100528100901.14580.1322.stgit@fate.lan> <1276806785.20754.8.camel@maxim-laptop> <20100618112026.17623g6uhdjk8hts@naisho.dyndns.info> <1276856142.9114.1.camel@maxim-laptop> <20100618134930.124225d4fsi8w1fk@naisho.dyndns.info> <1276859156.19554.2.camel@maxim-laptop> <1276870309.23783.3.camel@maxim-laptop> <1276933774.16697.11.camel@maxim-laptop> <20100619123841.GA31838@hash.localnet> <1276952554.3332.3.camel@maxim-laptop> Date: Sat, 19 Jun 2010 18:32:44 +0300 Message-ID: <1276961564.5173.12.camel@maxim-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 19 Jun 2010 15:33:11 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 3abbe75..4f6bd7c 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -469,6 +470,19 @@ 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. + * Windows driver also disables the L0s ASPM, + * probably due to same reason + * 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");