Patchwork [2/2] PCI: add Vendor-Specific Extended Capability header info

login
register
mail settings
Submitter Bjorn Helgaas
Date July 13, 2012, 9:57 p.m.
Message ID <20120713215750.21756.21414.stgit@bhelgaas.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/170972/
State Accepted
Headers show

Comments

Bjorn Helgaas - July 13, 2012, 9:57 p.m.
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(-)


--
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

Patch

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
  *