From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=83.223.95.204 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381084; b=ob2yEFVtwhT1sfk26y0Q89ARfI2EIeyr3MG49RQy5WQYYMuGkJlvDAjWCXfqmz229BFw wNGg5/74f5u7PjqCgMSeK/QZFSfl+MzaOlpMxk7dC1WXFYrx6eoIFP5hE1piPDpIZFGox nQeLmEXLn99S16RnYDjSKW1PSV7bqUtdidIgfBCegtDUbJJRnS2ogzvIGu99MDZUxci+1 yeC6EsqFieyGDNuVb8kYEu24CxB5K6UjsXgVKOjzYjLBmPqzbR4GNP1NEjBvSJA5G89jP sl0Z9cRmdfZjYo6g0Zq4VMkildgolQ/Jx/Sz2roma6zGMsdFPEA+fJ/YAiE9SA2bEXA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381084; h=DMARC-Filter:Received:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=Wb4/bDe9xHxKXFQnePwYlbezFKQ8OAN0aT4uH4zNGGU=; b=H+aR84MY8GDfEhNebqjA3IR7fATocOl/H63SPt7/ULdJS/4nr4+oA6hcHf++QJ3q5qvY poVSfKg0OEewgcJxmcH5BRxR04gEGGcqleWMSu3/IOkDXPtLhvqzch7W3VO1y9Eqnsc4Q ftt0BL+omNUGziNzzNDVjNxMisKSAhQ24WcuN4ktJtX6d4pdV+mz3Mfn4uGTJy14+D2G7 CHU5i7ONKlyIfK5BmjNtEmzRXBI1u1xFfvS6aUrRo5Y8GMnO7qATq8AnfSsiuiFEvusU0 tla+z2EJZXKqvuLGPXcXpMwNc4gLvYyVauR5Z2S3iyblGz6mbbSYdcJH8QZCnX1lOMQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=wunner.de; spf=pass smtp.mailfrom=wunner.de; arc=none smtp.remote-ip=83.223.95.204 Received: from mailout1.hostsharing.net (mailout1.hostsharing.net [83.223.95.204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4D06606A322; Fri, 4 Dec 2026 10:44:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D4D06606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wunner.de Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "*.hostsharing.net", Issuer "GlobalSign GCC R6 AlphaSSL CA 2025" (verified OK)) by mailout1.hostsharing.net (Postfix) with ESMTPS id 82DD13B8; Fri, 04 Dec 2026 11:44:35 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 70A5B600E47F; Fri, 4 Dec 2026 11:44:35 +0100 (CET) Date: Fri, 4 Dec 2026 11:44:35 +0100 From: Lukas Wunner To: "Ziyou Wang (Lenovo)" Cc: Bjorn Helgaas , Kuppuswamy Sathyanarayanan , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Brett Creeley Subject: Re: [PATCH v2] PCI/DPC: Increase recovery timeout to 60 seconds Message-ID: References: <20261106082612.1840817-1-ziyou.dev@foxmail.com> X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: [cc += Brett] On Fri, Nov 06, 2026 at 04:56:55PM +0800, Ziyou Wang (Lenovo) wrote: > +++ b/drivers/pci/pci.c > @@ -80,7 +80,6 @@ struct pci_pme_device { > * limit, but 60 sec ought to be enough for any device to become > * responsive. > */ > -#define PCIE_RESET_READY_POLL_MS 60000 /* msec */ Please delete the code comment above the #define (since you're moving it to drivers/pci/pci.h). > +++ b/drivers/pci/pcie/dpc.c > @@ -116,12 +116,13 @@ bool pci_dpc_recovered(struct pci_dev *pdev) > return false; > > /* > - * Need a timeout in case DPC never completes due to failure of > - * dpc_wait_rp_inactive(). The spec doesn't mandate a time limit, > - * but reports indicate that DPC completes within 4 seconds. > + * Wait for DPC recovery completion. Use PCIE_RESET_READY_POLL_MS > + * (60s) to match pci_dev_wait() timeout. Some devices need >5 seconds > + * to recover after DPC containment. The 4 second timeout is too short. > */ After this patch is applied, nobody will understand "The 4 second timeout is too short" unless they dig around in the git history. The "(60s)" is problematic because it needs to be updated whenever PCIE_RESET_READY_POLL_MS changes. pci_dev_wait() doesn't use PCIE_RESET_READY_POLL_MS. pci_bridge_wait_for_secondary_bus() does. How about a one line change à la: > - * but reports indicate that DPC completes within 4 seconds. > + * so use the same timeout as pci_bridge_wait_for_secondary_bus(). Thanks, Lukas