From: Bjorn Helgaas <helgaas@kernel.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: bhelgaas@google.com, rafael@kernel.org,
linux-pci@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] PCI/PM: Elevate PM usage during reset probing
Date: Wed, 23 Apr 2025 16:10:55 -0500 [thread overview]
Message-ID: <20250423211055.GA455833@bhelgaas> (raw)
In-Reply-To: <20250422230534.2295291-1-alex.williamson@redhat.com>
On Tue, Apr 22, 2025 at 05:05:30PM -0600, Alex Williamson wrote:
> I encountered a confusing scenario where a device reports NoSoftRst- and
> doesn't have any associated quirks to set PCI_DEV_FLAGS_NO_PM_RESET, but
> it refuses to probe for PM reset support using the sysfs reset_method
> attribute. The reason turns out to be that we don't increment the usage
> count while probing, the driver has the device in D3, where this system
> seems to support D3cold, and the PM control register is read back as
> 0xffff.
>
> The cleanup __free helper seems to be the cleanest solution here, versus
> refactoring to a common exit point or wrappers around reset_fn, but feel
> free to suggest otherwise. I see a couple potential other use cases for
> this helper in the vfio code.
>
> Please review. Thanks,
>
> Alex
>
> Alex Williamson (2):
> PM: runtime: Define pm_runtime_put cleanup helper
> PCI: Increment PM usage counter when probing reset methods
>
> drivers/pci/pci-sysfs.c | 3 +++
> include/linux/pm_runtime.h | 2 ++
> 2 files changed, 5 insertions(+)
Applied to pci/pm for v6.16, thanks, Alex!
prev parent reply other threads:[~2025-04-23 21:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 23:05 [PATCH 0/2] PCI/PM: Elevate PM usage during reset probing Alex Williamson
2025-04-22 23:05 ` [PATCH 1/2] PM: runtime: Define pm_runtime_put cleanup helper Alex Williamson
2025-04-23 12:21 ` Rafael J. Wysocki
2025-04-22 23:05 ` [PATCH 2/2] PCI: Increment PM usage counter when probing reset methods Alex Williamson
2025-04-23 21:10 ` Bjorn Helgaas [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=20250423211055.GA455833@bhelgaas \
--to=helgaas@kernel.org \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--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