* [PATCH] pci: always clear pme on stop
@ 2024-11-11 18:06 Keith Busch
2024-11-11 19:06 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Keith Busch @ 2024-11-11 18:06 UTC (permalink / raw)
To: linux-pci; +Cc: bhelgaas, lukas, Keith Busch
From: Keith Busch <kbusch@kernel.org>
This used to be called unconditionally, but was inadvertently changed to
call it only once. Restore the previously existing behavior.
Fixes: 6d6d962a8dc2 ("pci: make pci_stop_dev concurrent safe")
Suggested-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/pci/remove.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index 2e940101ce1bf..36467558c0144 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -31,10 +31,10 @@ static int pci_pwrctl_unregister(struct device *dev, void *data)
static void pci_stop_dev(struct pci_dev *dev)
{
+ pci_pme_active(dev, false);
+
if (!pci_dev_test_and_clear_added(dev))
return;
-
- pci_pme_active(dev, false);
device_for_each_child(dev->dev.parent, dev_of_node(&dev->dev),
pci_pwrctl_unregister);
device_release_driver(&dev->dev);
--
2.43.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] pci: always clear pme on stop
2024-11-11 18:06 [PATCH] pci: always clear pme on stop Keith Busch
@ 2024-11-11 19:06 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2024-11-11 19:06 UTC (permalink / raw)
To: Keith Busch; +Cc: linux-pci, bhelgaas, lukas, Keith Busch
On Mon, Nov 11, 2024 at 10:06:59AM -0800, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> This used to be called unconditionally, but was inadvertently changed to
> call it only once. Restore the previously existing behavior.
>
> Fixes: 6d6d962a8dc2 ("pci: make pci_stop_dev concurrent safe")
> Suggested-by: Lukas Wunner <lukas@wunner.de>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
Squashed into 6d6d962a8dc2, thanks!
> ---
> drivers/pci/remove.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
> index 2e940101ce1bf..36467558c0144 100644
> --- a/drivers/pci/remove.c
> +++ b/drivers/pci/remove.c
> @@ -31,10 +31,10 @@ static int pci_pwrctl_unregister(struct device *dev, void *data)
>
> static void pci_stop_dev(struct pci_dev *dev)
> {
> + pci_pme_active(dev, false);
> +
> if (!pci_dev_test_and_clear_added(dev))
> return;
> -
> - pci_pme_active(dev, false);
> device_for_each_child(dev->dev.parent, dev_of_node(&dev->dev),
> pci_pwrctl_unregister);
> device_release_driver(&dev->dev);
> --
> 2.43.5
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-11 19:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 18:06 [PATCH] pci: always clear pme on stop Keith Busch
2024-11-11 19:06 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox