From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A614C4707B for ; Thu, 18 Jan 2024 11:09:22 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hUtx6X2c; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TG0PX1XC9z3cWx for ; Thu, 18 Jan 2024 22:09:20 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hUtx6X2c; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=134.134.136.65; helo=mgamail.intel.com; envelope-from=ilpo.jarvinen@linux.intel.com; receiver=lists.ozlabs.org) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TG0Nc5v9vz30YZ for ; Thu, 18 Jan 2024 22:08:31 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705576112; x=1737112112; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mjy35o3OcV45hLL1uxk3iUN5tBVkfvj+D2W44/uMvS8=; b=hUtx6X2c0MBio2+E7nXVwA0MOyyh4TWqPwaONqNYC9R69/DYQSEYK5zA hrshaSi6kMAw+0hUnyI3lWr/2PwcFxQvz2ot129qYjpaTVuA9qnqej8R8 nP4lmKNtGKfkteqO9vud1LbgpSrh7uu090zIPxXuJVdcpjBFbDpjCjCvS +JWU8zu3RWzVKAhYO873tI6l4F34Gs/T/CrcCrHtTKtP6EMyvdXojLux4 iZnXM4ryY5J+acqyDfU0wwbH3fWnWd16dgdR3dw/YqwhV0dQ9D7J862/4 ncKzHPvye5esbyA7/kHoRot1NdD1DoPu/PomdXiWJ+/8Ae1gf7LUQYlne g==; X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="404183209" X-IronPort-AV: E=Sophos;i="6.05,201,1701158400"; d="scan'208";a="404183209" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2024 03:08:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,201,1701158400"; d="scan'208";a="297769" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.94.254.202]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2024 03:08:23 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: Mahesh J Salgaonkar , "Oliver O'Halloran" , Bjorn Helgaas , Keith Busch , Dongdong Liu , linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] PCI/DPC: Fix TLP Prefix register reading offset Date: Thu, 18 Jan 2024 13:08:15 +0200 Message-Id: <20240118110815.3867-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. Add the iteration count based offset calculation into the config read. Fixes: f20c4ea49ec4 ("PCI/DPC: Add eDPC support") Signed-off-by: Ilpo Järvinen --- 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 94111e438241..e5d7c12854fa 100644 --- a/drivers/pci/pcie/dpc.c +++ b/drivers/pci/pcie/dpc.c @@ -234,7 +234,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.39.2