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

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