summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali>2014-01-13 14:54:21 +0000
committerkhali <khali>2014-01-13 14:54:21 +0000
commit5717c97f370d5e2803edfdacb3ddd47c2a21426d (patch)
tree7b27101cd2a3260fb3d094b673a7da8249f9d8dd
parentf562c4dfab8fe08d5af2a7f000757ea41eae4a06 (diff)
downloaddmidecode-5717c97f370d5e2803edfdacb3ddd47c2a21426d.tar.gz
dmidecode.c: Decode ID of PCI Express 3 slots (DMI type 9).
This fixes Savannah bug #40178: https://savannah.nongnu.org/bugs/?40178
-rw-r--r--CHANGELOG6
-rw-r--r--dmidecode.c12
2 files changed, 17 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index b27554d..2f163a2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,11 @@
2014-01-13 Jean Delvare <jdelvare@suse.de>
+ * dmidecode.c: Decode ID of PCI Express 3 slots (DMI type 9).
+ This fixes Savannah bug #40178:
+ https://savannah.nongnu.org/bugs/?40178
+
+2014-01-13 Jean Delvare <jdelvare@suse.de>
+
* LICENSE: Update to the latest upstream version. Amongst other
things, this fixes the FSF address.
diff --git a/dmidecode.c b/dmidecode.c
index 24de19b..21a51d6 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -2,7 +2,7 @@
* DMI Decode
*
* Copyright (C) 2000-2002 Alan Cox <alan@redhat.com>
- * Copyright (C) 2002-2010 Jean Delvare <khali@linux-fr.org>
+ * Copyright (C) 2002-2014 Jean Delvare <jdelvare@suse.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1697,6 +1697,10 @@ static const char *dmi_slot_type(u8 code)
"PCI Express 3 x8",
"PCI Express 3 x16" /* 0xB6 */
};
+ /*
+ * Note to developers: when adding entries to these lists, check if
+ * function dmi_slot_id below needs updating too.
+ */
if (code >= 0x01 && code <= 0x13)
return type[code - 0x01];
@@ -1790,6 +1794,12 @@ static void dmi_slot_id(u8 code1, u8 code2, u8 type, const char *prefix)
case 0xAE: /* PCI Express 2 */
case 0xAF: /* PCI Express 2 */
case 0xB0: /* PCI Express 2 */
+ case 0xB1: /* PCI Express 3 */
+ case 0xB2: /* PCI Express 3 */
+ case 0xB3: /* PCI Express 3 */
+ case 0xB4: /* PCI Express 3 */
+ case 0xB5: /* PCI Express 3 */
+ case 0xB6: /* PCI Express 3 */
printf("%sID: %u\n", prefix, code1);
break;
case 0x07: /* PCMCIA */