Skip to content

Commit

Permalink
dmidecode: Add Mini PCIe system slot enumerated values
Browse files Browse the repository at this point in the history
Add 3 new enumerated values for system slots from SMBIOS specification
version 3.1.0.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
  • Loading branch information
jdelvare committed Apr 27, 2017
1 parent 2bd3185 commit c3fd5fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* dmidecode.c: Decode the MIDR register on ARM processors
(DMI type 4).
* dmidecode.c: Add support for large cache sizes (DMI type 7).
* dmidecode.c: Add Mini PCIe system slot enumerated values
(DMI type 9).

2017-04-11 Jean Delvare <jdelvare@suse.de>

Expand Down
10 changes: 8 additions & 2 deletions dmidecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,10 @@ static const char *dmi_slot_type(u8 code)
"MXM 3.0 Type A",
"MXM 3.0 Type B",
"PCI Express 2 SFF-8639",
"PCI Express 3 SFF-8639" /* 0x20 */
"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" /* 0x23 */
};
static const char *type_0xA0[] = {
"PC-98/C20", /* 0xA0 */
Expand Down Expand Up @@ -1819,7 +1822,7 @@ static const char *dmi_slot_type(u8 code)
* function dmi_slot_id below needs updating too.
*/

if (code >= 0x01 && code <= 0x20)
if (code >= 0x01 && code <= 0x23)
return type[code - 0x01];
if (code >= 0xA0 && code <= 0xB6)
return type_0xA0[code - 0xA0];
Expand Down Expand Up @@ -1901,6 +1904,9 @@ static void dmi_slot_id(u8 code1, u8 code2, u8 type, const char *prefix)
case 0x13: /* AGP */
case 0x1F: /* PCI Express 2 */
case 0x20: /* PCI Express 3 */
case 0x21: /* PCI Express Mini */
case 0x22: /* PCI Express Mini */
case 0x23: /* PCI Express Mini */
case 0xA5: /* PCI Express */
case 0xA6: /* PCI Express */
case 0xA7: /* PCI Express */
Expand Down

0 comments on commit c3fd5fb

Please sign in to comment.