svn commit: r264012 - head/usr.sbin/pciconf
Ryan Stone
rstone at FreeBSD.org
Tue Apr 1 16:03:52 UTC 2014
Author: rstone
Date: Tue Apr 1 16:03:52 2014
New Revision: 264012
URL: http://svnweb.freebsd.org/changeset/base/264012
Log:
Print status of ARI capability in pciconf -c
Teach pciconf how to print out the status (enabled/disabled) of the ARI
capability on PCI Root Complexes and Downstream Ports.
MFC after: 2 months
Sponsored by: Sandvine Inc.
Modified:
head/usr.sbin/pciconf/cap.c
Modified: head/usr.sbin/pciconf/cap.c
==============================================================================
--- head/usr.sbin/pciconf/cap.c Tue Apr 1 16:02:02 2014 (r264011)
+++ head/usr.sbin/pciconf/cap.c Tue Apr 1 16:03:52 2014 (r264012)
@@ -410,7 +410,7 @@ aspm_string(uint8_t aspm)
static void
cap_express(int fd, struct pci_conf *p, uint8_t ptr)
{
- uint32_t cap;
+ uint32_t cap, cap2;
uint16_t ctl, flags, sta;
flags = read_config(fd, &p->pc_sel, ptr + PCIER_FLAGS, 2);
@@ -452,6 +452,7 @@ cap_express(int fd, struct pci_conf *p,
if (flags & PCIEM_FLAGS_IRQ)
printf(" IRQ %d", (flags & PCIEM_FLAGS_IRQ) >> 9);
cap = read_config(fd, &p->pc_sel, ptr + PCIER_DEVICE_CAP, 4);
+ cap2 = read_config(fd, &p->pc_sel, ptr + PCIER_DEVICE_CAP2, 4);
ctl = read_config(fd, &p->pc_sel, ptr + PCIER_DEVICE_CTL, 2);
printf(" max data %d(%d)",
MAX_PAYLOAD((ctl & PCIEM_CTL_MAX_PAYLOAD) >> 5),
@@ -474,6 +475,11 @@ cap_express(int fd, struct pci_conf *p,
printf(" ASPM %s(%s)", aspm_string(ctl & PCIEM_LINK_CTL_ASPMC),
aspm_string((cap & PCIEM_LINK_CAP_ASPM) >> 10));
}
+ if ((cap2 & PCIEM_CAP2_ARI) != 0) {
+ ctl = read_config(fd, &p->pc_sel, ptr + PCIER_DEVICE_CTL2, 4);
+ printf(" ARI %s",
+ (ctl & PCIEM_CTL2_ARI) ? "enabled" : "disabled");
+ }
}
static void
More information about the svn-src-all
mailing list