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.
This commit is contained in:
parent
55d3ea1731
commit
4cf825f637
@ -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, uint8_t ptr)
|
||||
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, uint8_t ptr)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user