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)