Patchwork lspci: Fully decode ASPM support from Link Capabilities

login
register
mail settings
Submitter Bjorn Helgaas
Date May 17, 2013, 7:48 p.m.
Message ID <20130517194819.20832.31070.stgit@bhelgaas-glaptop>
Download mbox | patch
Permalink /patch/244695/
State Not Applicable
Headers show

Comments

Bjorn Helgaas - May 17, 2013, 7:48 p.m.
The ASPM Support field in Link Capabilities is two bits, and all four
possible encodings are defined as of PCIe spec r3.0.  Previously, lspci
only decoded values 1, 2, and 3.  This adds 0, so lspci will show "ASPM
not supported" instead of "ASPM unknown".

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 ls-caps.c |    2 ++
 1 file changed, 2 insertions(+)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin Mares - May 20, 2013, 7:06 a.m.
Hello!

> The ASPM Support field in Link Capabilities is two bits, and all four
> possible encodings are defined as of PCIe spec r3.0.  Previously, lspci
> only decoded values 1, 2, and 3.  This adds 0, so lspci will show "ASPM
> not supported" instead of "ASPM unknown".

Thanks, applied.

				Have a nice fortnight

Patch

diff --git a/ls-caps.c b/ls-caps.c
index bddb455..752a771 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -728,6 +728,8 @@  static char *aspm_support(int code)
 {
   switch (code)
     {
+      case 0:
+        return "not supported";
       case 1:
 	return "L0s";
       case 2: