aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasanobu SAITOH <masanobu@iij.ad.jp>2018-10-04 17:33:21 +0900
committerMartin Mares <mj@ucw.cz>2018-10-14 22:25:52 +0200
commit7155d5104506e6459bb751f073a48eded9afae99 (patch)
tree9ad3ae6444f86b8a6492a5313578dc0e9ff4924c
parente3832c8fc3efe41aff853d16cab488d38c3ac13f (diff)
downloadpciutils-7155d5104506e6459bb751f073a48eded9afae99.tar.gz
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.
-rw-r--r--ls-caps.c4
1 files changed, 2 insertions, 2 deletions
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)