From: Myron Stowe <myron.stowe@redhat.com>
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
Subject: [PATCH 1/2] PCI: introduce accessor to retrieve PCIe Capabilities Register
Date: Fri, 25 Jan 2013 17:55:39 -0700 [thread overview]
Message-ID: <20130126005539.25808.86935.stgit@amt.stowe> (raw)
In-Reply-To: <20130126005533.25808.23022.stgit@amt.stowe>
Provide an accessor to retrieve the PCI Express device's Capabilities
Register.
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
---
include/linux/pci.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
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
*/
next prev parent reply other threads:[~2013-01-26 0:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-26 0:55 [PATCH 0/2] Extend interfaces to access PCIe capabilities registers Myron Stowe
2013-01-26 0:55 ` Myron Stowe [this message]
2013-01-26 0:55 ` [PATCH 2/2] PCI: Use PCI Express Capability accessors Myron Stowe
2013-01-31 4:29 ` [PATCH 0/2] Extend interfaces to access PCIe capabilities registers Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130126005539.25808.86935.stgit@amt.stowe \
--to=myron.stowe@redhat.com \
--cc=bhelgaas@google.com \
--cc=jiang.liu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
--cc=mcgrof@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).