From: Lukas Wunner <lukas@wunner.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
linux-pci@vger.kernel.org, Marco Nenciarini <mnencia@kcore.it>,
Michal Winiarski <michal.winiarski@intel.com>,
Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>,
Eric Chanudet <echanude@redhat.com>,
Jean Guyader <jean.guyader@gmail.com>,
Alex Williamson <alex@shazbot.org>, Sinan Kaya <okaya@kernel.org>,
Mario Limonciello <superm1@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH v2 2/2] PCI: Wait for device readiness after D3hot -> D0uninitialized transition
Date: Mon, 18 May 2026 21:45:50 +0200 [thread overview]
Message-ID: <agtsbplSM7ozZcHF@wunner.de> (raw)
In-Reply-To: <CAJZ5v0iU=0SHXK9RngiYCwz5XZ0mJ+L5iy-FSWhytNgJbCam0A@mail.gmail.com>
On Mon, May 18, 2026 at 09:38:12PM +0200, Rafael J. Wysocki wrote:
> On Mon, May 18, 2026 at 9:12 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > +++ b/drivers/pci/pci.c
> > @@ -1341,10 +1352,19 @@ int pci_power_up(struct pci_dev *dev)
> > pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, 0);
> >
> > /* Mandatory transition delays; see PCI PM 1.2. */
> > - if (state == PCI_D3hot)
> > + if (state == PCI_D3hot) {
> > pci_dev_d3_sleep(dev);
> > - else if (state == PCI_D2)
> > + if (!(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET)) {
>
> Hmm. The pmcsr value here is from before the pci_write_config_word(),
> so AFAICS it should be updated after the write.
The No_Soft_Reset bit is RO (PCIe r7.0 sec 7.5.2.2), so its value should
never change when writing zero to the Power Management Control/Status
Register.
Thanks,
Lukas
next prev parent reply other threads:[~2026-05-18 19:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 19:12 [PATCH v2 0/2] " Bjorn Helgaas
2026-05-18 19:12 ` [PATCH v2 1/2] PCI: Log device readiness timeouts as errors Bjorn Helgaas
2026-05-18 19:12 ` [PATCH v2 2/2] PCI: Wait for device readiness after D3hot -> D0uninitialized transition Bjorn Helgaas
2026-05-18 19:38 ` Rafael J. Wysocki
2026-05-18 19:45 ` Lukas Wunner [this message]
2026-05-18 19:47 ` Rafael J. Wysocki
2026-05-18 19:48 ` [PATCH v2 0/2] " Rafael J. Wysocki
2026-05-22 22:30 ` 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=agtsbplSM7ozZcHF@wunner.de \
--to=lukas@wunner.de \
--cc=alex@shazbot.org \
--cc=bhelgaas@google.com \
--cc=echanude@redhat.com \
--cc=helgaas@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jean.guyader@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=michal.winiarski@intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mnencia@kcore.it \
--cc=okaya@kernel.org \
--cc=rafael@kernel.org \
--cc=superm1@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
all inboxes | Powered by JetHome®