Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp224771rdb; Thu, 30 Nov 2023 03:13:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGu5geCUOxn/Zl5Y4thIl0OoouI9BAEBIfMqR1aK8oJ1yelr3wO0vFKLu7JOELuXYXNk2uI X-Received: by 2002:a05:6a21:3714:b0:18b:8147:91fb with SMTP id yl20-20020a056a21371400b0018b814791fbmr15876772pzb.19.1701342817125; Thu, 30 Nov 2023 03:13:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701342817; cv=none; d=google.com; s=arc-20160816; b=NLAg17BRHPAJFPNLsWzLNQkGHmemtBn8DKIFEH+/MiDdgZjIfraLHxBHhWjJ1f8qTN Yp0vSRQQCUqzmCUEb8aahokHoTwXrK9+KD8fY9rJxS3M390wWl8OLBtFezjCHgz8rtPJ Dtzv7dqQ5wpqrtMJPreLz8Qv/MXqMtwVsIFvovYGjqznJJmDS/U3g1azkygi/rcJoap0 BNgqO9TjfK88+fWIvg3ubB9TJxFYhyYN/2q8ePLmTf4gz3WRRMxda2eON5/K3NQp9Vvy eh2TSFaOBd8WsKpXionp7ILVORqNYF9d9Grrp/ntwV/IjVzyK1FAqG+Qwaghb/h/AFjS Z8eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=giFtnNFgVAv6cLqdH0ik/oVQbKHgJv4NF0FkZb92W1c=; fh=QCt+vYI9mYxewhTnYy55YIESdbPHPY6vohPEppUOiYM=; b=s2nWTGv5yI8x1Y213gpVnrPp3bnAAE2ehFFCB2QrCw08JPtXK1b5NiIU4OhUz/8+tm Kkjg6P2jGqBEe2oJFWho6IbBiJ6XnToYzW080vikwsFS7Io98E7JvOKFkAIaEnhstSpY fgIfBxvb3iDvvwQ0TOYa4XiE3Rrjn69kEiN7jd0olIBqIjxKyAttb2VI9dZbrJKpRM0e zBxFh560SnM5NxLRL/xILyr115WUnYFchQl0agKh8qSuG07g6JkpoJ85iOhk7LbgsyNG RPLoJDAl2+QZ2Ak987TTHhdZ8H3BI/aJE3FPmBUJGb2OTVCQfEVuUi1qLGb+gg+9qhyk 1QGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l9-20020a654489000000b005b9293fcf78si1086387pgq.10.2023.11.30.03.13.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 03:13:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CA3E8802F68C; Thu, 30 Nov 2023 03:13:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231861AbjK3LNN (ORCPT + 99 others); Thu, 30 Nov 2023 06:13:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231784AbjK3LNL (ORCPT ); Thu, 30 Nov 2023 06:13:11 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBC1810D0; Thu, 30 Nov 2023 03:13:12 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 45F9524E052; Thu, 30 Nov 2023 19:13:05 +0800 (CST) Received: from EXMBX172.cuchost.com (172.16.6.92) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 30 Nov 2023 19:13:05 +0800 Received: from [192.168.125.136] (113.72.145.176) by EXMBX172.cuchost.com (172.16.6.92) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 30 Nov 2023 19:13:04 +0800 Message-ID: <78255041-47a3-4f52-97cd-83347c5813bd@starfivetech.com> Date: Thu, 30 Nov 2023 19:13:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] PCI: Add PCIE_CONFIG_REQUEST_WAIT_MS waiting time value Content-Language: en-US To: Bjorn Helgaas CC: Bjorn Helgaas , , , , , References: <20231129232219.GA444277@bhelgaas> From: Kevin Xie In-Reply-To: <20231129232219.GA444277@bhelgaas> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [113.72.145.176] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX172.cuchost.com (172.16.6.92) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Thu, 30 Nov 2023 03:13:34 -0800 (PST) On 2023/11/30 7:22, Bjorn Helgaas wrote: > 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. Agree, how about PCIE_RESET_CONFIG_DEVICE_WAIT_MS?