diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-09-09 23:49:59 +0200 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-14 13:41:46 -0700 |
commit | 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff (patch) | |
tree | 957f38dc1065e2880197e7ca5ffe1592515010b3 /drivers/pci/probe.c | |
parent | 999cce4a52d5abdda5d2cec6bac241899bc19e4c (diff) | |
download | linux-4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff.tar.bz2 |
PCI: Clear saved_state after the state has been restored
Some PCI devices fail if their standard configuration registers are
restored twice in a row. Prevent this from happening by making
pci_restore_state() clear the saved_state flag of the device right
after the device's standard configuration registers have been
populated with the previously saved values.
Simplify PCI PM callbacks by removing the direct clearing of
state_saved from them, as it shouldn't be necessary any more (except
in pci_pm_thaw(), where it has to be cleared, so that the values saved
during the "freeze" phase of hibernation are not used later by mistake).
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 882383b61d30..8105e32117f6 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1032,6 +1032,9 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) /* Fix up broken headers */ pci_fixup_device(pci_fixup_header, dev); + /* Clear the state_saved flag. */ + dev->state_saved = false; + /* Initialize various capabilities */ pci_init_capabilities(dev); |