There is an arbitrary difference between the system resume and
runtime resume code paths for PCI devices regarding the delay to
apply when switching the devices from D3cold to D0.
Namely, pci_restore_standard_config() used in the runtime resume
code path calls pci_set_power_state() which in turn invokes
__pci_start_power_transition() to power up the device through the
platform firmware and that function applies the transition delay
(as per PCI Express Base Specification Revision 2.0, Section 6.6.1).
However, pci_pm_default_resume_early() used in the system resume
code path calls pci_power_up() which doesn't apply the delay at
all and that causes issues to occur during resume from
suspend-to-idle on some systems where the delay is required.
Since there is no reason for that difference to exist, modify
pci_power_up() to follow pci_set_power_state() more closely and
invoke __pci_start_power_transition() from there to call the
platform firmware to power up the device (in case that's necessary).
- * pci_power_up - Put the given device into D0 forcibly
- * @dev: PCI device to power up
-void pci_power_up(struct pci_dev *dev)
- if (platform_pci_power_manageable(dev))
- platform_pci_set_power_state(dev, PCI_D0);
- pci_raw_set_power_state(dev, PCI_D0);
- pci_update_current_state(dev, PCI_D0);
* pci_platform_power_transition - Use platform to change device power state
* @dev: PCI device to handle.
@@ -1123,6 +1110,17 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state)
+ * pci_power_up - Put the given device into D0 forcibly
+ * @dev: PCI device to power up
+void pci_power_up(struct pci_dev *dev)
+ __pci_start_power_transition(dev, PCI_D0);
+ pci_raw_set_power_state(dev, PCI_D0);
+ pci_update_current_state(dev, PCI_D0);
* pci_choose_state - Choose the power state of a PCI device
* @dev: PCI device to be suspended