Skip to content

Commit

Permalink
Merge branch 'pm-pci'
Browse files Browse the repository at this point in the history
* pm-pci:
  PCI / PM: Force devices to D0 in pci_pm_thaw_noirq()
  • Loading branch information
Rafael J. Wysocki committed Dec 20, 2017
2 parents 5602664 + 5839ee7 commit 63d15e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,12 @@ static int pci_pm_thaw_noirq(struct device *dev)
if (pci_has_legacy_pm_support(pci_dev))
return pci_legacy_resume_early(dev);

pci_update_current_state(pci_dev, PCI_D0);
/*
* pci_restore_state() requires the device to be in D0 (because of MSI
* restoration among other things), so force it into D0 in case the
* driver's "freeze" callbacks put it into a low-power state directly.
*/
pci_set_power_state(pci_dev, PCI_D0);
pci_restore_state(pci_dev);

if (drv && drv->pm && drv->pm->thaw_noirq)
Expand Down

0 comments on commit 63d15e8

Please sign in to comment.