Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1026470pxm; Wed, 23 Feb 2022 16:15:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYTChE0NWyV4eiboVDgb6Xb37esuJ9f1Go9g0erJstawPHd05THJ9wpq5VnvLv/hk/H5ra X-Received: by 2002:a17:90b:3145:b0:1bc:5855:f94d with SMTP id ip5-20020a17090b314500b001bc5855f94dmr80936pjb.55.1645661709332; Wed, 23 Feb 2022 16:15:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645661709; cv=none; d=google.com; s=arc-20160816; b=PfCvOXxdG/15slAK11LvlwW1qxG5OjTVPuKZkJfqpAyjhgGxZ7v2bGy7l6xAvk1UMG EbTa+nXTNQYKTxgWikEQpeRi+toJ8frGYEaZbjcxpXDIubYbd4lCbe8Eh++QfJZj4zM1 8bJ1D5BWcfOG0kRh+8bqhzAIKyljgIJPjNZQTh0eZwdfCBatlJUpel+jGQlUWAssJwaJ 23nCBjdGZsSQKCsMKi49umG07sfjmkKJWSBBoFPFnltiOKEYvoEe5J7PXmInMNQPMl0T yDHdFQQoIfiHI89h4cT4a6Yli9SNULhEjAe4u/z+3356dzz9koVUFkYezXcWqxsw3go7 /UwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=IUzXdJJ2nq7NvzkulO0E8Q4Rl32ciqD23jVDlcGIo/U=; b=bytNez19XYztQ5u+TcwRDtNXplOnKRUXKitvY3ds+ACXsV3EiDokzjlfiHQgIJMPAE sHzRXBnMSRjIuPoQnvsvtP0h1Q1zqIXxJZWie3Vzp4fphaDi1CVJuqLuSW5xP7AjCh9X 8C/984Zocq70XpZ02CVvePGO3Ge9xIvKMIEiEROWWbzuYhgzWYyMQO9lEGTYTe7RwWWe Sqq5OracB/PoUvH9J0RRzp3KmmG9gy2+DEvaMDcBSq5qYKTwf+Jhmqm8f6ta35AKLXJY 8GMZZV6+bDGgL9Xpy2ms7yrEsXi/XCv9mLEePp4mkLBsB7PJ5NgPpJ7FNFVPa9JAvnfg ux4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q141si997894pgq.557.2022.02.23.16.14.52; Wed, 23 Feb 2022 16:15:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242482AbiBWVVN (ORCPT + 99 others); Wed, 23 Feb 2022 16:21:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242543AbiBWVUS (ORCPT ); Wed, 23 Feb 2022 16:20:18 -0500 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8A87E4EA37; Wed, 23 Feb 2022 13:19:49 -0800 (PST) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 7946892009C; Wed, 23 Feb 2022 22:19:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 7324B92009B; Wed, 23 Feb 2022 21:19:47 +0000 (GMT) Date: Wed, 23 Feb 2022 21:19:47 +0000 (GMT) From: "Maciej W. Rozycki" To: Bjorn Helgaas cc: Ben Dooks , paul.walmsley@sifive.com, greentime.hu@sifive.com, lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCHv4 2/2] PCI: fu740: Force gen1 for initial device probe In-Reply-To: <20220223205141.GA149346@bhelgaas> Message-ID: References: <20220223205141.GA149346@bhelgaas> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Feb 2022, Bjorn Helgaas wrote: > > + dw_pcie_dbi_ro_wr_dis(dw); > > +} > > + > > static int fu740_pcie_start_link(struct dw_pcie *pci) > > { > > struct device *dev = pci->dev; > > struct fu740_pcie *afp = dev_get_drvdata(dev); > > > > + /* Force PCIe gen1 otherwise Unmatched board does not probe */ > > + fu740_pcie_force_gen1(pci, afp); > > I guess the "Unmatched" board is the only thing we need to care about > here? Are there or will there be other boards that don't need this? I wonder if this is the other side of a supposed erratum observed here: Downstream there's the same ASMedia ASM2824 PCIe switch whose downstream ports don't want to train with a Pericom part above Gen1. Of course we don't know an ASM2824 is there until we have successfully negotiated the link, so we may have to generalise my proposal if we can find a way similar to what I have done for U-boot that does not disturb Linux's operation. This is because there are PCIe option cards out there with the ASM2824 onboard, so it could be possible for the problem to trigger anywhere where the conditions for the erratum are met. Also in that case retraining should work with the cap removed to get a higher final speed just as with the Pericom part. Maciej