From patchwork Wed Oct 18 16:08:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13427338 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B6EAC41513 for ; Wed, 18 Oct 2023 16:08:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231656AbjJRQIq (ORCPT ); Wed, 18 Oct 2023 12:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231432AbjJRQIq (ORCPT ); Wed, 18 Oct 2023 12:08:46 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EB46119; Wed, 18 Oct 2023 09:08:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11776C433C9; Wed, 18 Oct 2023 16:08:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645324; bh=LBqgEqSkWiN+BK8LYJfl340TaXdq+C0f570tWEKS9Cg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mRenJn5llzBxbKpLJMy89gPfTgfhwAIT+1F75L6hZdWZLSTS619F0Xlx3JAVES0AK Z32UTZ/IcKoVOwTGbNlyxwQCD99RQ47ufXGyHfmWii7+9d/XevkZu9P8qsVFZH8TLP zL26TClR1Zxn0cURuVlRO2SFissSUXka0maT7ffXg2ZfQhnMQRWWqsfnkOO7shSID5 Bo6vlgnDx9C84tL7kEwHPdZfYdIkJMsToGhjKb3f7E72XHxYz6oxLcOIQQd8vPjpeP mAJOdKNAYTSmVckp9ShYb2f/z85SnSU/M3odqizrslXJ0XHy9Ng/hoX9F/mbVxADQ2 zwd/Kv4e2tuyA== From: Bjorn Helgaas To: Martin Mares Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , Gustavo Pimentel , Mateusz Nowicki , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 1/8] lspci: Reorder PCIe DevCtl2 fields to match spec Date: Wed, 18 Oct 2023 11:08:29 -0500 Message-Id: <20231018160836.1361510-2-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018160836.1361510-1-helgaas@kernel.org> References: <20231018160836.1361510-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas Decode the PCIe DevCtl2 fields in the same order they're documented in the PCIe spec. Signed-off-by: Bjorn Helgaas --- ls-caps.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ls-caps.c b/ls-caps.c index 1b63262ef005..beb7446a926e 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -1153,12 +1153,9 @@ static void cap_express_dev2(struct device *d, int where, int type) } w = get_conf_word(d, where + PCI_EXP_DEVCTL2); - printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c 10BitTagReq%c OBFF %s,", + printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c", cap_express_dev2_timeout_value(PCI_EXP_DEVCTL2_TIMEOUT_VALUE(w)), - FLAG(w, PCI_EXP_DEVCTL2_TIMEOUT_DIS), - FLAG(w, PCI_EXP_DEVCTL2_LTR), - FLAG(w, PCI_EXP_DEVCTL2_10BIT_TAG_REQ), - cap_express_devctl2_obff(PCI_EXP_DEVCTL2_OBFF(w))); + FLAG(w, PCI_EXP_DEVCTL2_TIMEOUT_DIS)); if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_DOWNSTREAM) printf(" ARIFwd%c\n", FLAG(w, PCI_EXP_DEVCTL2_ARI)); else @@ -1176,6 +1173,10 @@ static void cap_express_dev2(struct device *d, int where, int type) printf(" EgressBlck%c", FLAG(w, PCI_EXP_DEVCTL2_ATOMICOP_EGRESS_BLOCK)); printf("\n"); } + printf("\t\t\t LTR%c 10BitTagReq%c OBFF %s\n", + FLAG(w, PCI_EXP_DEVCTL2_LTR), + FLAG(w, PCI_EXP_DEVCTL2_10BIT_TAG_REQ), + cap_express_devctl2_obff(PCI_EXP_DEVCTL2_OBFF(w))); } static const char *cap_express_link2_speed_cap(int vector) From patchwork Wed Oct 18 16:08:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13427339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37A18CDB47E for ; Wed, 18 Oct 2023 16:08:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232246AbjJRQIs (ORCPT ); Wed, 18 Oct 2023 12:08:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232496AbjJRQIr (ORCPT ); Wed, 18 Oct 2023 12:08:47 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19D58A4; Wed, 18 Oct 2023 09:08:46 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98B6DC433C7; Wed, 18 Oct 2023 16:08:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645325; bh=0W4Sppyp3HwvlYFqGlIds6vyM6WyAPFFDufarTci3ok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fXJ/dWUFIT+1+pvmXztSZ4SJW62NtR37Dqq8hzJOTHOR2n3nxvs1qf5vzGmNd0lAK eExJdpOqQdox/P6VxR3gVvOy/Iu8YyyH+pzP1Nrnp1hXu9dJCJgaaRIJESO/awLvfN c2IASy+p0HeI02GqoTuNGr+eMBdeVCNVwojL0G/5yxifmR5UNUvspdaUlpkeRQ9Snl GXb8tjipTwOeDZ+uO50zBp88Elh09kYO1vhZm0TJdH2NzKCAb5h5pHCMI1V7HcPVOW uoQQcDs8FBGD9ce/QJZbrgNSjBtj1F+/4T5NXRxUg/OyV6dAHMF4bYqJ6FD4f8IKIq fJzRBF8yO1QkQ== From: Bjorn Helgaas To: Martin Mares Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , Gustavo Pimentel , Mateusz Nowicki , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 2/8] lspci: Decode PCIe DevCtl2 ID-Based Ordering Enables Date: Wed, 18 Oct 2023 11:08:30 -0500 Message-Id: <20231018160836.1361510-3-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018160836.1361510-1-helgaas@kernel.org> References: <20231018160836.1361510-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas Decode the PCIe DevCtl2 ID-Based Ordering Enable bits. Signed-off-by: Bjorn Helgaas --- lib/header.h | 2 ++ ls-caps.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/header.h b/lib/header.h index 57ef0ae8a31e..5065465c33db 100644 --- a/lib/header.h +++ b/lib/header.h @@ -903,6 +903,8 @@ #define PCI_EXP_DEVCTL2_ARI 0x0020 /* ARI Forwarding */ #define PCI_EXP_DEVCTL2_ATOMICOP_REQUESTER_EN 0x0040 /* AtomicOp RequesterEnable */ #define PCI_EXP_DEVCTL2_ATOMICOP_EGRESS_BLOCK 0x0080 /* AtomicOp Egress Blocking */ +#define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */ +#define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */ #define PCI_EXP_DEVCTL2_LTR 0x0400 /* LTR enabled */ #define PCI_EXP_DEVCTL2_10BIT_TAG_REQ 0x1000 /* 10 Bit Tag Requester enabled */ #define PCI_EXP_DEVCTL2_OBFF(x) (((x) >> 13) & 3) /* OBFF enabled */ diff --git a/ls-caps.c b/ls-caps.c index beb7446a926e..0c7bef976144 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -1173,7 +1173,9 @@ static void cap_express_dev2(struct device *d, int where, int type) printf(" EgressBlck%c", FLAG(w, PCI_EXP_DEVCTL2_ATOMICOP_EGRESS_BLOCK)); printf("\n"); } - printf("\t\t\t LTR%c 10BitTagReq%c OBFF %s\n", + printf("\t\t\t IDOReq%c IDOCompl%c LTR%c 10BitTagReq%c OBFF %s\n", + FLAG(w, PCI_EXP_DEVCTL2_IDO_REQ_EN), + FLAG(w, PCI_EXP_DEVCTL2_IDO_CMP_EN), FLAG(w, PCI_EXP_DEVCTL2_LTR), FLAG(w, PCI_EXP_DEVCTL2_10BIT_TAG_REQ), cap_express_devctl2_obff(PCI_EXP_DEVCTL2_OBFF(w))); From patchwork Wed Oct 18 16:08:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13427340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2A86CDB482 for ; Wed, 18 Oct 2023 16:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231486AbjJRQIv (ORCPT ); Wed, 18 Oct 2023 12:08:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232596AbjJRQIu (ORCPT ); Wed, 18 Oct 2023 12:08:50 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1478D119; Wed, 18 Oct 2023 09:08:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89FCCC433C7; Wed, 18 Oct 2023 16:08:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645327; bh=b8oAa/jdirMMTmQZgftTornsrNPKXWrb1kk+VtNeEYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kNUBrScUeqDw0NCA93kWHVjaqsImrYzD2M1Cu50OMLvVf8kZ4MRs/WEP0V3OLBG5W 7q5R1ORwALM3X7BwLzBsbQ/Oq69b3sg4/XYWPvS7nA9siMpjOxZV6BJ8spuKEd8Tvt jBmXjhjWE8KSzl/4nYCLmDpv8wzCfF8qvNoeD7W5eng/SnuXXl4x7rA+U6yn6znsLd YHYN2JstE588u/vI9EjkktNgPRktDz1wWyBSdGBZH8Hg3eawuFFaqEmVR3BYEKEWkI sGJjOcvFbKV72c9GWvTkpUlrrJS57s4giIwN/vwRgDZ8bn1PE4LqeY9UIDNoUnmNvZ acC+lU20cWI/w== From: Bjorn Helgaas To: Martin Mares Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , Gustavo Pimentel , Mateusz Nowicki , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 3/8] lspci: Decode PCIe DevCtl2 Emergency Power Reduction Request Date: Wed, 18 Oct 2023 11:08:31 -0500 Message-Id: <20231018160836.1361510-4-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018160836.1361510-1-helgaas@kernel.org> References: <20231018160836.1361510-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas Decode the PCIe DevCtl2 Emergency Power Reduction Request bit. Signed-off-by: Bjorn Helgaas --- lib/header.h | 1 + ls-caps.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/header.h b/lib/header.h index 5065465c33db..c3a720f716b7 100644 --- a/lib/header.h +++ b/lib/header.h @@ -906,6 +906,7 @@ #define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */ #define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */ #define PCI_EXP_DEVCTL2_LTR 0x0400 /* LTR enabled */ +#define PCI_EXP_DEVCTL2_EPR_REQ 0x0800 /* Emergency Power Reduction Request */ #define PCI_EXP_DEVCTL2_10BIT_TAG_REQ 0x1000 /* 10 Bit Tag Requester enabled */ #define PCI_EXP_DEVCTL2_OBFF(x) (((x) >> 13) & 3) /* OBFF enabled */ #define PCI_EXP_DEVSTA2 0x2a /* Device Status */ diff --git a/ls-caps.c b/ls-caps.c index 0c7bef976144..19c59536f948 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -1173,10 +1173,12 @@ static void cap_express_dev2(struct device *d, int where, int type) printf(" EgressBlck%c", FLAG(w, PCI_EXP_DEVCTL2_ATOMICOP_EGRESS_BLOCK)); printf("\n"); } - printf("\t\t\t IDOReq%c IDOCompl%c LTR%c 10BitTagReq%c OBFF %s\n", + printf("\t\t\t IDOReq%c IDOCompl%c LTR%c EmergencyPowerReductionReq%c\n", FLAG(w, PCI_EXP_DEVCTL2_IDO_REQ_EN), FLAG(w, PCI_EXP_DEVCTL2_IDO_CMP_EN), FLAG(w, PCI_EXP_DEVCTL2_LTR), + FLAG(w, PCI_EXP_DEVCTL2_EPR_REQ)); + printf("\t\t\t 10BitTagReq%c OBFF %s\n", FLAG(w, PCI_EXP_DEVCTL2_10BIT_TAG_REQ), cap_express_devctl2_obff(PCI_EXP_DEVCTL2_OBFF(w))); } From patchwork Wed Oct 18 16:08:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13427342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFA57CDB47E for ; Wed, 18 Oct 2023 16:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232010AbjJRQJD (ORCPT ); Wed, 18 Oct 2023 12:09:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344667AbjJRQIu (ORCPT ); Wed, 18 Oct 2023 12:08:50 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70A7211B; Wed, 18 Oct 2023 09:08:49 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E919EC433CD; Wed, 18 Oct 2023 16:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645329; bh=U+icbxz1kQpSxKVwtVnxlURqaTCfhzPPoyC6yA7hpYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NzlTGalxvHoRIuy4CDpAJaYW4ce7iyvrTe8lNqZ7GubrpnYkvpdnZpUqEsltsr2P/ erZHhyx/Fv4clNxoAm8fpaUAgVGvqYSdsCWG4fw/h+cIk4taXeAPZ/dxdJaDGGcELZ 9rrFAt3HeG/bynpku7YWxpbEpfkUofTL6Re0hXEqWpWQbwc6diZit/FHRcP7Khs4pJ DM5Rg6PcILRi7eARssWlXeThkFRgtmjfQgnmCMa2u6X1ygomKXLgvtX8NbdFEcPWRW TbvNpnCx8+l3C/iBGQQZZvcDpPxbc9f79Pk+6rODZLqxzPf+mH9e3DsdfJ4LWjACVA 5r1xiVMWkmzLQ== From: Bjorn Helgaas To: Martin Mares Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , Gustavo Pimentel , Mateusz Nowicki , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 4/8] lspci: Decode PCIe DevCtl2 End-to-End TLP Prefix Blocking Date: Wed, 18 Oct 2023 11:08:32 -0500 Message-Id: <20231018160836.1361510-5-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018160836.1361510-1-helgaas@kernel.org> References: <20231018160836.1361510-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas Decode the PCIe DevCtl2 End-to-End TLP Prefix Blocking bit. The "EETLPPrefixBlk" format is analogous to the existing "EETLPPrefix" format used for the corresponding DevCap2 bit. Signed-off-by: Bjorn Helgaas --- lib/header.h | 1 + ls-caps.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/header.h b/lib/header.h index c3a720f716b7..4869617641f1 100644 --- a/lib/header.h +++ b/lib/header.h @@ -909,6 +909,7 @@ #define PCI_EXP_DEVCTL2_EPR_REQ 0x0800 /* Emergency Power Reduction Request */ #define PCI_EXP_DEVCTL2_10BIT_TAG_REQ 0x1000 /* 10 Bit Tag Requester enabled */ #define PCI_EXP_DEVCTL2_OBFF(x) (((x) >> 13) & 3) /* OBFF enabled */ +#define PCI_EXP_DEVCTL2_EE_TLP_BLK 0x8000 /* End-End TLP Prefix Blocking */ #define PCI_EXP_DEVSTA2 0x2a /* Device Status */ #define PCI_EXP_LNKCAP2 0x2c /* Link Capabilities */ #define PCI_EXP_LNKCAP2_SPEED(x) (((x) >> 1) & 0x7f) diff --git a/ls-caps.c b/ls-caps.c index 19c59536f948..0d333d578407 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -1178,9 +1178,10 @@ static void cap_express_dev2(struct device *d, int where, int type) FLAG(w, PCI_EXP_DEVCTL2_IDO_CMP_EN), FLAG(w, PCI_EXP_DEVCTL2_LTR), FLAG(w, PCI_EXP_DEVCTL2_EPR_REQ)); - printf("\t\t\t 10BitTagReq%c OBFF %s\n", + printf("\t\t\t 10BitTagReq%c OBFF %s, EETLPPrefixBlk%c\n", FLAG(w, PCI_EXP_DEVCTL2_10BIT_TAG_REQ), - cap_express_devctl2_obff(PCI_EXP_DEVCTL2_OBFF(w))); + cap_express_devctl2_obff(PCI_EXP_DEVCTL2_OBFF(w)), + FLAG(w, PCI_EXP_DEVCTL2_EE_TLP_BLK)); } static const char *cap_express_link2_speed_cap(int vector) From patchwork Wed Oct 18 16:08:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13427343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D7F9C46CA1 for ; Wed, 18 Oct 2023 16:09:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344817AbjJRQJE (ORCPT ); Wed, 18 Oct 2023 12:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344761AbjJRQIx (ORCPT ); Wed, 18 Oct 2023 12:08:53 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2152119; Wed, 18 Oct 2023 09:08:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6746CC433C8; Wed, 18 Oct 2023 16:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645330; bh=PzeEk2W5nKRvW7BKtpqaTV+ksXI9b1FDcRk+eepXmZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e5mWmt8AmVEDOoabuds9W7G5s4c45xq/6joWWLAQr2xO4r4UuD307wiyMqOeerjhf loKFiZn3n1f6+C+6Zk7dGYrRemE1XsnlYKs45BmAAZ56xdMwKc5PRW3hXcEGQxBJ46 4LsndmrdxmgnV6Rf6smYLfsMVmpmhnrc3sDPOJ63yB5eNjJ6T/+OUquEOSNLpxMp5y TVgIvDzbWpBIpzllft4u8xqmvj3GcDiaCt9cb8/+RazaGS9RQjL6xw7UAvBUdSHDC6 vuXHvKdqntcWR0yQjy4vLdxP5vSssAmI+H3VEeOUVbuEHArMvIN4xkKlZTUvg9Lw0d 5k3gIIYcKYJIQ== From: Bjorn Helgaas To: Martin Mares Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , Gustavo Pimentel , Mateusz Nowicki , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 5/8] lspci: Decode PCIe LnkCtl Link Disable as 'LnkDisable' Date: Wed, 18 Oct 2023 11:08:33 -0500 Message-Id: <20231018160836.1361510-6-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018160836.1361510-1-helgaas@kernel.org> References: <20231018160836.1361510-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas Decode the Link Disable bit as "LnkDisable" (not simply "Disable") to match the spec terminology (PCIe r6.0, sec 7.5.3.7) Signed-off-by: Bjorn Helgaas --- ls-caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls-caps.c b/ls-caps.c index 0d333d578407..6c5b73bf2dca 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -841,7 +841,7 @@ static void cap_express_link(struct device *d, int where, int type) if ((type == PCI_EXP_TYPE_ROOT_PORT) || (type == PCI_EXP_TYPE_ENDPOINT) || (type == PCI_EXP_TYPE_LEG_END) || (type == PCI_EXP_TYPE_PCI_BRIDGE)) printf(" RCB %d bytes,", w & PCI_EXP_LNKCTL_RCB ? 128 : 64); - printf(" Disabled%c CommClk%c\n\t\t\tExtSynch%c ClockPM%c AutWidDis%c BWInt%c AutBWInt%c\n", + printf(" LnkDisable%c CommClk%c\n\t\t\tExtSynch%c ClockPM%c AutWidDis%c BWInt%c AutBWInt%c\n", FLAG(w, PCI_EXP_LNKCTL_DISABLE), FLAG(w, PCI_EXP_LNKCTL_CLOCK), FLAG(w, PCI_EXP_LNKCTL_XSYNCH), From patchwork Wed Oct 18 16:08:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13427341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B25F5CDB484 for ; Wed, 18 Oct 2023 16:09:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344714AbjJRQJE (ORCPT ); Wed, 18 Oct 2023 12:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344860AbjJRQIz (ORCPT ); Wed, 18 Oct 2023 12:08:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6083811C; Wed, 18 Oct 2023 09:08:52 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7A09C433C7; Wed, 18 Oct 2023 16:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645332; bh=wcbn4CqBAdmkjiDP4EL9j1mJscemmjwifau8q2H9Em4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aZM73jL+QR2IDoY6JoO2lqEYBukJfnHr7rOA07LeIzyqMFkUFDcs0sgFk9OlIfd0u 0Pps5+4EKyo8lNOkgU2LMqUHFKT2Z1wqcX1avlTndJsaqmPFg4d/88GGDcuy1Bss8f CVrUUIdmuZzi+CsW5dMe7kRA+RbmCVW+stlB/VQevsj868QrGt0fZ3lNrr9MfOvvl3 E2eF9p1szgHsM/T87D1p1pBUWumwGIKWts5nAbICX7hfnf6vyRsA9YUMwXPx/+Y77V 8Yt2NrNDmbQph2aH4/6BK/eae1RIzBX75vodZtm+2mskYwp4oYZ81MSZ3KxSbwTtTr 5QJ84prLH+4zA== From: Bjorn Helgaas To: Martin Mares Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , Gustavo Pimentel , Mateusz Nowicki , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Jonathan Cameron Subject: [PATCH 6/8] lspci: Print PCIe Interrupt Message Numbers consistently Date: Wed, 18 Oct 2023 11:08:34 -0500 Message-Id: <20231018160836.1361510-7-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018160836.1361510-1-helgaas@kernel.org> References: <20231018160836.1361510-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas Several Capabilities include MSI/MSI-X Interrupt Message Numbers, which were decoded in various ways: - MSI %02x PCIe Capability - IntMsg %d AER Capability - INT Msg #%d DPC Capability - Interrupt Message Number %03x SR-IOV Capability - Interrupt Message Number %03x DOE Capability Print them all using the same format: + IntMsgNum %d This better matches the "Interrupt Message Number" terminology used in the spec, e.g., PCIe r6.0, sec 7.5.3.2. Signed-off-by: Bjorn Helgaas Cc: Jonathan Cameron --- ls-caps.c | 2 +- ls-ecaps.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ls-caps.c b/ls-caps.c index 6c5b73bf2dca..fce9502bd29a 100644 --- a/ls-caps.c +++ b/ls-caps.c @@ -1436,7 +1436,7 @@ cap_express(struct device *d, int where, int cap) default: printf("Unknown type %d", type); } - printf(", MSI %02x\n", (cap & PCI_EXP_FLAGS_IRQ) >> 9); + printf(", IntMsgNum %d\n", (cap & PCI_EXP_FLAGS_IRQ) >> 9); if (verbose < 2) return type; diff --git a/ls-ecaps.c b/ls-ecaps.c index 6028607e8217..5bc7a6907349 100644 --- a/ls-ecaps.c +++ b/ls-ecaps.c @@ -191,7 +191,7 @@ cap_aer(struct device *d, int where, int type) l = get_conf_long(d, where + PCI_ERR_ROOT_STATUS); printf("\t\tRootSta: CERcvd%c MultCERcvd%c UERcvd%c MultUERcvd%c\n" - "\t\t\t FirstFatal%c NonFatalMsg%c FatalMsg%c IntMsg %d\n", + "\t\t\t FirstFatal%c NonFatalMsg%c FatalMsg%c IntMsgNum %d\n", FLAG(l, PCI_ERR_ROOT_COR_RCV), FLAG(l, PCI_ERR_ROOT_MULTI_COR_RCV), FLAG(l, PCI_ERR_ROOT_UNCOR_RCV), @@ -221,7 +221,7 @@ static void cap_dpc(struct device *d, int where) return; l = get_conf_word(d, where + PCI_DPC_CAP); - printf("\t\tDpcCap:\tINT Msg #%d, RPExt%c PoisonedTLP%c SwTrigger%c RP PIO Log %d, DL_ActiveErr%c\n", + printf("\t\tDpcCap:\tIntMsgNum %d, RPExt%c PoisonedTLP%c SwTrigger%c RP PIO Log %d, DL_ActiveErr%c\n", PCI_DPC_CAP_INT_MSG(l), FLAG(l, PCI_DPC_CAP_RP_EXT), FLAG(l, PCI_DPC_CAP_TLP_BLOCK), FLAG(l, PCI_DPC_CAP_SW_TRIGGER), PCI_DPC_CAP_RP_LOG(l), FLAG(l, PCI_DPC_CAP_DL_ACT_ERR)); @@ -371,7 +371,7 @@ cap_sriov(struct device *d, int where) return; l = get_conf_long(d, where + PCI_IOV_CAP); - printf("\t\tIOVCap:\tMigration%c 10BitTagReq%c Interrupt Message Number: %03x\n", + printf("\t\tIOVCap:\tMigration%c 10BitTagReq%c IntMsgNum %d\n", FLAG(l, PCI_IOV_CAP_VFM), FLAG(l, PCI_IOV_CAP_VF_10BIT_TAG_REQ), PCI_IOV_CAP_IMN(l)); w = get_conf_word(d, where + PCI_IOV_CTRL); printf("\t\tIOVCtl:\tEnable%c Migration%c Interrupt%c MSE%c ARIHierarchy%c 10BitTagReq%c\n", @@ -1394,7 +1394,7 @@ cap_doe(struct device *d, int where) printf("\t\tDOECap: IntSup%c\n", FLAG(l, PCI_DOE_CAP_INT_SUPP)); if (l & PCI_DOE_CAP_INT_SUPP) - printf("\t\t\tInterrupt Message Number %03x\n", + printf("\t\t\tIntMsgNum %d\n", PCI_DOE_CAP_INT_MSG(l)); l = get_conf_long(d, where + PCI_DOE_CTL); From patchwork Wed Oct 18 16:08:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13427345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E172CDB47E for ; Wed, 18 Oct 2023 16:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232260AbjJRQJw (ORCPT ); Wed, 18 Oct 2023 12:09:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344911AbjJRQI4 (ORCPT ); Wed, 18 Oct 2023 12:08:56 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F00AB134; Wed, 18 Oct 2023 09:08:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57528C433C9; Wed, 18 Oct 2023 16:08:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645333; bh=qlnXN3MZd2ARQ31evVzZVp4O53rhkgUkI2a0l80jXDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jcbAcu+YMSg5yT4gUSldXaovmU2XwHq47h8wYZsP19p/unz5kwPx6OC2p/5Q1y8/c 7Pz3hZO50YcLqlB27EGZb1OFh9zxDolSJsei1CvCY+vrhOZWRr8qKrCb3jz3LHXohi 9KJ84glQN8Lpa52+RvZFZS+W0d6qqI1uV8lU0+V+pxW9cTa43A3SdW3XVsYRwsJzZX Scv5oqLBw/lmSn4Dnwcak00My+slH1kMm+1KAJQLHCTzdz+1um4uqcUUvKk3zcWORy 6P5fKff8X/3l9agprwxOP8LnUJgsfT/irkEjOkqodTSejFwLKoOARfOh7sg4ii/tQa AYqVzB+U02EHA== From: Bjorn Helgaas To: Martin Mares Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , Gustavo Pimentel , Mateusz Nowicki , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 7/8] lspci: Remove spurious colon (':') from PCIe PTM decoding Date: Wed, 18 Oct 2023 11:08:35 -0500 Message-Id: <20231018160836.1361510-8-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018160836.1361510-1-helgaas@kernel.org> References: <20231018160836.1361510-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas Remove spurious colon from PTM decoding to match other enabled/disabled decoding. Signed-off-by: Bjorn Helgaas --- ls-ecaps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ls-ecaps.c b/ls-ecaps.c index 5bc7a6907349..a22da6173e67 100644 --- a/ls-ecaps.c +++ b/ls-ecaps.c @@ -1245,7 +1245,7 @@ cap_ptm(struct device *d, int where) buff = get_conf_long(d, where + 4); printf("\t\tPTMCap: "); - printf("Requester:%c Responder:%c Root:%c\n", + printf("Requester%c Responder%c Root%c\n", FLAG(buff, 0x1), FLAG(buff, 0x2), FLAG(buff, 0x4)); @@ -1266,7 +1266,7 @@ cap_ptm(struct device *d, int where) buff = get_conf_long(d, where + 8); printf("\t\tPTMControl: "); - printf("Enabled:%c RootSelected:%c\n", + printf("Enabled%c RootSelected%c\n", FLAG(buff, 0x1), FLAG(buff, 0x2)); From patchwork Wed Oct 18 16:08:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13427344 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4614CDB485 for ; Wed, 18 Oct 2023 16:09:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344832AbjJRQJF (ORCPT ); Wed, 18 Oct 2023 12:09:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344983AbjJRQI5 (ORCPT ); Wed, 18 Oct 2023 12:08:57 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91553118; Wed, 18 Oct 2023 09:08:55 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8377C433C7; Wed, 18 Oct 2023 16:08:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697645335; bh=8EMrUpmQ/dxu9t4g0dBXpSoSTH19mpxuaSMVEHOy7uI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XwE6lqA/QH5gFXvA3/4JqY9co+femAvkLjU6T7h5Ds3s+2107qsqc2j96aAPbNSyB IiTy5E3UBxVgUTuOxiiNHWcwqj9a46kJEUJrVKqf61T48eIKaCetDghQ42HIi6sk0C GVc4KGWKRkhx3PbVA2oCjehgAAh4XI7P8IIO94GpcGbffVRCugowCqYpwVLqCw1OnY EeqP7TW2aKX2sGxxNQIWtjXX/ADr+pdVTyDlp5XCSypsZqmbyobwbMiChBSwe5fOSq UMKJeg3mvsgpfq00v7/cW0rCDbbxJEi9m9zku0MqzfxAovltYuWhb/1v5PlnK21UQV uMyrr92gW+yTQ== From: Bjorn Helgaas To: Martin Mares Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , Gustavo Pimentel , Mateusz Nowicki , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 8/8] setpci: Fix man page typo Date: Wed, 18 Oct 2023 11:08:36 -0500 Message-Id: <20231018160836.1361510-9-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018160836.1361510-1-helgaas@kernel.org> References: <20231018160836.1361510-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas "Several ways how to identity a register" doesn't read correctly and misspells "identify". Reword as "several ways to identify a register". Signed-off-by: Bjorn Helgaas --- setpci.man | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setpci.man b/setpci.man index 9e4e1d8a6c44..fd4495f4d1b4 100644 --- a/setpci.man +++ b/setpci.man @@ -135,7 +135,7 @@ are hexadecimal numbers. In the latter case, only the bits corresponding to bina ones in the \fImask\fP are changed (technically, this is a read-modify-write operation). .PP -There are several ways how to identity a register: +There are several ways to identify a register: .IP \(bu Tell its address in hexadecimal. .IP \(bu