From patchwork Wed Dec 5 20:58:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1843151 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 551DE3FCF2 for ; Wed, 5 Dec 2012 20:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964826Ab2LEU6Z (ORCPT ); Wed, 5 Dec 2012 15:58:25 -0500 Received: from mail-vc0-f202.google.com ([209.85.220.202]:46719 "EHLO mail-vc0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752984Ab2LEU6W (ORCPT ); Wed, 5 Dec 2012 15:58:22 -0500 Received: by mail-vc0-f202.google.com with SMTP id m8so583671vcd.1 for ; Wed, 05 Dec 2012 12:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=vot2qnS2WjLvKFpKCWTf/B6R3JoNVluhrRAVwNM1GHE=; b=iOQHpENa12MzKlC6J8C0vBzw0eMhK9xlcpEc0AnUA39+fYUxF2XAbmGDod8siIirOI T1ND3HBgn12TbxHndc3t6YpYYb9Zu7FNT33/l45btoWbpM9WoXwfYe3e4zm86Hp1KUa+ 5i663+/OArWVLMlyXsN5Vx6UrnDtdtwmHADpPSI8lEcBFdY9koJj4aKyEEPY8VsHt+tl 1+OKJCGkVLISrOt8CIOri0+qEM5OIRIxgjI9ucY8+sc8AHvpx0kw4lgfv+3rUi76N2XE oPVcemfkf1/0Q5DUXy0GwVIQxEoLSwOzD8/KZuE9m9blgmRncImzT+4ELeMd6DlkCf0h 0YLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=vot2qnS2WjLvKFpKCWTf/B6R3JoNVluhrRAVwNM1GHE=; b=OhR2hqIaUo3RAQN6791wLqr+D494UCHTqsKivUSY3DJfZT6idc1/7S+lProIfT/613 NFqM0DRxhqkygldcMlx4emVDK9/vZCYsUvaegRE4n+67dm5fx7A5j4/NjxoCdvVbs25W oz8dvUGIzJSka/238luLZDCszqp/MhhFUZdCr0Gm3a0zMSsY9kRMoVlbpIwiK14I4ore BDVLyNuOmQQ12aekN+3qAMthCKdoWT4ZvL43xbRWTfo/e7EPbyKWzPaW8o0fpsQ6IOcj 4bt+y44U1VfOJQo71w7SCWwsr0xLhMecnPGKSczv9ZRk5sCAGkJk4xX5MGOdj3eZUkZk hrdw== Received: by 10.236.78.199 with SMTP id g47mr11783276yhe.0.1354741102189; Wed, 05 Dec 2012 12:58:22 -0800 (PST) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id i63si474208yhk.5.2012.12.05.12.58.22 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 05 Dec 2012 12:58:22 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.17.131.112]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 1943D82004A; Wed, 5 Dec 2012 12:58:22 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id CA2FA180280; Wed, 5 Dec 2012 12:58:21 -0800 (PST) Subject: [PATCH 12/12] iwlwifi: Use standard #defines for PCIe Capability ASPM fields To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Intel Linux Wireless , linux-wireless@vger.kernel.org, "John W. Linville" , Johannes Berg , Wey-Yi Guy Date: Wed, 05 Dec 2012 13:58:21 -0700 Message-ID: <20121205205821.13851.59050.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20121205205724.13851.50508.stgit@bhelgaas.mtv.corp.google.com> References: <20121205205724.13851.50508.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkzvjeI+In5Jmt+yb57+N6h0AymNtDQ1rh5XgeaUj02IKo7G74AhqHkDQDZ8hzdlZkKFBh+o3aCXjiH+lTYag74BltEwbxJ8xLGfK6cOOSsom1FkKR02WSkpEGh8PMiCsJDD5B/NMxjDLz+tEYLKzXCxu/A60nRWRbXMftt1FrvQ7YesEGUMWd9B44UhQTiSkA6sNXZXSog4vW3356FHdxFbQkGhw== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Use the standard #defines rather than creating local definitions for PCIe Capability ASPM fields. Signed-off-by: Bjorn Helgaas CC: "John W. Linville" CC: Johannes Berg CC: Wey-Yi Guy CC: Intel Linux Wireless CC: linux-wireless@vger.kernel.org Acked-by: Johannes Berg --- drivers/net/wireless/iwlwifi/pcie/trans.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 5cd06b3..1dfa6be 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -670,8 +670,6 @@ static void iwl_set_pwr_vmain(struct iwl_trans *trans) /* PCI registers */ #define PCI_CFG_RETRY_TIMEOUT 0x041 -#define PCI_CFG_LINK_CTRL_VAL_L0S_EN 0x01 -#define PCI_CFG_LINK_CTRL_VAL_L1_EN 0x02 static void iwl_apm_config(struct iwl_trans *trans) { @@ -688,8 +686,7 @@ static void iwl_apm_config(struct iwl_trans *trans) */ pcie_capability_read_word(trans_pcie->pci_dev, PCI_EXP_LNKCTL, &lctl); - if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == - PCI_CFG_LINK_CTRL_VAL_L1_EN) { + if (lctl & PCI_EXP_LNKCTL_ASPM_L1) { /* L1-ASPM enabled; disable(!) L0S */ iwl_set_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED); dev_printk(KERN_INFO, trans->dev, @@ -700,7 +697,7 @@ static void iwl_apm_config(struct iwl_trans *trans) dev_printk(KERN_INFO, trans->dev, "L1 Disabled; Enabling L0S\n"); } - trans->pm_support = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); + trans->pm_support = !(lctl & PCI_EXP_LNKCTL_ASPM_L0S); } /*