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

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