Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3459747rdb; Wed, 27 Dec 2023 08:03:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlFkPXehpQ6jS7KE5qEJ0BWMqyfIC8UEI7+b2+G0BJOzjuA+/nbrHztkUUldGPAxdReUhq X-Received: by 2002:a05:6358:70d:b0:175:cdb:99f6 with SMTP id e13-20020a056358070d00b001750cdb99f6mr19260rwj.13.1703693037493; Wed, 27 Dec 2023 08:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703693037; cv=none; d=google.com; s=arc-20160816; b=RPPZMTB3rXeQTZlUvXOGCNDkdpoU5aO41AR98yEsBzNIY1AbPutp63EiSGTfkWvtJB cYzqt1rfpBe5c/Qih7B6rcmW7ML23UQQtLpK0oa3iL9bBFADsoTe7/YJBRCkP28KZs/D bDoYULD1ndhAgL2pm3WBpWDf2/EovneQnOnvLT9htD5B+MLRATfYRz4hRhdf+K33xcJI 7uEjYIfV8EaYDaCh0nos5IV+Z00PhE4Hzpi9fjOUkKUY/3eLJoEIXORIGJaYA5qU2fyb UMjogcWimM9d11HLVeBVR4Fd3xSLqI7HPrWmcsjD+BhQljFn7RdBFvtQhIj5LA6HIX55 mcyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HwDzTym/qO0XN6tysZg6tyUSmbSI5a7H6HN4LVb7wzA=; fh=fPOM0qMwOVM+EThLToRM6IhB27HrQzIPXkBOD5SQzr8=; b=HwSluLPYlmcdkc8rEeRmpPnzBRQ6YW+G8QFMZsG0Rdo5rHlUOygWWqs13YYB79P9Mo pbev8XaMnA1e9KVRPbR563+wBuGmqs8HfPBPSVnSUI3BswsgN+cVF+uYfNqPDfxDR45Y +J6MTAeZWZmNdoFqi/AqbBHzMIuGNK3AAnxindwH5u15e+sYJWod3wdW8wS0F9RCa/96 rfPTWpNN68l6rocqHyrSfeum4RcnCMjVzyw6FnzcSjlRvwpRhykC9LKkLHcxyNxJsCc9 P4G6wSH8Nev1KpXNEobnxWrmkpBNI/H2ADvCFscNuNCsNcgQQoSiRretZinwvJT+164t p8aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OabpMPYL; spf=pass (google.com: domain of linux-kernel+bounces-12100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j10-20020a63594a000000b005cdc081bd32si11098226pgm.646.2023.12.27.08.03.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 08:03:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OabpMPYL; spf=pass (google.com: domain of linux-kernel+bounces-12100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DF60DB22374 for ; Wed, 27 Dec 2023 16:03:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E1F945BFE; Wed, 27 Dec 2023 16:03:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OabpMPYL" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37F854597E; Wed, 27 Dec 2023 16:03:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE0FFC433C8; Wed, 27 Dec 2023 16:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703692993; bh=w4l0ziBQD5BKenyLSX5hoKKoL4xt66ApvAEEBRXc3BA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OabpMPYLkty7z4VERKGYdiml7+nRnd1s2Oq6cxbcv33SPQHECsKINff03ehGKjEZe F9TAq5gUZRvW3GG7BvGQa8AKOjce5mnk6a0KsUB8Ppx5ey9IyCuvPXMf5InI0XgfTA 9+NQ2+SQz/RZITHfcQymP1rQBnVraKxMENCdz8qdXlmStrZ3Mt3NGkH98/2to87PyP GjzueFKy6C3PTpvvg3yzeSDsK2vEFGJMoq94x0cn7CZwE8w8fZ15zpSo1+x+AmUcdx DAvbYa4joxMw9CRw1RvZYyA/UE9esIneiJjMoxgDduFP3zcdHCtKFSUVG0hsNaIy2K l7xreXFt49TtA== Date: Wed, 27 Dec 2023 17:03:05 +0100 From: Lorenzo Pieralisi To: Minda Chen Cc: Conor Dooley , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Daire McNamara , Emil Renner Berthing , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pci@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie Subject: Re: [PATCH v13 19/21] PCI: Add PCIE_RESET_CONFIG_DEVICE_WAIT_MS waiting time value Message-ID: References: <20231214072839.2367-1-minda.chen@starfivetech.com> <20231214072839.2367-20-minda.chen@starfivetech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231214072839.2367-20-minda.chen@starfivetech.com> On Thu, Dec 14, 2023 at 03:28:37PM +0800, Minda Chen wrote: > From: Kevin Xie > > Add the PCIE_RESET_CONFIG_DEVICE_WAIT_MS macro to define the minimum > waiting time between exit from a conventional reset and sending the > first configuration request to the device. > > As described in PCI base specification r6.0, section 6.6.1 Reset>, there are two different use cases of the value: > > - "With a Downstream Port that does not support Link speeds greater > than 5.0 GT/s, software must wait a minimum of 100 ms following exit > from a Conventional Reset before sending a Configuration Request to > the device immediately below that Port." > > - "With a Downstream Port that supports Link speeds greater than > 5.0 GT/s, software must wait a minimum of 100 ms after Link training > completes before sending a Configuration Request to the device > immediately below that Port." > > Signed-off-by: Kevin Xie > Reviewed-by: Mason Huo > --- > drivers/pci/pci.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) This needs Bjorn's ack. Thanks, Lorenzo > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index 5ecbcf041179..06f1f1eb878c 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -22,6 +22,22 @@ > */ > #define PCIE_PME_TO_L2_TIMEOUT_US 10000 > > +/* > + * As described in PCI base specification r6.0, section 6.6.1 + * Reset>, there are two different use cases of the value: > + * > + * - "With a Downstream Port that does not support Link speeds greater > + * than 5.0 GT/s, software must wait a minimum of 100 ms following exit > + * from a Conventional Reset before sending a Configuration Request to > + * the device immediately below that Port." > + * > + * - "With a Downstream Port that supports Link speeds greater than > + * 5.0 GT/s, software must wait a minimum of 100 ms after Link training > + * completes before sending a Configuration Request to the device > + * immediately below that Port." > + */ > +#define PCIE_RESET_CONFIG_DEVICE_WAIT_MS 100 > + > extern const unsigned char pcie_link_speed[]; > extern bool pci_early_dump; > > -- > 2.17.1 >