Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4715478pxj; Tue, 22 Jun 2021 06:33:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoH4NNsB97R4+CTQ0KS83+HKg3e3n1osYXmSC1vrLOJ3oEt0tER7jFurie4yPrdjwVDHgC X-Received: by 2002:aa7:d74b:: with SMTP id a11mr5107807eds.40.1624368787833; Tue, 22 Jun 2021 06:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624368787; cv=none; d=google.com; s=arc-20160816; b=BG7tX3fbHD+i178DslOiXk3vosU4AmuL690wRq7CB1Uj7wW4+6ugVL02QYGa8x1VA5 OeytO9dX4rNp5Ew1LVsaLARszzTIedcBf7Nsi9J9bxohaV26PV57xeUwHi1s1ImDEMCw jNvLLevPzGP10k6zmHwgbQPkm7inVPX+1nWhzIhimD5eZopjtA/dCd5OpM5eXWYpzK4L CfEpieaN46hkKM1Wy53qXDP+H7Va56GCRrmjeofsIDx9PLh3eWUtIw9CEk/dyoj1IlCP 1mVrFvcAeHn4xrF/t5RgvwQjJzv/17DL9HFN4Zsu8u/7DijfI9BIhDEWTkGLKfAg8Gkp wR5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=VoOi3owm/ASkFKxHA60dZRbEE9WoKPDZ5tQuzHZh+AE=; b=k/355sPprI6tjG0GxagbxF68JTpSSQhxDavRAZ8MSg66uLzCEZ/VP0pGPZDZexe/ua xBxVwTHjjdgi+xwQ/NaHWwVQ2ff0kTTK62FXW+V5DBtko21z3iZKXuXX2HdBA9/7YLD1 7JA5ISrHWEF3lGOJWooCUfCyNW7jLFq8iCufm1DsJjy1nQ1aEJk9+PaA5GZX3uwpbKPy 4x6FMcQV1JPl8Y6mYwJdcSi+Z+LVsEFcPamJ93LuPzEz5tONZ2wYkVG1ggPfi2HtvLTg 2rNOPTodos2U5wWMwScRM48vE9yCSKEOkrwj3xme4LPB/Af6L+BnnDYOqs5h3ZyXKfqQ zF3w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw18si13475496edb.180.2021.06.22.06.32.36; Tue, 22 Jun 2021 06:33:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230381AbhFVNdc convert rfc822-to-8bit (ORCPT + 99 others); Tue, 22 Jun 2021 09:33:32 -0400 Received: from hostingweb31-40.netsons.net ([89.40.174.40]:37744 "EHLO hostingweb31-40.netsons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbhFVNdb (ORCPT ); Tue, 22 Jun 2021 09:33:31 -0400 Received: from [77.244.183.192] (port=62712 helo=[192.168.178.41]) by hostingweb31.netsons.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1lvgUk-0009At-JG; Tue, 22 Jun 2021 15:31:14 +0200 Subject: Re: [PATCH v2] PCI: dra7xx: Fix reset behaviour To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Lorenzo Pieralisi Cc: linus.walleij@linaro.org, kishon@ti.com, linux-pci@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Bjorn Helgaas References: <20210531090540.2663171-1-luca@lucaceresoli.net> <20210531133211.llyiq3jcfy25tmz4@pali> <8ff1c54f-bb29-1e40-8342-905e34361e1c@lucaceresoli.net> <9fdbada4-4902-cec1-f283-0d12e1d4ac64@ti.com> <20210531162242.jm73yzntzmilsvbg@pali> <8207a53c-4de9-d0e5-295a-c165e7237e36@lucaceresoli.net> <20210622110627.aqzxxtf2j3uxfeyl@pali> <20210622115604.GA25503@lpieralisi> <20210622121649.ouiaecdvwutgdyy5@pali> From: Luca Ceresoli Message-ID: <18a104a9-2cb8-7535-a5b2-f5f049adff47@lucaceresoli.net> Date: Tue, 22 Jun 2021 15:31:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210622121649.ouiaecdvwutgdyy5@pali> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8BIT X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca@lucaceresoli.net X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 22/06/21 14:16, Pali Rohár wrote: > On Tuesday 22 June 2021 12:56:04 Lorenzo Pieralisi wrote: >> [Adding Linus for GPIO discussion, thread: >> https://lore.kernel.org/linux-pci/20210531090540.2663171-1-luca@lucaceresoli.net] >> >> On Tue, Jun 22, 2021 at 01:06:27PM +0200, Pali Rohár wrote: >>> Hello! >>> >>> On Tuesday 22 June 2021 12:57:22 Luca Ceresoli wrote: >>>> Nothing happened after a few weeks... I understand that knowing the >>>> correct reset timings is relevant, but unfortunately I cannot help much >>>> in finding out the correct values. >>>> >>>> However I'm wondering what should happen to this patch. It *does* fix a >>>> real bug, but potentially with an incorrect or non-optimal usleep range. >>>> Do we really want to ignore a bugfix because we are not sure about how >>>> long this delay should be? >>> >>> As there is no better solution right now, I'm fine with your patch. But >>> patch needs to be approved by Lorenzo, so please wait for his final >>> answer. >> >> I am not a GPIO expert and I have a feeling this is platform specific >> beyond what the PCI specification can actually define architecturally. > > In my opinion timeout is not platform specific as I wrote in email: > https://lore.kernel.org/linux-pci/20210310110535.zh4pnn4vpmvzwl5q@pali/ > > My experiments already proved that some PCIe cards needs to be in reset > state for some minimal time otherwise they cannot be enumerated. And it > does not matter to which platform you connect those (endpoint) cards. > > I do not think that timeout itself is platform specific. GPIO controls > PERST# pin and therefore specified sleep value directly drives how long > is card on the other end of PCIe slot in Warm Reset state. PCIe CEM spec > directly says that PERST# signal controls PCIe Warm Reset. > > What is here platform specific thing is that PERST# signal is controlled > by GPIO. But value of signal (high / low) and how long is in signal in > which state for me sounds like not an platform specific thing, but as > PCIe / CEM related. That's exactly my understanding of this matter. At least for the dra7xx controller it works exactly like this, PERSTn# is nothing but a GPIO output from the SoC that drives the PERSTn# input of the external chip without affecting the controller directly. -- Luca