Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3245117pxm; Mon, 28 Feb 2022 15:27:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxw7nnJQ0emD8uBO/TSn6zWTyVa5dW+4053VvnLd5EaPOlpGxZ9vwbZFtPamoFz96Gulumo X-Received: by 2002:aa7:8d54:0:b0:4e0:bd6:cfb9 with SMTP id s20-20020aa78d54000000b004e00bd6cfb9mr24305087pfe.60.1646090832835; Mon, 28 Feb 2022 15:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646090832; cv=none; d=google.com; s=arc-20160816; b=IrZzYpZBiEtdK+Q5AOlT9PjSmxVnkCg3C0dLUoaK68kaEzCcYAN5Q1Vx6y67I8OCmU H1r711CNe51mG69K48m3GgnocD+VsqI1HGS9P/YYIR/ZQZAEct6tt166r4Sb8N+TH4Vd p5eDIOgGWIbsxbLAuO2direj1xiPVgBpjluY1cICIejEtnXEBex8Gzw0tTEDUKrt9Utm wetHFWbKdlvbUurNYte0MySUzh7l49OEh/V5kkBOeAYo39hQKc4C3fXI2FdEwfz2sj8c qKp7PS+QOD7j6D7hWF59voZv8V3zNeqXUAsexK/eReqstcubbXnl4JJkacbyrDWhjEAO 2qSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id; bh=QDSq1tDcbe7TkhBWglOiXT04pRIjWATTP/Rk6kzGqXY=; b=bSsS2EIBz81gKRszrvpG3prPiuyLhygVls2u0lTLXbv5Ov9Djt8wcqseCbuhgtYQ/g v4+OyyA2DxobNn9+mUYu+nCA6gePX24s3z3YVDuOaPIxPM4+UcZ5Zlro7kT6Y3fa9DCk krAmXsRDs/4bKSsKH2oH58UehrojHH8Ntu0jfZ1kkM0KdefM1QlAs4rTCiU7CSf9c/Na 3mTZLnXioWVKvXTvrFoO/FWeY2ZmKL19TriNuWYtnJ3JoeE61wYlPG5QJdvqoIMfBn27 EOf+8VRJOP3rvQnDlUPnSf2Ru6W7q+R47Z9MLvWyaNGHIsxV2HKLCsw95NQglRtsuuwp UQwg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m20-20020a17090a7f9400b001b95ae517a4si692670pjl.177.2022.02.28.15.26.53; Mon, 28 Feb 2022 15:27:12 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229634AbiB1XQc (ORCPT + 99 others); Mon, 28 Feb 2022 18:16:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbiB1XQa (ORCPT ); Mon, 28 Feb 2022 18:16:30 -0500 Received: from imap2.colo.codethink.co.uk (imap2.colo.codethink.co.uk [78.40.148.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 597674AE2E; Mon, 28 Feb 2022 15:15:50 -0800 (PST) Received: from cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net ([86.15.83.122] helo=[192.168.0.21]) by imap2.colo.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1nOoo1-0002WO-9x; Mon, 28 Feb 2022 22:47:49 +0000 Message-ID: <023a2015-cf04-9673-8e8a-88fe88ee085e@codethink.co.uk> Date: Mon, 28 Feb 2022 23:15:39 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCHv4 2/2] PCI: fu740: Force gen1 for initial device probe Content-Language: en-GB To: "Maciej W. Rozycki" , Bjorn Helgaas Cc: 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 References: <20220223205141.GA149346@bhelgaas> From: Ben Dooks Organization: Codethink Limited. In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,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 23/02/2022 21:19, Maciej W. Rozycki wrote: > 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. Possibly. I have just been working on a patch to better force Gen1 speeds and then restore the config which is working on my Unmatched board. -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html