Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131110
b: refs/heads/master
c: 99dadce
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Jesse Barnes committed Feb 5, 2009
1 parent 759d406 commit a21c1cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 144a76bc885ef4852601c66595326e59f12877f8
refs/heads/master: 99dadce8756bf08f5f8baf749533d044f6b3ff25
10 changes: 8 additions & 2 deletions trunk/drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
int i = 0;

if (drv && drv->suspend) {
pci_power_t prev = pci_dev->current_state;

pci_dev->state_saved = false;

i = drv->suspend(pci_dev, state);
Expand All @@ -365,12 +367,16 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
if (pci_dev->state_saved)
goto Fixup;

if (WARN_ON_ONCE(pci_dev->current_state != PCI_D0))
if (pci_dev->current_state != PCI_D0
&& pci_dev->current_state != PCI_UNKNOWN) {
WARN_ONCE(pci_dev->current_state != prev,
"PCI PM: Device state not saved by %pF\n",
drv->suspend);
goto Fixup;
}
}

pci_save_state(pci_dev);
pci_dev->state_saved = true;
/*
* This is for compatibility with existing code with legacy PM support.
*/
Expand Down

0 comments on commit a21c1cc

Please sign in to comment.