]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
Print Root complex related registers on RCEC, too
authorMasanobu SAITOH <masanobu@iij.ad.jp>
Thu, 4 Oct 2018 08:33:21 +0000 (17:33 +0900)
committerMartin Mares <mj@ucw.cz>
Sun, 14 Oct 2018 20:25:52 +0000 (22:25 +0200)
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.

ls-caps.c

index 8b707c29ad504d77707edb96ca441d25f8b9f95c..a5a5ba80e1b158579fdb37b4a942205dc62e345b 100644 (file)
--- 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)