From: Masanobu SAITOH Date: Thu, 4 Oct 2018 08:33:21 +0000 (+0900) Subject: Print Root complex related registers on RCEC, too X-Git-Tag: v3.6.3~41 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=7155d5104506e6459bb751f073a48eded9afae99;p=pciutils.git Print Root complex related registers on RCEC, too PCIe spec says root ports and root complex event collectors must implement root CAP, STAT and CTRL registers, so call cap_express_root() not only for PCI_EXP_TYPE_ROOT_PORT but also for PCI_EXP_TYPE_ROOT_EC. --- diff --git a/ls-caps.c b/ls-caps.c index 8b707c2..a5a5ba8 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -1220,7 +1220,7 @@ cap_express(struct device *d, int where, int cap) size = 16; if (slot) size = 24; - if (type == PCI_EXP_TYPE_ROOT_PORT) + if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_ROOT_EC) size = 32; if (!config_fetch(d, where + PCI_EXP_DEVCAP, size)) return type; @@ -1230,7 +1230,7 @@ cap_express(struct device *d, int where, int cap) cap_express_link(d, where, type); if (slot) cap_express_slot(d, where); - if (type == PCI_EXP_TYPE_ROOT_PORT) + if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_ROOT_EC) cap_express_root(d, where); if ((cap & PCI_EXP_FLAGS_VERS) < 2)