mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Krzysztof Wilczy??ski <kw@linux.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] PCI: Fix secondary bus wait return value when D3cold delay = 0
Date: Thu, 19 Jun 2025 15:15:15 +0200	[thread overview]
Message-ID: <aFQNYwAuEG1t2iB4@wunner.de> (raw)
In-Reply-To: <20250610115532.7591-1-ilpo.jarvinen@linux.intel.com>

On Tue, Jun 10, 2025 at 02:55:31PM +0300, Ilpo Järvinen wrote:
> If D3cold delay is zero, pci_bridge_wait_for_secondary_bus()
> immediately returns 0 which is inconsistent with the rest of the
> function.
> 
> When D3cold delay is 0, infer the return value like in the other cases.
> With link_active_reporting, use Data Link Layer Link Active (PCIe spec
> r6.2 sec. 7.5.3.8) and otherwise call pci_dev_wait() with zero delay.

I guess Mika implemented it this way on purpose:

If d3cold_delay is zero, the devices on the secondary bus are
immediately available and there's no need to wait.  Note that
pci_bus_max_d3cold_delay() goes below the default min_delay of 100
only if pdev->d3cold_delay is lower.

And pci_pm_init() initializes d3cold_delay to PCI_PM_D3COLD_WAIT
(which is also 100).  So d3cold_delay has a different value only
if it's changed in a quirk or similar.

pci_acpi_optimize_delay() actually sets d3cold_delay to zero under
certain conditions, so your patch *will* cause a change of behavior.

Bottom line is, I think there's nothing to fix here.

Thanks,

Lukas

      reply	other threads:[~2025-06-19 13:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 11:55 Ilpo Järvinen
2025-06-19 13:15 ` Lukas Wunner [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=aFQNYwAuEG1t2iB4@wunner.de \
    --to=lukas@wunner.de \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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

all inboxes | Powered by JetHome®