From adf8a6268169eae93e4f8176b54ffd191d04ee76 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 14 Oct 2020 14:18:43 +0200 Subject: Revert "updating system slot types with smbios spec 3.4.0" This reverts commit 85a05114311a78c493eeb6c9b664b22c0d1c2e35. This change was not properly reviewed before being committed and introduces a regression, in addition to having coding style issues. --- dmidecode.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'dmidecode.c') diff --git a/dmidecode.c b/dmidecode.c index cf32821..981fe96 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -1935,15 +1935,10 @@ static const char *dmi_slot_type(u8 code) "PCI Express 3 SFF-8639", "PCI Express Mini 52-pin with bottom-side keep-outs", "PCI Express Mini 52-pin without bottom-side keep-outs", - "PCI Express Mini 76-pin" - "PCI Express Gen 4 SFF-8639 (U.2)", - "PCI Express Gen 5 SFF-8639 (U.2)", - "OCP NIC 3.0 Small Form Factor (SFF)", - "OCP NIC 3.0 Large Form Factor (LFF)", - "OCP NIC Prior to 3.0", - out_of_spec, /* 0x29 */ + "PCI Express Mini 76-pin" /* 0x23 */ + }; + static const char *type_0x30[] = { "CXL FLexbus 1.0" /* 0x30 */ - }; static const char *type_0xA0[] = { "PC-98/C20", /* 0xA0 */ @@ -1982,8 +1977,10 @@ static const char *dmi_slot_type(u8 code) * function dmi_slot_id below needs updating too. */ - if (code >= 0x01 && code <= 0x30) + if (code >= 0x01 && code <= 0x23) return type[code - 0x01]; + if (code == 0x30) + return type_0x30[code - 0x30]; if (code >= 0xA0 && code <= 0xBD) return type_0xA0[code - 0xA0]; return out_of_spec; -- cgit v1.2.1