pci: always clear pme on stop
PATCH 1/1 pci: always clear pme on stop
From: Keith Busch <[email protected]>
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 <[email protected]>
Signed-off-by Keith Busch <[email protected]>
--- drivers/pci/remove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/remove.c +2 -2
@@ -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);
Signature · 1 line
2.43.5
Quoted 8 lines · Keith Busch
From: Keith Busch <[email protected]>
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 <[email protected]>Signed-off-by Keith Busch <[email protected]>
Squashed into 6d6d962a8dc2, thanks!
Quoted 24 lines
--- drivers/pci/remove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/remove.c +2
-2@@ -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);Signature · 1 line
2.43.5