Skip to content

RFC PCI PM: Rework pci_set_power_state

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 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ACPI: Introduce acpi_bus_power_manageabledrivers/acpi/bus.c include/acpi/acpi_bus.h+12 -00 replies
1/3ACPI: Introduce acpi_bus_power_manageabledrivers/acpi/bus.c include/acpi/acpi_bus.h+12 -00 replies
2/3PCI PM: Introduce platform_pci_power_manageabledrivers/pci/pci-acpi.c drivers/pci/pci.c drivers/pci/pci.h+13 -00 replies
2/3PCI PM: Introduce platform_pci_power_manageabledrivers/pci/pci-acpi.c drivers/pci/pci.c drivers/pci/pci.h+13 -06 replies
3/3PCI PM: Rework pci_set_power_statedrivers/pci/pci-acpi.c drivers/pci/pci.c+32 -140 replies
3/3PCI PM: Rework pci_set_power_statedrivers/pci/pci-acpi.c drivers/pci/pci.c+32 -140 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/3] PCI PM: Rework pci_set_power_state

Hi,

I've recently discovered that pci_set_power_state() calls the platform callback intended for changing the state of the device after it has done that using the native PCI mechanism. In my opinion this is not correct, because, for example, if the device is being put into D0 from a low power state, it may require some platform-controlled power resources to be turned on before that (in theory).

The following series of patches changes this function so that the platform callback is performed first and then the native mechanism is used. Additionally, however, it checks if the devices is power manageable by the platform and only in that case the platform callback is invoked. For this purpose, I needed to add an ACPI function allowing PCI to check the power manageability of given device.

Comments welcome.

Thanks,
Rafael