Blame SOURCES/0001-dmidecode-Add-new-system-slot-types-from-SMBIOS-spec.patch

78a694
From 4360445023d63e6263d63deb15e9e4c2f722b645 Mon Sep 17 00:00:00 2001
78a694
From: Jean Delvare <jdelvare@suse.de>
78a694
Date: Wed, 21 Oct 2020 15:24:40 +0200
78a694
Subject: [PATCH 1/3] dmidecode: Add new system slot types from SMBIOS spec
78a694
 3.4.0
78a694
78a694
Based on an earlier patch from Prabhakar Pujeri (Dell).
78a694
78a694
Version 3.4.0 of the SMBIOS specification adds 14 new system slot
78a694
types and updates 2 (DMI type 9).
78a694
78a694
Signed-off-by: Jean Delvare <jdelvare@suse.de>
78a694
---
78a694
 dmidecode.c | 26 ++++++++++++++++++++------
78a694
 1 file changed, 20 insertions(+), 6 deletions(-)
78a694
78a694
diff --git a/dmidecode.c b/dmidecode.c
78a694
index 48ebf9dcdf65..7da2b12e3b98 100644
78a694
--- a/dmidecode.c
78a694
+++ b/dmidecode.c
78a694
@@ -1816,11 +1816,16 @@ static const char *dmi_slot_type(u8 code)
78a694
 		"MXM Type IV",
78a694
 		"MXM 3.0 Type A",
78a694
 		"MXM 3.0 Type B",
78a694
-		"PCI Express 2 SFF-8639",
78a694
-		"PCI Express 3 SFF-8639",
78a694
+		"PCI Express 2 SFF-8639 (U.2)",
78a694
+		"PCI Express 3 SFF-8639 (U.2)",
78a694
 		"PCI Express Mini 52-pin with bottom-side keep-outs",
78a694
 		"PCI Express Mini 52-pin without bottom-side keep-outs",
78a694
-		"PCI Express Mini 76-pin" /* 0x23 */
78a694
+		"PCI Express Mini 76-pin"
78a694
+		"PCI Express 4 SFF-8639 (U.2)",
78a694
+		"PCI Express 5 SFF-8639 (U.2)",
78a694
+		"OCP NIC 3.0 Small Form Factor (SFF)",
78a694
+		"OCP NIC 3.0 Large Form Factor (LFF)",
78a694
+		"OCP NIC Prior to 3.0" /* 0x28 */
78a694
 	};
78a694
 	static const char *type_0x30[] = {
78a694
 		"CXL FLexbus 1.0" /* 0x30 */
78a694
@@ -1855,18 +1860,27 @@ static const char *dmi_slot_type(u8 code)
78a694
 		"PCI Express 4 x2",
78a694
 		"PCI Express 4 x4",
78a694
 		"PCI Express 4 x8",
78a694
-		"PCI Express 4 x16" /* 0xBD */
78a694
+		"PCI Express 4 x16",
78a694
+		"PCI Express 5",
78a694
+		"PCI Express 5 x1",
78a694
+		"PCI Express 5 x2",
78a694
+		"PCI Express 5 x4",
78a694
+		"PCI Express 5 x8",
78a694
+		"PCI Express 5 x16",
78a694
+		"PCI Express 6+",
78a694
+		"EDSFF E1",
78a694
+		"EDSFF E3" /* 0xC6 */
78a694
 	};
78a694
 	/*
78a694
 	 * Note to developers: when adding entries to these lists, check if
78a694
 	 * function dmi_slot_id below needs updating too.
78a694
 	 */
78a694
 
78a694
-	if (code >= 0x01 && code <= 0x23)
78a694
+	if (code >= 0x01 && code <= 0x28)
78a694
 		return type[code - 0x01];
78a694
 	if (code == 0x30)
78a694
 		return type_0x30[code - 0x30];
78a694
-	if (code >= 0xA0 && code <= 0xBD)
78a694
+	if (code >= 0xA0 && code <= 0xC6)
78a694
 		return type_0xA0[code - 0xA0];
78a694
 	return out_of_spec;
78a694
 }
78a694
-- 
78a694
2.17.1
78a694