Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp550433rdb; Thu, 15 Feb 2024 08:03:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWT+Ovxi1iluPjCPgwp9lQmLcHnr4jfBIn4WpuIfGJ2W6/W0rvv0KT3881JFszeCk6MKs9JzkwVQzX0keMBJvo0TzQ86On0m5e2SMW3Vg== X-Google-Smtp-Source: AGHT+IHtzs2xAtTD9B3R+fjOjf5AN6bHEgRqL3gsttv7HjvVw7VJbAymZ6Wll4P/iCRITh3vST6/ X-Received: by 2002:a05:6a20:c68e:b0:1a0:81ec:27b9 with SMTP id gq14-20020a056a20c68e00b001a081ec27b9mr837450pzb.28.1708013004391; Thu, 15 Feb 2024 08:03:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708013004; cv=pass; d=google.com; s=arc-20160816; b=cbiuxJPUybMHPQIxqgNbtenogdeW4ddB/vYmDGy8lXhfQpv8XwacefzgaAV+gvs3lX C7h5pL4V5YAuPcYVa0P7rSN3IRHyQC42fzl/ZuAUtKDZxIbSToXFpNV3RU7xY1V3/XnD /RDehq+YZZfK1aJslbtv7qRxJESXAuXmW1/TqYl6gGgsE2QN7tYPS1ldNwUPJBlR26st 3OyMfy5wvIQ7Z24HCYWqEeOaUJJwT5Hoj27k24ZRLp1dwqch0Fct8lxoIcs57FkS675/ RPf6ZmQqkyOu8lNKPANnlq9fyheM1Zxt9tWDReermZJhq9glnX2LxrjV/+jX8aN1zzIQ wk7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=1QFgayveiapf6ou2v4akpqhNJqBx58Ln5dJmEg2CWt0=; fh=8myXsJRwELZke5bqVDjOY5k5WHFg5Vpi37YN+6iANTo=; b=CXjLJ9O+7ZSenP7EbzAxmmL3lQlTHFzzPDTrNbEuQK/YILfJO6v2hx9wi+kluKtwLY S0iPvMQQgTmLcUsMxxB7kYBwfZXDoMMpfUXwt7jE8tHC4Ggmnd/ENfPelHj3IYnxgMYH p7fAYqbfs0X8d9NVNvr4NQt9HuZY1X8p95Av3/ocFDqWIP7DjXY5ZIeFY9UO81f5DrhS acdtQqbhmqpCcs+hrQtC8ItoYuRbds3GGm5djB5fvWCihh00wZnM45fJUJb1crzs0ini +QL/jmqUoIe/THNJogbL+Bo5sQsSHYL84XdE+75XtM86ot6NO1Yx+ksYaiA/O54GXpWe 9aAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TaUOWjhk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67254-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y28-20020a637d1c000000b005dc42c4775csi1290413pgc.822.2024.02.15.08.03.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 08:03:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67254-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TaUOWjhk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67254-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67254-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 1E5F8290E92 for ; Thu, 15 Feb 2024 16:03:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB4CF1350F9; Thu, 15 Feb 2024 16:02:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TaUOWjhk" 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 E8AFC1350F6; Thu, 15 Feb 2024 16:01:59 +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=1708012920; cv=none; b=MJ8MU6M0n5Wxlmt6UUvUTABPvgCi/F1Bcp3OOFYlgvPniA4zBPJwNqEnJDcW6XWnGdsQM7KJL+vh3myyLonowEB4PpxReRXwY7/BIFDRxrKPW7W++uLe7Xnv3R4cJGzOyuQIe1yvMZyAP+7apuLFhOH09caz3ZvNRMhD36Da65o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012920; c=relaxed/simple; bh=pWw8ohlMdJOBYl5mwsS+UEZnUOAY6rOv2BrZBdYFroE=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=USUcjXD+WiDPJzbUNOzxK45vLe0Y7YhW/Kbf71ZrX6tu9j9x6GLtrJsj45z2suFZxT4rr+HEL7/eThEyVJa+1+SfBLxKZc+Vwv7k9dE4Vg6cp2K4kxuwVbPnM4/Go6V5ZKo2nqpOAd476wibCQ95Ls/4hQM3hDE4iB417CjS3Us= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TaUOWjhk; arc=none smtp.client-ip=10.30.226.201 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> 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=us-ascii Content-Disposition: inline In-Reply-To: <17dadf66-055c-4796-a905-44e37b6fcfe3@nvidia.com> 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