Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp11402pxf; Tue, 23 Mar 2021 20:07:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhKsX8RkgNekLzgsdDBDnxXArAs8lzkKTsXLk3zSeCnrz3QIed3Zv+ET+7FSutl+3SB6fF X-Received: by 2002:a05:6402:430c:: with SMTP id m12mr1096012edc.138.1616555265768; Tue, 23 Mar 2021 20:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616555265; cv=none; d=google.com; s=arc-20160816; b=Iex6+bdOkDveLAPAuVoWb1PBR6kBhRBbiUVywl3/Jcr1Rm6Fs6r/5M/tn1aO/KGXmN VClCD/6UI2Oho/rcENjVb1tbSH7pEETFyfdAEvEpCLqHmx7Ggyg1NHF2g9h+xz6gHJZg /j0ARGWixjB6uOOSJYxZO2HNued7BUwe6v+3abfNC3VhRaH5GwQOS477X+U/4m8G1wHe n4iMQyRDJOfb3Ha7CpYVqQ/OLlFv9YSLRQ3AOf/Bz2/eHaUGaQWEz8U7wlHNx6Emwx1G rMqYLR5d4GLV79xn86u4SAybiLnuH/w0OVPwrc0srkm1JGOT+iHtQBJALA7K++p+m4EK LfbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hgxdo4ZUUEitXDWs4Mlm83kBINAI4vjmbUS8R5zTyqM=; b=Np2QgG57odF79Ase03uLz86RwaZukpAn4Eu4D5HifUwJc5qnPvPmpNvFcEIbK0hvnV p120lvrvvkxhNX8rYJEzdXPhbOMBX9L0ekaalmosVg1aalw51XUmfjyg+vPoo0ayglbI RACi5H33RtxxuXBgtAKYUkWzJjFRslNn6F57fDlKvgVzynINCNt38jZxLxzruUhHiMP4 w6zVLvBwJjw2EJVeyWJg/mfDBr2vCodgWeKk8vSKzgDWBVEbu4i/qU4l5uw8WEQQ7B86 qxJmeL6uyp53BSFBA0s21WqPTxmTPGkNXMUpWkLD8KUvBgvIskGiK5WTHsfFsjJS9a8R mb7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dpkg1HfJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 n15si685344edv.534.2021.03.23.20.06.43; Tue, 23 Mar 2021 20:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=dpkg1HfJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S232114AbhCWOvh (ORCPT + 99 others); Tue, 23 Mar 2021 10:51:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:37142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232283AbhCWOv2 (ORCPT ); Tue, 23 Mar 2021 10:51:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A837661983; Tue, 23 Mar 2021 14:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616511087; bh=hgxdo4ZUUEitXDWs4Mlm83kBINAI4vjmbUS8R5zTyqM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dpkg1HfJVEeaaDXnvy5P0QTofpqOzmmn+SKtNcOu2q3IhyXJwQeuYGE67ash+xPIQ F2y6BUnNTPHMx2lKgxOhZp4jHt4kjeTOLU0+3Fg1R7nhf0tdwAOIW6IXpArC90p+yY IJjQ6k3C7boc8ebEQnNqMLvgV4L9YQEUALU2By0e3GSty8Po/2cDJu7Nmh16qV+HQZ TyU8ox0nbEJovwHDkfE1+LIvayUVp8IJi4DUUA98ZL+m4v7SqMtSQ4Hali2r4EhHds ungF7YHvoHMVHuuErZziga+H2O4R31eqQGDSd8XLaQ7DGOgfUlqcmqWii42A4KNG4s kG2GTIRddU7uA== Received: by pali.im (Postfix) id 2283192C; Tue, 23 Mar 2021 15:51:25 +0100 (CET) Date: Tue, 23 Mar 2021 15:51:24 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Jianjun Wang Cc: Bjorn Helgaas , Alex Williamson , Amey Narkhede , Rob Herring , maz@kernel.org, Lorenzo Pieralisi , Ryder Lee , Philipp Zabel , Matthias Brugger , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sj Huang , youlin.pei@mediatek.com, chuanjia.liu@mediatek.com, qizhong.cheng@mediatek.com, sin_jieyang@mediatek.com, drinkcat@chromium.org, Rex-BC.Chen@mediatek.com, anson.chuang@mediatek.com Subject: Re: [v8,3/7] PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192 Message-ID: <20210323145124.6myowqcjga5ro2pn@pali> References: <20210224061132.26526-1-jianjun.wang@mediatek.com> <20210224061132.26526-4-jianjun.wang@mediatek.com> <20210311123844.qzl264ungtk7b6xz@pali> <1615621394.25662.70.camel@mhfsdcap03> <20210318000211.ykjsfavfc7suu2sb@pali> <1616046487.31760.16.camel@mhfsdcap03> <20210319185341.nyxmo7nwii5fzsxc@pali> <1616463094.25961.8.camel@mhfsdcap03> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1616463094.25961.8.camel@mhfsdcap03> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 23 March 2021 09:31:34 Jianjun Wang wrote: > One more question, is there any chance that we can put this linkup flow > to a more "standard" way, such as drivers provides the ops of the PERST# > pin and let the framework to decide how to start a link training, or we > just use macro to replace this timeout value in the future? This is something about which I was thinking that could be useful for pci-aardvark.c driver. But I was not sure if some other driver can benefit from such "framework". But now I see that your driver is another candidate which can benefit from it. Currently there is no such "framework" in kernel and the hardest part would be to design it. Having this API would allow kernel to implement and export PCIe Warm Reset (which is done via PERST# signal) and easily extend Amey's reset patches to export also Warm Reset via sysfs. But to implement this framework and using it for reset we first need to answer questions which I have sent in email: https://lore.kernel.org/linux-pci/20210310110535.zh4pnn4vpmvzwl5q@pali/ Bjorn, Alex: any opinion about PERST#? Also see Enrico's email, where confirmed that there are platforms which shares one PERST# signal for more endpoint cards: https://lore.kernel.org/linux-pci/1da0fa2c-8056-9ae8-6ce4-ab645317772d@metux.net/