From 7155d5104506e6459bb751f073a48eded9afae99 Mon Sep 17 00:00:00 2001 From: Masanobu SAITOH Date: Thu, 4 Oct 2018 17:33:21 +0900 Subject: [PATCH] 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. --- ls-caps.c | 4 ++-- 1 file 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) -- 2.39.2