From patchwork Wed May 22 15:20:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Pimentel X-Patchwork-Id: 10956117 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C99C6C5 for ; Wed, 22 May 2019 15:20:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E40328BC8 for ; Wed, 22 May 2019 15:20:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 320CE28BD0; Wed, 22 May 2019 15:20:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D873228C0D for ; Wed, 22 May 2019 15:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729802AbfEVPUz (ORCPT ); Wed, 22 May 2019 11:20:55 -0400 Received: from smtprelay-out1.synopsys.com ([198.182.47.102]:38196 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729583AbfEVPUz (ORCPT ); Wed, 22 May 2019 11:20:55 -0400 Received: from mailhost.synopsys.com (dc2-mailhost2.synopsys.com [10.12.135.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id BC752C00AD; Wed, 22 May 2019 15:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1558538462; bh=/tdZAhM4UQ8Qlx+dzUKXx+mvyBD8nbOaqVlAQYpbOzw=; h=From:To:Cc:Subject:Date:From; b=G2Qn5EU2HFKZ7nI8UkWz3kHJxWRsi+vcLKWzYiYjJn00/V+cvDOBcXaWhj/OZDXM0 +Zci1D+OTRJ+hQZE73d6SUyiqtoqDvbaQqf1sG8bZaZOXEwSW4exftHioY+llz7PeY q/HeFrve3kJbh57o2lkG7PH9su1gi6P70pLRGM8kbm2dX4dNweArA0ZDLE8r2dYuja xTdrNeZ8s1U4yjlT7fRAc4b3UI183xy7sa9r26cSaQB6z1RbDZ8Wjt7/ubfqiFzi86 f2XLolE3NgBdMD26R27vpYloi5hNpT2F3pdJhKFcsHJ7O/1HSYXSBcPwuZ9Z+hAyCf LjBEzoN0zzXDA== Received: from de02.synopsys.com (de02.internal.synopsys.com [10.225.17.21]) by mailhost.synopsys.com (Postfix) with ESMTP id 13882A0093; Wed, 22 May 2019 15:20:54 +0000 (UTC) Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by de02.synopsys.com (Postfix) with ESMTP id 4C1253F246; Wed, 22 May 2019 17:20:53 +0200 (CEST) From: Gustavo Pimentel To: mj@ucw.cz, linux-pci@vger.kernel.org Cc: Gustavo Pimentel , Bjorn Helgaas , Lorenzo Pieralisi , Joao Pinto Subject: [PATCH] lspci: Add PCIe 5.0 data rate (32GT/s) support Date: Wed, 22 May 2019 17:20:52 +0200 Message-Id: <0f4a952ee3625ffc64f9797a699479337adab1ae.1558538256.git.gustavo.pimentel@synopsys.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This enables "lspci" to show PCIe 5.0 data rate (32GT/s) properly according to the contents in register PCI_EXP_LNKCAP, PCI_EXP_LNKSTA and PCI_EXP_LNKCTL2. Cc: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: linux-pci Cc: Joao Pinto --- ls-caps.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ls-caps.c b/ls-caps.c index 88964ce..8a00aa4 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -742,6 +742,8 @@ static char *link_speed(int speed) return "8GT/s"; case 4: return "16GT/s"; + case 5: + return "32GT/s"; default: return "unknown"; } @@ -1160,6 +1162,8 @@ static const char *cap_express_link2_speed(int type) return "8GT/s"; case 4: return "16GT/s"; + case 5: + return "32GT/s"; default: return "Unknown"; }