linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Subject: [PATCH 2/2] PCI: add Vendor-Specific Extended Capability header info
Date: Fri, 13 Jul 2012 15:57:50 -0600	[thread overview]
Message-ID: <20120713215750.21756.21414.stgit@bhelgaas.mtv.corp.google.com> (raw)
In-Reply-To: <20120713215258.21756.42132.stgit@bhelgaas.mtv.corp.google.com>

This adds the fields in the Vendor-Specific Header: ID, Rev, and Length.
There may be multiple Vendor-Specific capabilities, so drivers should use
the VSEC ID to identify the one of interest.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 include/linux/pci_regs.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index 4b608f5..0f3e814 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -615,6 +615,12 @@
 #define PCI_PWR_CAP		12	/* Capability */
 #define  PCI_PWR_CAP_BUDGET(x)	((x) & 1)	/* Included in system budget */
 
+/* Vendor-Specific (VSEC, PCI_EXT_CAP_ID_VNDR) */
+#define PCI_VNDR_HEADER		4	/* Vendor-Specific Header */
+#define  PCI_VNDR_HEADER_ID(x)	((x) & 0xffff)
+#define  PCI_VNDR_HEADER_REV(x)	(((x) >> 16) & 0xf)
+#define  PCI_VNDR_HEADER_LEN(x)	(((x) >> 20) & 0xfff)
+
 /*
  * Hypertransport sub capability types
  *


  parent reply	other threads:[~2012-07-13 21:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13 21:57 [PATCH 0/2] Infrastructure for Vendor-Specific extended capabilities Bjorn Helgaas
2012-07-13 21:57 ` [PATCH 1/2] PCI: add pci_find_next_ext_capability() Bjorn Helgaas
2012-07-13 21:57 ` Bjorn Helgaas [this message]
2012-08-24 21:26 ` [PATCH 0/2] Infrastructure for Vendor-Specific extended capabilities 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=20120713215750.21756.21414.stgit@bhelgaas.mtv.corp.google.com \
    --to=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    /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).