Skip to content

Commit

Permalink
PCI: Add #defines for accessing PCIe DVSEC fields
Browse files Browse the repository at this point in the history
Add #defines for accessing Vendor ID, Revision, Length, and ID offsets
in the Designated Vendor Specific Extended Capability (DVSEC). Defined
in PCIe r5.0, sec 7.9.6.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
debox1 authored and intel-lab-lkp committed Oct 1, 2021
1 parent ef4bce9 commit 3ea1a5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/uapi/linux/pci_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,11 @@

/* Designated Vendor-Specific (DVSEC, PCI_EXT_CAP_ID_DVSEC) */
#define PCI_DVSEC_HEADER1 0x4 /* Designated Vendor-Specific Header1 */
#define PCI_DVSEC_HEADER1_VID(x) ((x) & 0xffff)
#define PCI_DVSEC_HEADER1_REV(x) (((x) >> 16) & 0xf)
#define PCI_DVSEC_HEADER1_LEN(x) (((x) >> 20) & 0xfff)
#define PCI_DVSEC_HEADER2 0x8 /* Designated Vendor-Specific Header2 */
#define PCI_DVSEC_HEADER2_ID(x) ((x) & 0xffff)

/* Data Link Feature */
#define PCI_DLF_CAP 0x04 /* Capabilities Register */
Expand Down

0 comments on commit 3ea1a5e

Please sign in to comment.