diff options
Diffstat (limited to 'drivers/pci/pci-driver.c')
| -rw-r--r-- | drivers/pci/pci-driver.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 7f47bb72bf30..14fd865a5120 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
| @@ -999,7 +999,7 @@ static int pci_pm_thaw_noirq(struct device *dev) | |||
| 999 | * the subsequent "thaw" callbacks for the device. | 999 | * the subsequent "thaw" callbacks for the device. |
| 1000 | */ | 1000 | */ |
| 1001 | if (dev_pm_smart_suspend_and_suspended(dev)) { | 1001 | if (dev_pm_smart_suspend_and_suspended(dev)) { |
| 1002 | dev->power.direct_complete = true; | 1002 | dev_pm_skip_next_resume_phases(dev); |
| 1003 | return 0; | 1003 | return 0; |
| 1004 | } | 1004 | } |
| 1005 | 1005 | ||
| @@ -1012,7 +1012,12 @@ static int pci_pm_thaw_noirq(struct device *dev) | |||
| 1012 | if (pci_has_legacy_pm_support(pci_dev)) | 1012 | if (pci_has_legacy_pm_support(pci_dev)) |
| 1013 | return pci_legacy_resume_early(dev); | 1013 | return pci_legacy_resume_early(dev); |
| 1014 | 1014 | ||
| 1015 | pci_update_current_state(pci_dev, PCI_D0); | 1015 | /* |
| 1016 | * pci_restore_state() requires the device to be in D0 (because of MSI | ||
| 1017 | * restoration among other things), so force it into D0 in case the | ||
| 1018 | * driver's "freeze" callbacks put it into a low-power state directly. | ||
| 1019 | */ | ||
| 1020 | pci_set_power_state(pci_dev, PCI_D0); | ||
| 1016 | pci_restore_state(pci_dev); | 1021 | pci_restore_state(pci_dev); |
| 1017 | 1022 | ||
| 1018 | if (drv && drv->pm && drv->pm->thaw_noirq) | 1023 | if (drv && drv->pm && drv->pm->thaw_noirq) |
