Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp687480pxj; Wed, 2 Jun 2021 08:57:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyagbZ8c/xL3AWvwk2/lg6hBRhMyULkw4ahegrA7aARncJ3nbeHW1LVyb9dsOmnoGDIGH4Z X-Received: by 2002:a17:906:b10e:: with SMTP id u14mr34384046ejy.546.1622649448391; Wed, 02 Jun 2021 08:57:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622649448; cv=none; d=google.com; s=arc-20160816; b=lD/vacOwN4ftuPM/TUpaHnyVCdovlVgzKT7XxCPqABMVvHvWiPFGNoBzpPnjmEmIvu 2uN0h1Vw0jIeyAS+AMq91ARuzYezklHsXrmSiR77lAXIJj4fj/dRfYEhpf+g8GD8INyu 40JSWA/xd2jJjpUfb0bJYuYNwjkF03wlAGIEJdibe3PeFMtrgqm/SBBvALx365+njvwU OzX5d8MmoSMMJYGvB68x5S1Cc7WHo+rgOXHQfeOtWveZc9XrZMQBb2DfZRxriSuykyy+ BdPug8W8GaN2sFCFEF7+lRS5Hdzsn5D742aWJ3aTIbgqFMtJ2Uy8PEGWndK15uA5bwwT Nv8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=GqEKcEW+aM+coC9jjLl8X7tXnayge9tp56WWegWVnls=; b=GAeAg7Al1EccCzqvZUXzhtexMjqjjevBh+B+C1uQtenRPNfUBkrIoS1jeQcpCzT18m G0o5w5PlSBW27vT4NcwZVkuO+Rk0elv3pyoyPTJD+Nz8+iTLoHDSxn8CB9dvNwz/8LJw 3KIZmx0NhYJN7JwMlAepamr93sL10PgdMQ9soao6F0YAAfU4pC4NQtdt/uwevbDK5/gN ayik28LoFiXlUc6GrtYyhfNqygzpfZjSy8zlXTPKvoGcOWTr06swkpDtWHgCN/I36tfo 8Vyp6K+BXJ/YK+rzjxBwSdjLYwRtRyA0xvUoMHUWXPH7/+3bIxNpZgQLr+e+wwxIfnCz gSFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sEjKnbNf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si240062eds.411.2021.06.02.08.57.00; Wed, 02 Jun 2021 08:57:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sEjKnbNf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232294AbhFBP5s (ORCPT + 99 others); Wed, 2 Jun 2021 11:57:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:50102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231474AbhFBP5r (ORCPT ); Wed, 2 Jun 2021 11:57:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E8F76139A; Wed, 2 Jun 2021 15:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622649364; bh=0+ttTFtR3wVvom3XUhqGkOd1u+wQH6+lzC3K8Fb6Go8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=sEjKnbNfbSBMp7xHwr2mZkFmT7ZIJ+M+BvcoSnJLEkgXjfyhU2xzzfsuNYI7Kgg+y 4D9fLdIhz2C8svTlEezci7xeaRsD5FBiq6AhSPaGiO/L14onlrtOqh2fAgSYV44FRK dKozh0xkYBQ+LRftGLgvAu1iTfqI16Kaish3xymzKgEsJLzFCudHJ4UmsodmnnhaeK 4nriDD/S23kN1tkaAqLr2jAbyAHZBAXOb1DXo2495Dha0LLQbmVXjtY0w0Z4gjdoTX CRN0S7e0biMvZv8+yyS4/brYTJzT5xBFbTl+zgudv6pSHg7zx/Z+pU8xSldsIXacGF SpxdZCA8Yn3Wg== Date: Wed, 2 Jun 2021 10:55:59 -0500 From: Bjorn Helgaas To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Bjorn Helgaas , Kalle Valo , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Marek =?iso-8859-1?Q?Beh=FAn?= , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , vtolkm@gmail.com, Rob Herring , Ilias Apalodimas , Thomas Petazzoni , linux-pci@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] PCI: Disallow retraining link for Atheros chips on non-Gen1 PCIe bridges Message-ID: <20210602155559.GA2028037@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210602120816.axi4dtnyg5gl2h2z@pali> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Jun 02, 2021 at 02:08:16PM +0200, Pali Roh?r wrote: > On Tuesday 01 June 2021 19:00:36 Bjorn Helgaas wrote: > > I wonder if this could be restructured as a generic quirk in quirks.c > > that simply set the bridge's TLS to 2.5 GT/s during enumeration. Or > > would the retrain fail even in that case? > > If I understand it correctly then PCIe link is already up when kernel > starts enumeration. So setting Bridge TLS to 2.5 GT/s does not change > anything here. > > Moreover it would have side effect that cards which are already set to > 5+ GT/s would be downgraded to 2.5 GT/s during enumeration and for > increasing speed would be needed another round of "enumeration" to set a > new TLS and retrain link again. As TLS affects link only after link goes > into Recovery state. > > So this would just complicate card enumeration and settings. The current quirk complicates the ASPM code. I'm hoping that if we set the bridge's Target Link Speed during enumeration, the link retrain will "just work" without complicating the ASPM code. An enumeration quirk wouldn't have to set the bridge's TLS to 2.5 GT/s; the quirk would be attached to specific endpoint devices and could set the bridge's TLS to whatever the endpoint supports. > Moreover here we are dealing with specific OTP/EEPROM bug in Atheros > chips, which was confirmed that exists. As I wrote in previous email, I > was told that semi-official workaround is do Warm Reset or Cold Reset > with turning power off from card. Which on most platforms / boards is > not possible. If there's a specific bug with a real root-cause analysis, please cite it. The threads mentioned in the current commit log are basically informed speculation. Bjorn