Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp192009rdb; Thu, 30 Nov 2023 02:04:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGeSPvI9j+LeSEsFoDPryAzuB4BmPxDH687jVRS2hoGwUIOIG1dxgOrSe04ezihrVKiq1HJ X-Received: by 2002:a05:6a20:daa8:b0:18b:914a:a81 with SMTP id iy40-20020a056a20daa800b0018b914a0a81mr25722979pzb.52.1701338653709; Thu, 30 Nov 2023 02:04:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701338653; cv=none; d=google.com; s=arc-20160816; b=WtmRooPH+OOOi2Mh51/gbUOqGWyWQFIXqJQkRirczueC54rpKaOBNquCx5GPgHFwT3 JCcU5LfdFGffWHCImvMEJ2Cx4WxceBUTBBRaZ1OFlK3n6A6mRGP1SWigfYPeD35T+tdA GwNNAI7sMHqtBp8O2EuhZoWdReUHh8XQOJWAacRadtld4FEHfqI+hIsDZxQRyjA/zWjz /D38puIQZY/HnEUXPvtk14ib7r9Ke6MzsbQ7DHnGnPo6f0pQ5ryg6RbJt75GK3YVDIZO jg0Jg/a6deRpjyVE/WpBH0NfRx47DP9GFu7ELik1LOhvLYP+t/eXKaK1G7oTXoyJh2Kh DYRg== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=lnosoh1hBnueWuOtSRy0HkKH6/JK6yPOp7ZhzOa15fU=; fh=QCt+vYI9mYxewhTnYy55YIESdbPHPY6vohPEppUOiYM=; b=BlcBdq/G5DwWH2tNdx626Ldj6mjeMkOz57pO6GiwpOZ+f4cfEDDO1l9Gsr0rW4emem jrHdeHjPR/pCz52WNa6S5IZed+OaMaWpx9WUEMn/F2hzvyfVDCKjz9Xug38VKk3dpm21 yLbtiuTRVDFeU0l163KzJhIDLjL0ZIWjQfC9im43O9tZLR1Crkszorg0iWohgWjSEAD0 fzD1YeUJrPCTRB1bG9ldp7ymfq6CJrDARBXmYMmykSVxzDgXoqVHXCwHY+IKQgv7wCOr yuo/hLe0xBFLE5XTHwhFQX8jLbo1j+NeVWVL1+Fxe0mp71TviIK+lonErZvttCtHvJsM gI/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id c3-20020a170902d48300b001cff62f4575si935003plg.370.2023.11.30.02.04.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 02:04:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id CB109826E8F3; Thu, 30 Nov 2023 02:04:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235118AbjK3KD4 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 30 Nov 2023 05:03:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231755AbjK3KDz (ORCPT ); Thu, 30 Nov 2023 05:03:55 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3077A10DB; Thu, 30 Nov 2023 02:03:59 -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 fd01.gateway.ufhost.com (Postfix) with ESMTP id D8A9F7F8A; Thu, 30 Nov 2023 18:03:55 +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 18:03:55 +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 18:03:55 +0800 Message-ID: Date: Thu, 30 Nov 2023 18:03:55 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] PCI: Add PCIE_CONFIG_REQUEST_WAIT_MS waiting time value To: Bjorn Helgaas CC: Bjorn Helgaas , , , , , References: <20231129232108.GA444155@bhelgaas> Content-Language: en-US From: Kevin Xie In-Reply-To: <20231129232108.GA444155@bhelgaas> Content-Type: text/plain; charset="UTF-8" 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 Content-Transfer-Encoding: 8BIT 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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 02:04:10 -0800 (PST) On 2023/11/30 7:21, 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). > > s/marco/macro/ > > List the first event before the second one, i.e., the delay is from > exit from reset to the config request. > OK,I will use "from A to B" instead of "between A and B". >> 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. > > Include the spec citation here as well as in the comment below. > OK, I will include the spec citation here. > I assume there are follow-on patches that actually use this? Can we > make this the first patch in a series so we know we don't have an > unused macro lying around? > Yes, we will use the marco in the next version of our PCIe controller patches. Here is the link of current version patch series: https://lore.kernel.org/lkml/20231115114912.71448-20-minda.chen@starfivetech.com/T/#u Do you mean that I should put this patch back to the above series as one of the separate patches? Thanks for your review. >> 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 >> + >> extern const unsigned char pcie_link_speed[]; >> extern bool pci_early_dump; >> >> -- >> 2.25.1 >>