Skip to content

RFC PCI/ACPI PM: Propagate wake-up enable upstream

Rafael J. Wysocki linux-acpi linux-pm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4PCI PM: Simplify PCI wake-up codedrivers/pci/pci-acpi.c drivers/pci/pci.c+21 -140 replies
1/4PCI PM: Simplify PCI wake-up codedrivers/pci/pci-acpi.c drivers/pci/pci.c+21 -140 replies
2/4PCI/ACPI PM: Rework some debug messagesdrivers/acpi/sleep.c drivers/pci/pci-acpi.c+10 -130 replies
2/4PCI/ACPI PM: Rework some debug messagesdrivers/acpi/sleep.c drivers/pci/pci-acpi.c+10 -130 replies
3/4PCI PM: Introduce device flag wakeup_prepareddrivers/pci/pci.c include/linux/pci.h+9 -00 replies
3/4PCI PM: Introduce device flag wakeup_prepareddrivers/pci/pci.c include/linux/pci.h+9 -00 replies
4/4PCI/ACPI PM: Propagate wake-up enable for devices w/o ACPI supportdrivers/acpi/power.c drivers/acpi/scan.c drivers/acpi/sleep.c +3 more+63 -2316 replies
4/4PCI/ACPI PM: Propagate wake-up enable for devices w/o ACPI supportdrivers/acpi/power.c drivers/acpi/scan.c drivers/acpi/sleep.c +3 more+63 -230 replies
4/4ACPI PM: Replace wakeup.prepared with reference counterdrivers/acpi/power.c drivers/acpi/scan.c drivers/acpi/wakeup.c +1 more+39 -260 replies
4/4ACPI PM: Replace wakeup.prepared with reference counterdrivers/acpi/power.c drivers/acpi/scan.c drivers/acpi/wakeup.c +1 more+39 -260 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/4] PCI/ACPI PM: Propagate wake-up enable upstream
Quoted 22 lines · Rafael J. Wysocki
Quoted 21 lines · Rafael J. Wysocki
Quoted 8 lines · Matthew Garrett
Quoted 4 lines · Rafael J. Wysocki

Updated patch is appended, but there's a problem with it. Namely, when the root bridge GPE is shared with other devices, those devices are also enabled to wake up and they may be kind of "interesting" (on one of my test boxes they include the ethernet and audio adapters). I'm not sure what to do about that.

Perhaps only enable it if a child device is enabled?

Well, the problem is that we have to enable the devices that share the GPE to wake up together, but the child device we _really_ want to wake-up need not be any of them.

Also, the child device may be enabled to wake up after we've run the "glue" code.

Well, perhaps it's better to rework pci_enable_wake() so that it, if the device doesn't have an ACPI handle and is not PCIe, it will go and enable the root bridge to wake up as well?

Quoted 8 lines
Quoted 3 lines

I wonder what about the bridges between the desired wake-up device and the root bridge. I guess they also should be enabled to wake-up, so that they can forward the PME# in case the system is designed this way.

Below is a prototype of what I was thinking of, although I'm not sure if that's enough.

Comments welcome.

Hm, no comments. :-(

In the meantime I spent some time on this problem and prepared the following series of patches.

The last one has to be tested on the system it was invented for, but that's going to take some time.

Comments welcome.

Rafael