commit 35d01313b5d03069bf8cabbcdfe39944da4ae65c
Author: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Date: Thu Jun 14 16:08:50 2018 -0700
lsslot: add DRC Type description strings for new U.2 PCIe slots
Two new PCI slot types can be reported from firmware in the DRC Type
property for a PCI device. The following are the slot descriptions for
DRC types 43 and 44.
43 A U.2 PCI Express Rev 3 4x lane slot with 4x lanes connected
44 A U.2 PCI Express Rev 4 4x lane slot with 4x lanes connected
Currently, the lsslot utility reports "Unknown" for the description of
these pci devices. Update the php_slot_type_msg[] with these new slot
descriptions so that lsslot correctly reports them.
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
diff --git a/src/drmgr/common.c b/src/drmgr/common.c
index 6e89265..30c641f 100644
--- a/src/drmgr/common.c
+++ b/src/drmgr/common.c
@@ -974,6 +974,8 @@ char *php_slot_type_msg[]={
"PCI-E capable, Rev 4, 16x lanes with 1 lane connected", /* 40 */
"PCI-E capable, Rev 4, 16x lanes with 8x lanes connected",
"PCI-E capable, Rev 4, 16x lanes with 16x lanes connected",
+ "U.2 PCI-E capable, Rev 3, 4x lanes with 4x lanes connected",
+ "U.2 PCI-E capable, Rev 4, 4x lanes with 4x lanes connected",
};
char *
@@ -984,7 +986,7 @@ node_type(struct dr_node *node)
desc_msg_num = atoi(node->drc_type);
if ((desc_msg_num >= 1 && desc_msg_num <= 8) ||
- (desc_msg_num >= 11 && desc_msg_num <= 42))
+ (desc_msg_num >= 11 && desc_msg_num <= 44))
desc = php_slot_type_msg[desc_msg_num];
else {
switch (node->dev_type) {