From patchwork Sat Jun 19 07:49:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 106970 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 o5J7oBHY008208 for ; Sat, 19 Jun 2010 07:50:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753986Ab0FSHtl (ORCPT ); Sat, 19 Jun 2010 03:49:41 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:34839 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753853Ab0FSHtk (ORCPT ); Sat, 19 Jun 2010 03:49:40 -0400 Received: by fxm10 with SMTP id 10so926415fxm.19 for ; Sat, 19 Jun 2010 00:49:38 -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=Mx49+A80Z5UmynXRH6qipupozWUUOWM5Jz/3oMvwTZ4=; b=ODmuk1UdXJT42R30+LOgSweMjqbacMlBbRdGcqnrQCo+HYUvthugW+gobg7D3Gr1Eh na4lHYG+9L8CPYR1Yu2HmZgGrTp/SIclSXrIj1Dqx7cUY2hAu81IDtUOwlFhCk01jLaO ualiHHsw8nnvBtquUlmBQfEtneHguRPHYYpTQ= 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=f3RSie5SjORC+T17vMz2cbLShH/mH40Xe0duAKPB4ji1vyg7L/bJS1/F9Fj+ONEbIP xNOrAjGQJVaWlj9CTEa3JMl+FQK4nmRmJxodXu15CtL2nczy/YnqVF84X+EizJwIM4Ne jzjR5BIcH+dq5jFT8yJJHvZnZbHXA+P/58D1Y= Received: by 10.223.127.212 with SMTP id h20mr1797324fas.89.1276933777570; Sat, 19 Jun 2010 00:49:37 -0700 (PDT) Received: from [10.1.0.2] ([77.126.14.181]) by mx.google.com with ESMTPS id a3sm19684344fak.40.2010.06.19.00.49.35 (version=SSLv3 cipher=RC4-MD5); Sat, 19 Jun 2010 00:49:36 -0700 (PDT) Subject: [PATCH v2] 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: <1276870309.23783.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> Date: Sat, 19 Jun 2010 10:49:34 +0300 Message-ID: <1276933774.16697.11.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 07:50:11 +0000 (UTC) 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 #include #include +#include #include #include #include @@ -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