linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Create sysfs entries for PCI VPDI and VPDR tags
@ 2016-02-18 20:31 Jordan Hargrave
  2016-04-10 21:27 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Jordan Hargrave @ 2016-02-18 20:31 UTC (permalink / raw)
  To: jordan_hargrave, bhelgaas, Jordan_Hargrave
  Cc: alexander.duyck, linux-pci, babu.moger, hare, linux-kernel,
	jharg93, Jordan Hargrave

The VPD-R is a readonly area of the PCI Vital Product Data region.
There are some standard keywords for serial number, manufacturer,
and vendor-specific values.  Dell Servers use a vendor-specific
tag to store number of ports and port mapping of partitioned NICs.

info = VPD-Info string
PN = Part Number
SN = Serial Number
MN = Manufacturer ID
Vx = Vendor-specific (x=0..9 A..Z)

This creates a sysfs subdirectory in the pci device: vpdattr with
'info', 'EC', 'SN', 'V0', etc. files containing the tag values.

Added pci.h patch

Signed-off-by: Jordan Hargrave <Jordan_Hargrave@dell.com>
---
 include/linux/pci.h     |   3 +
 1 files changed, 3 insertions(+)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 8135a2f..c1313b1 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -372,6 +372,9 @@ struct pci_dev {
 	const struct attribute_group **msi_irq_groups;
 #endif
 	struct pci_vpd *vpd;
+	int vpdr_len;
+	u8 *vpdr_data;
+	char *vpdi_data;
 #ifdef CONFIG_PCI_ATS
 	union {
 		struct pci_sriov *sriov;	/* SR-IOV capability related */
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-10 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 20:31 [PATCH 2/2] Create sysfs entries for PCI VPDI and VPDR tags Jordan Hargrave
2016-04-10 21:27 ` Bjorn Helgaas

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