diff mbox

[2/2] Create sysfs entries for PCI VPDI and VPDR tags

Message ID 1455827464-11398-1-git-send-email-Jordan_Hargrave@dell.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Jordan_Hargrave@Dell.com Feb. 18, 2016, 8:31 p.m. UTC
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(+)

Comments

Bjorn Helgaas April 10, 2016, 9:27 p.m. UTC | #1
On Thu, Feb 18, 2016 at 02:31:04PM -0600, Jordan Hargrave wrote:
> 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;

This should be squashed into the patch that uses the fields you're adding.

>  #ifdef CONFIG_PCI_ATS
>  	union {
>  		struct pci_sriov *sriov;	/* SR-IOV capability related */
> -- 
> 2.5.0
> 
--
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
diff mbox

Patch

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