From patchwork Wed Aug 1 15:54:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 1265181 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 E8CF03FC81 for ; Wed, 1 Aug 2012 16:02:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751086Ab2HAQCT (ORCPT ); Wed, 1 Aug 2012 12:02:19 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:61939 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756036Ab2HAP67 (ORCPT ); Wed, 1 Aug 2012 11:58:59 -0400 Received: by mail-pb0-f46.google.com with SMTP id rp8so1286503pbb.19 for ; Wed, 01 Aug 2012 08:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=PcI9gFcMofhZAKPAJap3WLHyZ/BYDv5MT/QuTqPZIVw=; b=Q4goCuKZEMlVqX4Tn85Ggso/1G8Ee5t6AEIUBaL4f3BsEslJ1v+zA9fXvX5Ss5PRkP rEz9mPkD1jiORv342Aa52ZJw8U59Gwd7Qb2upuW8bXSkzQS3g0t3Wpgy/Du85v66Ael5 KrpXd20EaWhIqoO3UBDM1Ws994j2YzgrEkN6hJlh4qnVyKMB/g0XIFBEAamvKj8EGbzs Z+dzmiopEOddF7u17Ow2dLCdaihCTIKUK2P0XwIHuUzYuyn0mRsFp9ewz6GMP+/R36dJ pbRcBKGC8/KCF/WVcDYsoaaReJn1wGXSTYs+3JdoQmWWM0zow1cYPdlOOxBnhppfb/US Gvkw== Received: by 10.68.138.169 with SMTP id qr9mr53118416pbb.27.1343836738904; Wed, 01 Aug 2012 08:58:58 -0700 (PDT) Received: from localhost.localdomain ([58.250.81.2]) by mx.google.com with ESMTPS id pe8sm2816231pbc.76.2012.08.01.08.58.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Aug 2012 08:58:57 -0700 (PDT) From: Jiang Liu To: Bjorn Helgaas , Don Dutile , Jay Cliburn , Chris Snook Cc: Jiang Liu , Yinghai Lu , Taku Izumi , "Rafael J . Wysocki" , Kenji Kaneshige , Yijing Wang , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Jiang Liu Subject: [PATCH v3 23/32] PCI/atl1c: use PCIe capabilities access functions to simplify implementation Date: Wed, 1 Aug 2012 23:54:28 +0800 Message-Id: <1343836477-7287-24-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343836477-7287-1-git-send-email-jiang.liu@huawei.com> References: <1343836477-7287-1-git-send-email-jiang.liu@huawei.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Jiang Liu Use PCIe capabilities access functions to simplify atl1c driver's implementation. Signed-off-by: Jiang Liu --- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index 9cc1570..1b7e1ff 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c @@ -149,7 +149,7 @@ static void atl1c_reset_pcie(struct atl1c_hw *hw, u32 flag) data &= ~(PCI_ERR_UNC_DLP | PCI_ERR_UNC_FCP); pci_write_config_dword(pdev, pos + PCI_ERR_UNCOR_SEVER, data); /* clear error status */ - pci_write_config_word(pdev, pci_pcie_cap(pdev) + PCI_EXP_DEVSTA, + pci_pcie_capability_write_word(pdev, PCI_EXP_DEVSTA, PCI_EXP_DEVSTA_NFED | PCI_EXP_DEVSTA_FED | PCI_EXP_DEVSTA_CED |