File add-decoding-of-vendor-specific-vpd-fields.patch of Package pciutils.8028

From bfaf05dd9f4ca42643d194c48a9804dacb7200c8 Mon Sep 17 00:00:00 2001
From: John Walthour <return.0@me.com>
Date: Mon, 18 Jun 2018 15:57:06 -0500
Subject: [PATCH v2] pciutils: Add decoding of vendor specific VPD fields

IBM has defined several VPD fields that are not part of the PCI
spec, but are frequently used on embedded and pluggable pcie
adapters.

Since these fields are "Unknown", they are listed in hex
and less readable.

This patch adds commonly used vendor specific VPD keywords
described in "Table 160. LoPAPR VPD Fields" of the Linux on Power
Architecture Platform Reference (LoPAPR).

Signed-off-by: John Walthour <return.0@me.com>
---
Change v1->v2:
 - Marked added fields as non-standard
 - Added additional vendor fields NA and RM


 ls-vpd.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/ls-vpd.c b/ls-vpd.c
index b79abfc..cc279c3 100644
--- a/ls-vpd.c
+++ b/ls-vpd.c
@@ -41,6 +41,19 @@ static const struct vpd_item {
   { 'Y','A', F_TEXT,	"Asset tag" },
   { 'V', 0 , F_TEXT,	"Vendor specific" },
   { 'Y', 0 , F_TEXT,	"System specific" },
+/*
+ *  The following VPD keywords are vendor specific or not part of any
+ *  current PCI-SIG specification
+ */
+  { 'C','C', F_TEXT,   "CCIN" },
+  { 'F','C', F_TEXT,   "Feature code" },
+  { 'F','N', F_TEXT,   "FRU" },
+  { 'N','A', F_TEXT,   "Network address" },
+  { 'R','M', F_TEXT,   "Firmware version" },
+  { 'Z', 0 , F_TEXT,   "Product specific" },
+/*
+ *  End vendor specific VPD keywords
+ */
   {  0,  0 , F_BINARY,	"Unknown" }
 };
 
-- 
2.15.1 (Apple Git-101)

openSUSE Build Service is sponsored by