From patchwork Sat Jan 26 00:55:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Myron Stowe X-Patchwork-Id: 215878 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41D842C0096 for ; Sat, 26 Jan 2013 11:56:19 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754931Ab3AZAzx (ORCPT ); Fri, 25 Jan 2013 19:55:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48935 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754026Ab3AZAzp (ORCPT ); Fri, 25 Jan 2013 19:55:45 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0Q0te5Z023565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 25 Jan 2013 19:55:40 -0500 Received: from amt.stowe (ovpn-113-33.phx2.redhat.com [10.3.113.33]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0Q0tdC9009134; Fri, 25 Jan 2013 19:55:39 -0500 From: Myron Stowe Subject: [PATCH 1/2] PCI: introduce accessor to retrieve PCIe Capabilities Register To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, jiang.liu@huawei.com, mcgrof@qca.qualcomm.com, mcgrof@do-not-panic.com, linux-kernel@vger.kernel.org Date: Fri, 25 Jan 2013 17:55:39 -0700 Message-ID: <20130126005539.25808.86935.stgit@amt.stowe> In-Reply-To: <20130126005533.25808.23022.stgit@amt.stowe> References: <20130126005533.25808.23022.stgit@amt.stowe> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Provide an accessor to retrieve the PCI Express device's Capabilities Register. Signed-off-by: Myron Stowe --- include/linux/pci.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 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/include/linux/pci.h b/include/linux/pci.h index 15472d6..78581e1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1693,6 +1693,15 @@ static inline bool pci_is_pcie(struct pci_dev *dev) } /** + * pcie_caps_reg - get the PCIe Capabilities Register + * @dev: PCI device + */ +static inline u16 pcie_caps_reg(const struct pci_dev *dev) +{ + return dev->pcie_flags_reg; +} + +/** * pci_pcie_type - get the PCIe device/port type * @dev: PCI device */