]> git.ipfire.org Git - thirdparty/pciutils.git/commit
lspci: Decode only supported ASPM exit latencies
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 21 Apr 2017 19:32:26 +0000 (14:32 -0500)
committerMartin Mares <mj@ucw.cz>
Sat, 29 Apr 2017 18:05:07 +0000 (20:05 +0200)
commit78996f1c88172dd1bf54d05faff3861999ca2aa1
tree3a16c9b0cc44549f50bb57e14579f265da008f38
parentf41bb847b47a67dbda41da378013df0c5e7ce8a7
lspci: Decode only supported ASPM exit latencies

Per PCIe spec r3.1, sec 7.8.6, the L0s Exit Latency is only valid when L0s
is supported, and similarly the L1 Exit Latency is only valid when L1 is
supported.

Only decode the L0s and L1 Exit Latencies if they are defined.

For example, on a device that supports L1 but not L0s, the difference in
the "lspci -vv" output looks like this:

-   LnkCap: Port #1, Speed 8GT/s, Width x1, ASPM L1, Exit Latency L0s <1us, L1 <16us
+   LnkCap: Port #1, Speed 8GT/s, Width x1, ASPM L1, Exit Latency L1 <16us

Correct the comments on the PCI_EXP_LNKCAP_L0S and PCI_EXP_LNKCAP_L1
definitions.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
lib/header.h
ls-caps.c
tests/cap-exp-aspm-latencies [new file with mode: 0644]