From patchwork Tue Jul 24 16:31:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 1232231 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 285943FD4F for ; Tue, 24 Jul 2012 16:37:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932182Ab2GXQhH (ORCPT ); Tue, 24 Jul 2012 12:37:07 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:39412 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932193Ab2GXQhE (ORCPT ); Tue, 24 Jul 2012 12:37:04 -0400 Received: by mail-pb0-f46.google.com with SMTP id rp8so12916328pbb.19 for ; Tue, 24 Jul 2012 09:37:04 -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=YEpLEhzXgGF1nj4DomWnl0Ptl53H3ZA9W1ggxugpNeAG37e8AgwRuAnZjKcOQHL59R 2jxQp2HflDLB/BtNrgUi6CxWaQVHZM1xjXOxxIbm34CvfuZSxSlOZyBnmnrYuWCacoMM TcDBDZLhol0M6HmKa9DRfIV3LYwFxPIFOF6UmE8MExSiDHOmEHtY0nPEffMQREDCXboh oeGvjkRaG7fAjRroEASEEfGOThOLYpCdStICZQrpcY2JLWE6h6GrUOMwHTmB9NOMkwu0 EYmwAqHWT1qHskcUAod/Y84PNjBnmWtQklPfa62daKe0aO3DWpMLBgGZYwyc+x1Olc/X uxgw== Received: by 10.68.202.136 with SMTP id ki8mr45741063pbc.65.1343147824327; Tue, 24 Jul 2012 09:37:04 -0700 (PDT) Received: from localhost.localdomain ([221.221.26.244]) by mx.google.com with ESMTPS id wi6sm12457583pbc.35.2012.07.24.09.36.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jul 2012 09:37:02 -0700 (PDT) From: Jiang Liu To: Bjorn Helgaas , Don Dutile 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: [RFC PATCH v2 23/32] PCI/atl1c: use PCIe capabilities access functions to simplify implementation Date: Wed, 25 Jul 2012 00:31:35 +0800 Message-Id: <1343147504-25891-24-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343147504-25891-1-git-send-email-jiang.liu@huawei.com> References: <1343147504-25891-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 |