Commit 80b3485f authored by David E. Box's avatar David E. Box Committed by Greg Kroah-Hartman
Browse files

PCI: Add #defines for accessing PCIe DVSEC fields



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.

Reviewed-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarDavid E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20211208015015.891275-2-david.e.box@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 79f1c730
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1086,7 +1086,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 */