summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-12-01 19:10:10 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-12-01 19:10:10 +0000
commitec27db307790755ad6d0cf4bb2a9ef9178b0b7e7 (patch)
tree0618f9b85a153fe0daafa5df8108d3ac4a1ecb36 /usr.sbin
parentadcc1269f72d9a9c01641737e823237a68fddd03 (diff)
Print PME# state together with the PCI power state when enabled/asserted.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pcidump/pcidump.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pcidump/pcidump.c b/usr.sbin/pcidump/pcidump.c
index 32bb915a8d8..1673815dce9 100644
--- a/usr.sbin/pcidump/pcidump.c
+++ b/usr.sbin/pcidump/pcidump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcidump.c,v 1.38 2015/11/21 17:52:10 kettenis Exp $ */
+/* $OpenBSD: pcidump.c,v 1.39 2015/12/01 19:10:09 kettenis Exp $ */
/*
* Copyright (c) 2006, 2007 David Gwynne <loki@animata.net>
@@ -293,7 +293,12 @@ dump_pci_powerstate(int bus, int dev, int func, uint8_t ptr)
if (pci_read(bus, dev, func, ptr + PCI_PMCSR, &pmcsr) != 0)
return;
- printf("\t State: D%d\n", pmcsr & PCI_PMCSR_STATE_MASK);
+ printf("\t State: D%d", pmcsr & PCI_PMCSR_STATE_MASK);
+ if (pmcsr & PCI_PMCSR_PME_EN)
+ printf(" PME# enabled");
+ if (pmcsr & PCI_PMCSR_PME_STATUS)
+ printf(" PME# asserted");
+ printf("\n");
}
void