From patchwork Fri May 17 19:48:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2584361 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3D2F740079 for ; Fri, 17 May 2013 19:48:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756282Ab3EQTsW (ORCPT ); Fri, 17 May 2013 15:48:22 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:45141 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755361Ab3EQTsV (ORCPT ); Fri, 17 May 2013 15:48:21 -0400 Received: by mail-ie0-f179.google.com with SMTP id c13so10069459ieb.38 for ; Fri, 17 May 2013 12:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=srTwfFmg19Tb/ll6lEHA0xjMta7w42Vmdvdppwt9kU4=; b=AbWz8PRCK2ct+h3QSsvFNyzGo0cl8PZDxPoFRLt3dhRLFI/pYpsm31FDtX5vT+Vsny mZRRvMiayFzpGL+s94a+UUOuwRLnzGklXeS6z76Aa5vz8Kh2TLdoXbiZspOdA9CaEu11 YVPhKH3ePzDqS+aJijXJXbhD1+EsIgHtc1OfbsIS4jKNU86eU5sR66wdlrnE8KfAbHiy QP1MdlUTfjQ9+N/UZoWlr3O4wj91KgJyf5sq3Sy14kK5CwIfR0vmPaQ4bi/jSYZCghah bPA8r+4OzeMfWAK1XZajXAyFm+EdGhBV5AworCi/WcVrewxff/siFNCFzF1JMhmv24dz HTQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=srTwfFmg19Tb/ll6lEHA0xjMta7w42Vmdvdppwt9kU4=; b=Ig84Kg1SJ0gu7lRmJQO6nHsbpyzj/lVkXZjy7fOAxxHh7mXloKkMBwsM2SKcfCPUdf PTSxcGugVTL2CyzLEyJlavxLmB+ciUdARwT5viQjwMGNdDI98PAE8oRiogk5/nOIchkS 7yF9vPrX+6sj8TZ4ucSKpqWKQNe9QrLXe8MNE6pE0AYar6x+vrTRtZylUHpAD3x46Kkv m74nAAoaZF0iOiO9qqvQZaC0lc1VLLnpw7pApyWa2E4IbdoSKManh3z0FhxLvEJkJ4Pk WOYkCDgZ9SwXqE49LgFfUwF5BP0Bo79znipKo8FK3VN2Z+hzFZkb06q0L7J2xAtqNGd6 KvFw== X-Received: by 10.50.78.229 with SMTP id e5mr13789876igx.85.1368820101239; Fri, 17 May 2013 12:48:21 -0700 (PDT) Received: from localhost ([172.29.121.176]) by mx.google.com with ESMTPSA id xf4sm11081847igb.8.2013.05.17.12.48.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 May 2013 12:48:20 -0700 (PDT) Subject: [PATCH] lspci: Fully decode ASPM support from Link Capabilities To: Martin Mares From: Bjorn Helgaas Cc: Phillip Susi , linux-pci@vger.kernel.org Date: Fri, 17 May 2013 13:48:19 -0600 Message-ID: <20130517194819.20832.31070.stgit@bhelgaas-glaptop> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkbuFGHA9BZ4ZM2QNEv1ofZRASUTUcdT7Fp+DCSzyFFVOBAjjEZOSM41oZpFcxJY+QOehJzf1DbGTlW5bWqdOS0gCWGBmRIHnf6JNQRzya8iCADKUSVO9hxv6LF99lroQxD46RyT2YZGZANVvl0v+QYkPd3W8yyeqIfKDUUnIWRnmZas8ZiSlgM5dEvmrQwfokswr3/bJiYv2qBCxEid49DS+eP0Q== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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 --- 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 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: