From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2957C5AE59 for ; Thu, 5 Jun 2025 12:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/wbIXJ/BVSq0iREzp399yt59a6n4rlAuR5jxZXtuQcA=; b=spjAwZYlj5XdVl cu+qmQUSW4Ns2qoBbq9r4VX6umeM7bYgPqmL2/UAbZCwAW2dz+DifmzBlfbD+2WtKIz9gNcio2Zfi nlUf1ocn/gJZKZTRFQLp9g9eM3/VtCtPAgx+hSaQzdH65tphQhlAHBfx2M6G6DJHJpvxGR9JnxX/m C+3HVp74qVHQzdOSdEPp3QN6geq/KBJzhDfCMzIrnw4aQ1JIMghtf5wsmWHMOYlQd24tBfahZ8sHC nAgwEO/FmI5JHQ/ADtbcAs5+TKav0D9e993+aL6E1ia/zaU3IvqO/DB2gH8dMlJII+MmMj7jUWRQ2 C4Qjio7jI0h716q00R4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uN9tc-0000000FUsv-0rJd; Thu, 05 Jun 2025 12:40:36 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uN9iD-0000000FTj3-0tRr; Thu, 05 Jun 2025 12:28:50 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id D0D3EA506E7; Thu, 5 Jun 2025 12:28:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80FADC4CEE7; Thu, 5 Jun 2025 12:28:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749126527; bh=OsTzD+oORNTzhAZmxmT/ueCMxPcm05WUBUz9VWZM/PI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g2s7MXZrn6Og/9t2StYKytwNqM8xht9QkdPBaXhclk+Rpfm8jYQGfNh+/87G9Z7Aj bUjNTQDxBwTbexMFcNXzCn/g2ap8mMmhubkmnKRIcFwa7OM2PqvMrSk+Cb5DhL05VG RUNxClMieuWFyzVnIeyEAYVQVdGLK1B33ObOk+791RlcHnjPIbuKqV+TU7+ghzBphh BS/IkXrrg40u2+6oU3XMvhlPhqFNhgW7EwLTg3XwTJq+IDQPbJixpzZCQmwoPv528A /98ac8Rix/Iw+xCS0pULxLA1GOPJnaZCWjLb12W3cq0O7Q1ODGUZHPfWTnUfC9KkDR 8jNrzYlOgItEg== Date: Thu, 5 Jun 2025 14:28:41 +0200 From: Niklas Cassel To: Bjorn Helgaas Cc: Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Heiko Stuebner , Wilfred Mallawa , Damien Le Moal , Hans Zhang <18255117159@163.com>, Laszlo Fiat , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v2 1/4] PCI: dw-rockchip: Do not enumerate bus before endpoint devices are ready Message-ID: References: <20250604184445.GA567382@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250604184445.GA567382@bhelgaas> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250605_052849_318288_98831719 X-CRM114-Status: GOOD ( 19.03 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Wed, Jun 04, 2025 at 01:44:45PM -0500, Bjorn Helgaas wrote: > On Wed, Jun 04, 2025 at 10:40:09PM +0530, Manivannan Sadhasivam wrote: > > > > If we add a 100 ms sleep after wait_for_link(), then I suggest that we > > > also reduce LINK_WAIT_SLEEP_MS to something shorter. > > > > No. The 900ms sleep is to make sure that we wait 1s before erroring out > > assuming that the device is not present. This is mandated by the spec. So > > irrespective of the delay we add *after* link up, we should try to detect the > > link up for ~1s. > > I think it would be sensible for dw_pcie_wait_for_link() to check for > link up more frequently, i.e., reduce LINK_WAIT_SLEEP_MS and increase > LINK_WAIT_MAX_RETRIES. > > If LINK_WAIT_SLEEP_MS * LINK_WAIT_MAX_RETRIES is for the 1.0s > mentioned in sec 6.6.1, seems like maybe we should make a generic > #define for it so we could include the spec reference and use it > across all drivers. And resolve the question of 900ms vs 1000ms. Like Bjorn mentioned, when I wrote reduce LINK_WAIT_SLEEP_MS, I simply meant that we should poll for link up more frequently. But yes, if we reduce LINK_WAIT_SLEEP_MS we should bump LINK_WAIT_MAX_RETRIES to not change the current max wait time. Bjorn, should I send something out after -rc1, or did you want to work on this yourself? Kind regards, Niklas _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip