From 5469a751a260d5bbf3430a88d0c434d069aa344e Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 23 Aug 2019 15:17:04 +0000 Subject: [PATCH] Report Clock Power Management support and status. Since we already report ASPM, why not to go further. MFC after: 2 weeks Sponsored by: iXsystems, Inc. --- usr.sbin/pciconf/cap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/pciconf/cap.c b/usr.sbin/pciconf/cap.c index a6309a52e1c2..e2a533c45cbf 100644 --- a/usr.sbin/pciconf/cap.c +++ b/usr.sbin/pciconf/cap.c @@ -515,6 +515,11 @@ cap_express(int fd, struct pci_conf *p, uint8_t ptr) printf(" ASPM %s(%s)", aspm_string(ctl & PCIEM_LINK_CTL_ASPMC), aspm_string((cap & PCIEM_LINK_CAP_ASPM) >> 10)); } + if ((cap & PCIEM_LINK_CAP_CLOCK_PM) != 0) { + ctl = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_CTL, 2); + printf(" ClockPM %s", (ctl & PCIEM_LINK_CTL_ECPM) ? + "enabled" : "disabled"); + } if (!(flags & PCIEM_FLAGS_SLOT)) return; cap = read_config(fd, &p->pc_sel, ptr + PCIER_SLOT_CAP, 4);