dmidecode/dmioem-update-hpe-oem-type-238.patch

40 lines
1.5 KiB
Diff
Raw Normal View History

From: Jerry Hoemann <jerry.hoemann@hpe.com>
Date: Thu, 16 May 2024 13:12:43 +0200
Subject: dmioem: Update HPE OEM Type 238
Git-commit: 190a23ecfd6d743cb6efbc04bb4d95f0584fd68d
Patch-mainline: yes
New field: PCI Segment Number.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
dmioem.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- dmidecode-3.6.orig/dmioem.c
+++ dmidecode-3.6/dmioem.c
@@ -1346,14 +1346,20 @@ static int dmi_decode_hp(const struct dm
* 0x0C | Parent Hub | BYTE | Instance number of internal Hub
* 0x0D | Port Speed | BYTE | Enumerated value of speed configured by BIOS
* 0x0E | Device Path| STRING| UEFI Device Path of USB endpoint
+ * 0x0F | PCI Seg | WORD | PCI Segment number of the USB controller
*/
if (gen < G9) return 0;
pr_handle_name("%s Proliant USB Port Connector Correlation Record", company);
if (h->length < 0x0F) break;
if (!(opt.flags & FLAG_QUIET))
pr_attr("Associated Handle", "0x%04X", WORD(data + 0x4));
- pr_attr("PCI Device", "%02x:%02x.%x", data[0x6],
- data[0x7] >> 3, data[0x7] & 0x7);
+ if (h->length < 0x11)
+ pr_attr("PCI Device", "%02x:%02x.%x", data[0x6],
+ data[0x7] >> 3, data[0x7] & 0x7);
+ else
+ pr_attr("PCI Device", "%04x:%02x:%02x.%x",
+ WORD(data + 0xF), data[0x6],
+ data[0x7] >> 3, data[0x7] & 0x7);
dmi_hp_238_loc("Location", data[0x8]);
dmi_hp_238_flags("Management Port", WORD(data + 0x9));
pr_attr("Port Instance", "%d", data[0xB]);