Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3557859rdb; Wed, 27 Dec 2023 11:08:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcyCRBzG2faquqik1kxTWPgA1caHQP8EbTaWhjy0HGJNNb6saxpoSGsFgZJ7Hcy0dNgV/T X-Received: by 2002:a17:902:8c97:b0:1d4:1370:ebd4 with SMTP id t23-20020a1709028c9700b001d41370ebd4mr3719723plo.27.1703704112848; Wed, 27 Dec 2023 11:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703704112; cv=none; d=google.com; s=arc-20160816; b=C3j0LhXGd4FYwS1TANsuXloR+mOKf6PN9SxlWhdcZ8lTmwHl1RkXTSLtZZqQ/6DB29 eqhrUujlZZjd4wn9FcNk6NNg86gKICsx5dJVZjq5GrdsmvIw3ayGNR5Rj2MpnT8Sp0kC 4L7nxrPuk+oTy/Kwfjj6IwVYMdlT2Oo8/3AsC5WDC11lNWqkHgez9pVpPXSJj1HacNo2 4IqRKBP1CMuyqWYZGx/c9IbEckReeLkLt4UypUp0sr0zR5HIhDtycP+5+Xa+tOicv24k 3BYS1MkUIyprusK5+Hqu++UGwL5ft3YGXBH4AZzzvaasLafdWPEjlmjcuULTIOtSLgCI u5yw== 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:message-id:subject:cc:to:from :date:dkim-signature; bh=Pl2Mt6zhKbFQ/0DIqlYyUmF7/8uUbS59EvDXRzVQuRc=; fh=edLK6CrLZnoyngH4Z0tRvVYoYKorJO0VIuKCSDp0nUE=; b=lloeMNz67X3BwmFAvOeoYt4eJa27aDKg3l9UQqhELjPAZkeObjU/4txeuDPqiAM71M 4Max7phOt6A7+GTSkJUFPh1mifCfwnMyP+ygZMT/KAZ+NvHbQ8x/Yz3/HOior6Y72JU0 L29oEk0vc1nR5NasjlUDmiWPwDxmOyPP3HiemyU82Nxt6ssFUAYVdu3UCtXIYdLmhuQh Jb540DHNxtVX3WxhAul8bUa5qB2gc3QS6FGuYPEyLAW+uJ+1mEmcp+VwB4TsQVoG7D3Z djTvdmCLZNDJV90Wlg6prU2e93HGvzVVG15k3Qps6LmUKOqhggaZEZUsBgRreOqUk4je R+zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F5TSRvAA; spf=pass (google.com: domain of linux-kernel+bounces-12223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12223-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 g7-20020a170902868700b001c36018fdaasi11406167plo.219.2023.12.27.11.08.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 11:08:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12223-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=F5TSRvAA; spf=pass (google.com: domain of linux-kernel+bounces-12223-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12223-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 7FA65B227B0 for ; Wed, 27 Dec 2023 19:08:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB19C4776F; Wed, 27 Dec 2023 19:08:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F5TSRvAA" 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 1F96046B87; Wed, 27 Dec 2023 19:08:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4118FC433C7; Wed, 27 Dec 2023 19:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703704095; bh=ATu15DdJu3KphR7LFYKeEXCMXYokrV8F6bk6Aa0fZc4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=F5TSRvAADaGRV2HGx2D8sugO90Z38C23ezQdcbj1FEmLF7yydZRoQ7gLUjrUxqJXS YlMF0p4wMPtmIXqNH3X52dm5iFwSujhlJ0qk6m6/UFaeax70WR+jE2CJq4XioV28fT HTWpu9uvSn/bZMt1tn2YKYqmV2jHOCyh96lm/qfaEZwRFsfTkHqnpta//0R+3eJrJT v7mZqkGHrgCW0rov70FInyDP90P3Yn/S5dPWJ+531cfLshH4RdInaEKHfqqUxqUdXo e74d5UuX9nTFcm8ZrltAKVoBrXYubi1XgzT7IZvQfYConmO1R9m1hcXTO3Z1/1uOvO 41IlJFs3gH6ow== Date: Wed, 27 Dec 2023 13:08:13 -0600 From: Bjorn Helgaas To: Minda Chen Cc: Conor Dooley , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , 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: <20231227190813.GA1508471@bhelgaas> 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 Acked-by: Bjorn Helgaas > --- > drivers/pci/pci.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > 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 >