public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Brian Norris <briannorris@chromium.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	"Lukas Wunner" <lukas@wunner.de>,
	linux-pm@vger.kernel.org,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: Re: [PATCH v5] PCI/PM: Prevent runtime suspend until devices are fully initialized
Date: Thu, 22 Jan 2026 13:06:48 -0600	[thread overview]
Message-ID: <20260122190648.GA37646@bhelgaas> (raw)
In-Reply-To: <aXJsnh4HeiQ2oOBl@google.com>

On Thu, Jan 22, 2026 at 10:29:50AM -0800, Brian Norris wrote:
> On Thu, Jan 22, 2026 at 07:17:21PM +0100, Rafael J. Wysocki wrote:
> > On Thu, Jan 22, 2026 at 6:49 PM Brian Norris <briannorris@chromium.org> wrote:

> > > @@ -379,6 +380,12 @@ void pci_bus_add_device(struct pci_dev *dev)
> > >                 put_device(&pdev->dev);
> > >         }
> > >
> > > +       /*
> > > +        * Enable runtime PM (and potentially suspend) only after we've fully
> > > +        * configured the PCI state.
> > > +        */
> > 
> > I would make it a bit more precise, something like "Enable runtime PM,
> > which potentially allows the device to suspend immediately, only after
> > the PCI state has been configured completely."

> > > @@ -3196,8 +3196,11 @@ void pci_pm_init(struct pci_dev *dev)
> > >  poweron:
> > >         pci_pm_power_up_and_verify_state(dev);
> > >         pm_runtime_forbid(&dev->dev);
> > > +       /*
> > > +        * Mark ourselves active now, to prevent our parent from suspending
> > > +        * while we finish configuring the PCI device.
> > > +        */
> > 
> > I would rephrase the comment this way:
> > 
> > "Runtime PM will be enabled for the device when it has been fully
> > configured, but since its parent and suppliers may suspend in the
> > meantime, prevent them from doing so by changing the device's runtime
> > PM status to "active"."

Updated both, thanks to both of you!

  parent reply	other threads:[~2026-01-22 19:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-22 17:48 [PATCH v5] PCI/PM: Prevent runtime suspend until devices are fully initialized Brian Norris
2026-01-22 18:17 ` Rafael J. Wysocki
2026-01-22 18:29   ` Brian Norris
2026-01-22 18:59     ` Rafael J. Wysocki
2026-01-22 19:06     ` Bjorn Helgaas [this message]
2026-01-22 18:21 ` Bjorn Helgaas

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=20260122190648.GA37646@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=briannorris@chromium.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=m.szyprowski@samsung.com \
    --cc=rafael@kernel.org \
    /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