From: Lukas Wunner <lukas@wunner.de>
To: "Ziyou Wang (Lenovo)" <ziyou.dev@foxmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Brett Creeley <brett.creeley@amd.com>
Subject: Re: [PATCH v2] PCI/DPC: Increase recovery timeout to 60 seconds
Date: Fri, 4 Dec 2026 11:44:35 +0100 [thread overview]
Message-ID: <axKZk6YJzi-gvlIR@wunner.de> (raw)
In-Reply-To: <tencent_BB887B4DB8D2131AF5026893E0FE567D6D05@qq.com>
[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
next prev parent reply other threads:[~2026-12-04 10:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261106082612.1840817-1-ziyou.dev@foxmail.com>
2026-11-06 8:56 ` [PATCH v2] PCI/DPC: Increase recovery timeout to 60 seconds Ziyou Wang (Lenovo)
2026-11-06 15:21 ` Bjorn Helgaas
2026-11-19 3:30 ` Ziyou Wang (Lenovo)
2026-11-19 9:01 ` Lukas Wunner
2026-11-20 3:22 ` Ziyou Wang (Lenovo)
2026-12-04 2:14 ` Ziyou Wang (Lenovo)
2026-12-04 10:44 ` Lukas Wunner [this message]
2026-12-04 17:19 ` Creeley, Brett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=axKZk6YJzi-gvlIR@wunner.de \
--to=lukas@wunner.de \
--cc=bhelgaas@google.com \
--cc=brett.creeley@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=ziyou.dev@foxmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox