Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2594158lqp; Mon, 25 Mar 2024 03:59:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW94uMUdj4p9yK6H3Rcy+6vXgSDU0zFt3DPE9v3cZpv7fkyAGHXeQduEReGdhcMTELFE1pqpb+b6KxsrXi0FyvrdAOZjkXM0yaIIa7TMA== X-Google-Smtp-Source: AGHT+IHmXVzRpQ2apFi8GwL1/vdhvifG+N5eCcLx2EeziPJ9xbwnwMXBaF72vddIPEdV2b+Ss7vF X-Received: by 2002:a05:6a00:4fc9:b0:6e6:8df5:e903 with SMTP id le9-20020a056a004fc900b006e68df5e903mr8183410pfb.13.1711364343309; Mon, 25 Mar 2024 03:59:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711364343; cv=pass; d=google.com; s=arc-20160816; b=XGnkRet4paVKmbap2LKO/pkHtCbweYKtZXKq32ra1RPSfGP2gxhkHNfG+TkmY867JE yx+z997HVtgCk8/SeDqXGeF5eGacoErfdmqfpx7gHKrThw8MVG6zYTWqW07oGXYy6h0d 9M7Ecmxh6u+5cQR3h66Mo710RarQtt1VaI1jegNLDdKTQ0/+0rq5Axkc1E4FaBPamTA3 C8H0CquXCqkU9EG05sojpzw94lcpOqv/WphCke+SxydaMucdjtNQMtfYxQVGtNbGNmsi tCmlVXGo20nXFj/8XoCcW9dfDNPvpNJLweI/wsxQfxxO6XzBr6HJAw5Az2OiO5AfcIB1 TH9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=kcn8UkI4DvqHf1kZcI10G9ZSUEbr80wIDeceyNKxg+U=; fh=PuXfdepGU2Y/fEiRkHzdQ2wynxN5rxRjTVsYXSJ3LrU=; b=INB3vWUhCMIX7G4pPcvIOubNGX8uEk9cQkeLhJuLyOemePTOjuOfFHMqNr0ThZpnLC kKmL2/M81gR6YVRQwDhOILSBMpAnv65UGtXa8lehzPDCsN/toSaAj88YRNvAVuTiAk33 6QvtAxW9jEK4fPn1N4y/c4dmwR2K9G+x/dnUaYO54WHoRi1lB8KdkC+rG1FuBeQi22pk c1hKuw5GlIXR1a+0x/VBRRe02keUB2QY1RTLKF2N0ofpLQsI2J5ifJ7RN49jU5W8Y7SR QZS3oXWfPcOHmeFeywm27UNggcCTcNIwdtuvs/trdt1wWSKLkVlX6SSce/Bgx49o6bds kcnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TOBgcZ09; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116173-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k2-20020aa788c2000000b006ea9ca4970esi4277402pff.343.2024.03.25.03.59.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 03:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TOBgcZ09; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116173-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116173-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7BA98B2DE63 for ; Mon, 25 Mar 2024 10:22:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25D1D3B7182; Mon, 25 Mar 2024 03:33:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TOBgcZ09" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A119517BB13; Sun, 24 Mar 2024 23:42:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323750; cv=none; b=m+XHDkN3E2VSvVCQga9OAYzaSuHRihqJzN3SvOng+PuVqZz+K1flB+M3FEnpjHEdNJtUQE5onnxvLn9GaHMhs/G2QlpGiFkhyKnTeB0VTyQrqfj4mEReK6mDX6mLf7qUiJchyPVgE7XKefHkLMZc/SpZK/Ao121ybudaboPWKhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323750; c=relaxed/simple; bh=BEDj/bZZ8ydWaXAwhh7YWirDihFEP8hae+QSA1Zd6Mk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FfvLc82HAB7eVKJSnXNAUNE9iZNH6jUlg8bwxyUj5gewwBGc/mHLVYaWtKmqBrvuMl1fJwqITCjJzAc7wYw1V/TCOj1K2vbcpfAeUPJY7rVsvEBCEAtAA/euzp7BR8gsbGW9oVXedFguVYeNelxIaFVfz4sboZ1BZD8THag5E1w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TOBgcZ09; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D858BC43390; Sun, 24 Mar 2024 23:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323750; bh=BEDj/bZZ8ydWaXAwhh7YWirDihFEP8hae+QSA1Zd6Mk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TOBgcZ09KuQgk9rAZVZPN4mCdpIkdYkjNfSAinZn/S2KGsc/EJU222CBajyTlQX37 FVpJo2kpSEyz2tMJFQ4+/Iv6Xz7lLjGGE1S7BKB2toiRybCoPChgXlbw3oX9iu6mMS ap8Ihgm6RvU9lzmq1N2oqHBAWoEDrewXNtQVMn1YF2m08p3PZ4lvU/R6T2CqYRR7h3 0i1Hy1yhDFEwTKiAPB0hK7SbkD9nG+WfWbNPqk2BBTa/guR84ODN5gmr4piifYfqNQ rR+w2otggq2drIvE4hHeJothtvQlMJJqVswVxJ67ukeGBbuItBi2z9kjelUbe5xk49 2io9FcRTSIpjA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Bjorn Helgaas , Sasha Levin Subject: [PATCH 5.10 125/238] PCI/DPC: Print all TLP Prefixes, not just the first Date: Sun, 24 Mar 2024 19:38:33 -0400 Message-ID: <20240324234027.1354210-126-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Ilpo Järvinen [ Upstream commit 6568d82512b0a64809acff3d7a747362fa4288c8 ] The TLP Prefix Log Register consists of multiple DWORDs (PCIe r6.1 sec 7.9.14.13) but the loop in dpc_process_rp_pio_error() keeps reading from the first DWORD, so we print only the first PIO TLP Prefix (duplicated several times), and we never print the second, third, etc., Prefixes. Add the iteration count based offset calculation into the config read. Fixes: f20c4ea49ec4 ("PCI/DPC: Add eDPC support") Link: https://lore.kernel.org/r/20240118110815.3867-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen [bhelgaas: add user-visible details to commit log] Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/pcie/dpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c index f21d64ae4ffcc..cf0d4ba2e157a 100644 --- a/drivers/pci/pcie/dpc.c +++ b/drivers/pci/pcie/dpc.c @@ -231,7 +231,7 @@ static void dpc_process_rp_pio_error(struct pci_dev *pdev) for (i = 0; i < pdev->dpc_rp_log_size - 5; i++) { pci_read_config_dword(pdev, - cap + PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG, &prefix); + cap + PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG + i * 4, &prefix); pci_err(pdev, "TLP Prefix Header: dw%d, %#010x\n", i, prefix); } clear_status: -- 2.43.0