All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ziyou Wang (Lenovo)" <ziyou.dev@foxmail.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI/DPC: Increase recovery timeout to 60 seconds
Date: Fri, 06 Nov 2026 08:35:04 +0000	[thread overview]
Message-ID: <sashiko-outbox-201069@kernel.org> (raw)
In-Reply-To: <tencent_0EA784F33CA15095806009C26E9DD624B809@qq.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] PCI/DPC: undeclared PCIE_RESET_READY_POLL_MS in
  pci_dpc_recovered()
--

commit 9107bdc3c03dade9f834df49cdbc6c47d0a15a44
Author: Ziyou Wang (Lenovo) <ziyou.dev@foxmail.com>

PCI/DPC: Increase recovery timeout to 60 seconds

This commit increases the DPC recovery wait timeout in pci_dpc_recovered()
from 4 seconds to PCIE_RESET_READY_POLL_MS (60 seconds).

> diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c
> index 2b779bd1d861b..df1c469fa24cd 100644
> --- a/drivers/pci/pcie/dpc.c
> +++ 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.
>  	 */
> -	wait_event_timeout(dpc_completed_waitqueue, dpc_completed(pdev),
> -			   msecs_to_jiffies(4000));
> +	wait_event_timeout(dpc_completed_waitqueue,
> +			   dpc_completed(pdev),
> +			   msecs_to_jiffies(PCIE_RESET_READY_POLL_MS));

[Severity: High]
Does this fail to build when CONFIG_PCIE_DPC and CONFIG_HOTPLUG_PCI_PCIE
are enabled?  PCIE_RESET_READY_POLL_MS is defined locally in
drivers/pci/pci.c rather than in drivers/pci/pci.h, so it is undeclared in
drivers/pci/pcie/dpc.c.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_0EA784F33CA15095806009C26E9DD624B809@qq.com?part=1

      reply	other threads:[~2026-11-06  8:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06  8:26 [PATCH] PCI/DPC: Increase recovery timeout to 60 seconds Ziyou Wang (Lenovo)
2026-11-06  8:35 ` sashiko-bot [this message]

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=sashiko-outbox-201069@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.