From patchwork Wed Dec 5 20:58:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1843161 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 D6A0640B17 for ; Wed, 5 Dec 2012 20:58:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753193Ab2LEU6W (ORCPT ); Wed, 5 Dec 2012 15:58:22 -0500 Received: from mail-fa0-f74.google.com ([209.85.161.74]:35926 "EHLO mail-fa0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754200Ab2LEU6S (ORCPT ); Wed, 5 Dec 2012 15:58:18 -0500 Received: by mail-fa0-f74.google.com with SMTP id t1so391578fae.1 for ; Wed, 05 Dec 2012 12:58:17 -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=67FVTLmF0Fv0f23WRqFa8iprR2YOHpUgfH5yr4xKb0o=; b=JiISlDxjuvg7vRTXsIe8ena94a4fTDGN+FYochdNlGYMTknAQno3f7CRKTso/Bp3OE /othj3ov2MVgqVrfI0X8SmOveOp2prwxnk72gIDpFlC8iBQ+LVeZYnpZVwO5+Dd1WXEa u7k+i5H6hK5msQVU1J1pyXXFbg+MvyCnHr1AKFGO9VwiL7Fyj6bh9231estQvW0WJJn9 jj/9ztn8LR8z4Jafh8jvAZ0ZDc1h+sNv66qe8k9waRP3La0Vg7VKwzjrPXZ+4QpXYc7o p1MreRqiqhNgL0EiWoLahsDtFdZOedzwHjBaGwzX4XZxMCVIpdIzGda6A/9Ux25q04Mo 4MWA== 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=67FVTLmF0Fv0f23WRqFa8iprR2YOHpUgfH5yr4xKb0o=; b=fyC1dFxHbI5cqI33SNvHSBb1L2s8rCvDWvhZdO1alsrLWA1ojFI8yjjg9MGQVIzTkj ueclJGh3NnfPSdHi9/Rijo0vVrx+NVsLLyTGx54/4CEL9YWwhbdYh0YM2DX7Fh7sG9o9 xjBvxXOUAaJFjbj6WwikWvUwGavKQ7uoiY6Bce1jFe4wIIH9rxqth7MH3lD10TuAEo2H b0w0uIi+/KlJOk6uBmr9K8/BHScwNQgKNnBomV3p4hywF9fiPo18dufH0HqMoPxw8m/u TjmlkY8RELW76m+akM3VYw4XHNd4DArQHQNERcickv8zApbmjtnWApLurAZkIZ50Qjp+ QZVA== Received: by 10.14.204.199 with SMTP id h47mr10436103eeo.4.1354741097657; Wed, 05 Dec 2012 12:58:17 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id z44si1689687een.0.2012.12.05.12.58.17 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 05 Dec 2012 12:58:17 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.17.131.112]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 4BD94200059; Wed, 5 Dec 2012 12:58:17 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id A73C3180280; Wed, 5 Dec 2012 12:58:16 -0800 (PST) Subject: [PATCH 11/12] iwlegacy: Use standard #defines for PCIe Capability ASPM fields To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: linux-wireless@vger.kernel.org, Stanislaw Gruszka , "John W. Linville" Date: Wed, 05 Dec 2012 13:58:16 -0700 Message-ID: <20121205205816.13851.86504.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: ALoCoQm62rdRb2YS89bQoMWZbvBytePbgTv6kfajPRqPM78M+dmHYkL4+tGhEcL6s8x12tsv7k2LxRb4m8R3Hv0dVfPzw2aCcFnFHtAzf/XO9oP9CN9gRULrSaWzHLufVtwYD5+DWJAU7MviKECGbX/b666fpJGKvbMMKdFoCvqMhhHdsIjRMBwc219JcEVn484CeS6zjprUTdI+L/YOvBnOXpHxbZP5Kg== 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: Stanislaw Gruszka CC: linux-wireless@vger.kernel.org Acked-by: Stanislaw Gruszka --- drivers/net/wireless/iwlegacy/4965.h | 4 ---- drivers/net/wireless/iwlegacy/common.c | 5 ++--- drivers/net/wireless/iwlegacy/common.h | 4 ---- 3 files changed, 2 insertions(+), 11 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/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h index 2d092f3..1b15b0b 100644 --- a/drivers/net/wireless/iwlegacy/4965.h +++ b/drivers/net/wireless/iwlegacy/4965.h @@ -917,10 +917,6 @@ struct il4965_scd_bc_tbl { /* PCI registers */ #define PCI_CFG_RETRY_TIMEOUT 0x041 -/* PCI register values */ -#define PCI_CFG_LINK_CTRL_VAL_L0S_EN 0x01 -#define PCI_CFG_LINK_CTRL_VAL_L1_EN 0x02 - #define IL4965_DEFAULT_TX_RETRY 15 /* EEPROM */ diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 1811507..7e16d10 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c @@ -1186,7 +1186,7 @@ il_power_initialize(struct il_priv *il) u16 lctl; pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl); - il->power_data.pci_pm = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); + il->power_data.pci_pm = !(lctl & PCI_EXP_LNKCTL_ASPM_L0S); il->power_data.debug_sleep_level_override = -1; @@ -4235,8 +4235,7 @@ il_apm_init(struct il_priv *il) */ if (il->cfg->set_l0s) { pcie_capability_read_word(il->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 */ il_set_bit(il, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED); diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index c9a5022..e181f3b 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h @@ -2426,10 +2426,6 @@ struct il_tfd { /* PCI registers */ #define PCI_CFG_RETRY_TIMEOUT 0x041 -/* PCI register values */ -#define PCI_CFG_LINK_CTRL_VAL_L0S_EN 0x01 -#define PCI_CFG_LINK_CTRL_VAL_L1_EN 0x02 - struct il_rate_info { u8 plcp; /* uCode API: RATE_6M_PLCP, etc. */ u8 plcp_siso; /* uCode API: RATE_SISO_6M_PLCP, etc. */