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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E95D4C48BC4 for ; Thu, 15 Feb 2024 16:02:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=mZ6RyN3kgnOnZF0Kcjj/05qH7N/KlBImza3znBNJWpQ=; b=zTDNOzT4ALX1+5 g5kFS/1EtSAWgocNyXbesZ/Do4IEPmgdiuKwzbT2YtV24sTKyeWNBGksPzoDzOADasNsLAFj6EZdw spmb+FxEYV28Q9WIkNW+6RtgX9PylLGNebwGLmS1DJR4Bz/JI3xClcrOEhgmpvCNsY/fVKUbYsERQ Ac/UM9JPAQ1TAZU4rt4jglnaYsjh0voHURrrpxLGWMg7RpH1/CKFJq/JgsQCW5IbSkyvqsjCTKe7V qHTLOf/wHyDPTze+1TSsPRolULijMvb2HwP9hGvagLFL0fhNcQYsvz2JFapEm0TEW2R8Pg30581qz WM1FSQHHgfhANf69zB8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raeBY-0000000Grve-2BKm; Thu, 15 Feb 2024 16:02:04 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raeBU-0000000GruI-3T8p for linux-arm-kernel@lists.infradead.org; Thu, 15 Feb 2024 16:02:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id BFC2B617E9; Thu, 15 Feb 2024 16:01:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26DF5C433C7; Thu, 15 Feb 2024 16:01:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708012919; bh=pWw8ohlMdJOBYl5mwsS+UEZnUOAY6rOv2BrZBdYFroE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=TaUOWjhkb5mM0/BsHOScRRcw1Loz1te9kYIoI82lkP56F49Uzy9oG+HgmRR2cD0S0 jYP3vTctJ84N23BibErGY4gMhi7ULXq3jshaOuJdvl13WzszMz9M3spY8VwUwSG1DP ATEIWlZ/hwegkwSNt3tPKxboCw5MkCRORCdUtTlPr/Na6ow4v2f0fvJbJPNKLAvjwu x3ouW88CaQfG/+ghH2q+QBA0mN37y77UO6x0DzXFu3kDWWKS9aiQpeIzbHjtU2raFk 9J19JecmfXkwoKtOcoUcqHEYV5WF4iwo9vxzepup41U18GaLxltBu//PsWHna/zubC 0tEepQWrESd4Q== Date: Thu, 15 Feb 2024 10:01:57 -0600 From: Bjorn Helgaas To: Vidya Sagar Cc: Lorenzo Pieralisi , bhelgaas@google.com, robh+dt@kernel.org, mark.rutland@arm.com, thierry.reding@gmail.com, jonathanh@nvidia.com, Kishon Vijay Abraham I , catalin.marinas@arm.com, Will Deacon , jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, digetx@gmail.com, mperttunen@nvidia.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com Subject: Re: [PATCH V16 13/13] PCI: tegra: Add Tegra194 PCIe support Message-ID: <20240215160157.GA1291755@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <17dadf66-055c-4796-a905-44e37b6fcfe3@nvidia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240215_080200_991451_01A94DBF X-CRM114-Status: GOOD ( 28.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 15, 2024 at 04:55:47PM +0530, Vidya Sagar wrote: > On 15-02-2024 00:42, Bjorn Helgaas wrote: > > Hi Vidya, question about ancient history: > > > > On Tue, Aug 13, 2019 at 05:06:27PM +0530, Vidya Sagar wrote: > > > Add support for Synopsys DesignWare core IP based PCIe host controller > > > present in Tegra194 SoC. > > > ... > > > +static int tegra_pcie_dw_host_init(struct pcie_port *pp) > > > +{ > > > + struct dw_pcie *pci = to_dw_pcie_from_pp(pp); > > > + struct tegra_pcie_dw *pcie = to_tegra_pcie(pci); > > > + u32 val, tmp, offset, speed; > > > + > > > + tegra_pcie_prepare_host(pp); > > > + > > > + if (dw_pcie_wait_for_link(pci)) { > > > + /* > > > + * There are some endpoints which can't get the link up if > > > + * root port has Data Link Feature (DLF) enabled. > > > + * Refer Spec rev 4.0 ver 1.0 sec 3.4.2 & 7.7.4 for more info > > > + * on Scaled Flow Control and DLF. > > > + * So, need to confirm that is indeed the case here and attempt > > > + * link up once again with DLF disabled. > > > > This comment suggests that there's an issue with *Endpoints*, not an > > issue with the Root Port. If so, it seems like this problem could > > occur with all Root Ports, not just Tegra194. Do you remember any > > details about this? > > > > I don't remember hearing about any similar issues, and this driver is > > the only place PCI_EXT_CAP_ID_DLF is referenced, so maybe it is > > actually something related to Tegra194? > > We noticed PCIe link-up issues with some endpoints. link-up at the physical > layer level but NOT at the Data link layer level precisely. We further > figured out that it is the DLFE DLLPs that the root port sends during the > link up process which are causing the endpoints get confused and preventing > them from sending the InitFC DLLPs leading to the link not being up at > Data Link Layer level. Do you happen to remember any of the endpoints that have issues? Could save some painful debugging if we trip over this issue on other systems. We have seen a few cases where links wouldn't train at full speed unless they trained at a lower speed first, e.g., imx6_pcie_start_link(), fu740_pcie_start_link(). I guess there are probably lots of edge cases that can cause link failures. Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel