Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4932394rdh; Wed, 29 Nov 2023 15:22:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IELfzsh2x4fbmTJp0BwuDPN6r85Kqj/6zZmw0cMwYpFsIHhDgZs0jO4H4y+n2IMjV8Nebxy X-Received: by 2002:a17:90b:4b8f:b0:286:2e71:1392 with SMTP id lr15-20020a17090b4b8f00b002862e711392mr2210768pjb.9.1701300157579; Wed, 29 Nov 2023 15:22:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701300157; cv=none; d=google.com; s=arc-20160816; b=RwPYKEcFci1bics7BzD5H632b0nJ6JbJpKGuY8IfUSH9F1gI5NkQuu04UmDeDJ9tQJ jeD9hzvbqca4PHKU/tB+sgt5EzReTT6DTNGEb9eQhHq3NoDPmX4qvG7XYeo1wLSYpsAf 4QHqoVpIM0sddspkAYNh9alHE7ZO8VaYbSCPPj4cfPbt7RuFygFECgiynLc19Jd57Hzf 2IwZUEaWE4dUXkvRCWgaSFhK/ercWM73h57aZWZ01PkVx9q1wGx3J3CGD6GPCgNfJVEd pTE4bFYYXIi4Y3mBFsk5GQJGHorjftqvxnQXK74Fw7q8H66hxKI7W1rCimJD240j1LfR RkmQ== 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-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=hen51TNgGHfD8cn7rqWV7cNwRcmRs4IqEaNjUsVCem8=; fh=cN/WNadKQ17Ve9nvb1w5HqEJy5EVJl/bACIsnLZBQh0=; b=QCkatF0mS7Fo/ZcUCqlJR1QHAaOQk34lNKNR9omCF992Nm4/Mhb9QWMHJB8x6FjIhU awuzorU1KWhVyVjiUp8sXugjb0Qe8RepBJAt1tE/bZLyQc5G9b9ZbeJ00UvOukw/jY8C 2/jqGSTxvN+xNVERRdFJxvwwi3FbzLKDezut5MQjv9IdptvpBGdIqlypZHb1/aSAvJpX MQ5BlWpZfLBc2xPnv42DNRG1322fyn16iDdo+QyEKo2DtqsWBSNMt+43MId7NUeSE+NL fkxI7gBo/b1iGZHZp1fUyQd5VwYYrASIl466zqCH6rQ3VUTYmHqZAzqM4qK8Oi7pzHnv ovaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kUHjbiYj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id rm9-20020a17090b3ec900b00278f81e54cdsi2385648pjb.19.2023.11.29.15.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 15:22:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kUHjbiYj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 221D180B8DCC; Wed, 29 Nov 2023 15:22:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343660AbjK2XWQ (ORCPT + 99 others); Wed, 29 Nov 2023 18:22:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjK2XWP (ORCPT ); Wed, 29 Nov 2023 18:22:15 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7D91A2 for ; Wed, 29 Nov 2023 15:22:21 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34F35C433C7; Wed, 29 Nov 2023 23:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701300141; bh=0euqzIph0L67aoLFECRKJJGk+Cwo0OYK7duqaEhztvI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=kUHjbiYjoCXXjDtK4+6sAkFll8K8C0VugBxif088joxOVNumvw/414ipgLvmnDV5m HBofxkICxZVmf/07EC8Exs6qtzZUHwjclvn34xr2hLPoT2wZedNplYgA4Tpd5hKnUl cBtdbfgtZ4FD+6jwR5QnysRYqpLWL/w1ZITtcK3+SXGCnDPt1eRAir/ogA5g7V7Nly m15DUBveoyvEmcy1HtYve6yGRYHtjDBXSzOfxa22ejElrt/qf/n7Pb5TnfRP2tmDgb VwWH5CsGqjX2OqemGhzpohjCmMsvRZN3PTttJddrgYXkR/a+g0zKiFeWTzLChTF0Ce A025HHEXFFspA== Date: Wed, 29 Nov 2023 17:22:19 -0600 From: Bjorn Helgaas To: Kevin Xie Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, mason.huo@starfivetech.com, leyfoon.tan@starfivetech.com, minda.chen@starfivetech.com Subject: Re: [PATCH v1] PCI: Add PCIE_CONFIG_REQUEST_WAIT_MS waiting time value Message-ID: <20231129232219.GA444277@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231124014508.43358-1-kevin.xie@starfivetech.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 15:22:34 -0800 (PST) On Fri, Nov 24, 2023 at 09:45:08AM +0800, Kevin Xie wrote: > Add the PCIE_CONFIG_REQUEST_WAIT_MS marco to define the minimum waiting > time between sending the first configuration request to the device and > exit from a conventional reset (or after link training completes). > > As described in the conventional reset rules of PCI specifications, > there are two different use cases of the value: > > - With a downstream port that supports link speeds <= 5.0 GT/s, > the waiting is following exit from a conventional reset. > > - With a downstream port that supports link speeds > 5.0 GT/s, > the waiting is after link training completes. > > Signed-off-by: Kevin Xie > Reviewed-by: Mason Huo > --- > drivers/pci/pci.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index 5ecbcf041179..4ca8766e546e 100644 > --- a/drivers/pci/pci.h > +++ b/drivers/pci/pci.h > @@ -22,6 +22,13 @@ > */ > #define PCIE_PME_TO_L2_TIMEOUT_US 10000 > > +/* > + * PCIe r6.0, sec 6.6.1, > + * Requires a minimum waiting of 100ms before sending a configuration > + * request to the device. > + */ > +#define PCIE_CONFIG_REQUEST_WAIT_MS 100 Oh, and I think this name should include something about "reset" because that's the common scenario and that's the spec section where the value is mentioned.