aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-04-17 15:35:18 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-04-17 15:35:18 +0100
commit94171db1d2f23c22b6050d210b72db3bb2f0b81e (patch)
tree2318d487807e9f7393fcd46ef0090a27b4ad7981 /drivers/pci/pci.c
parentd96fb997c6174f98a2a0a98200f99ac13b053bd6 (diff)
parentc19f7a9e1ac45b57375d51f033b02deca50f4d3f (diff)
downloadkernel_goldelico_gta04-94171db1d2f23c22b6050d210b72db3bb2f0b81e.zip
kernel_goldelico_gta04-94171db1d2f23c22b6050d210b72db3bb2f0b81e.tar.gz
kernel_goldelico_gta04-94171db1d2f23c22b6050d210b72db3bb2f0b81e.tar.bz2
Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index bea1ad1..2329f94 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -307,9 +307,11 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
* Can enter D0 from any state, but if we can only go deeper
* to sleep if we're already in a low power state
*/
- if (state != PCI_D0 && dev->current_state > state)
+ if (state != PCI_D0 && dev->current_state > state) {
+ printk(KERN_ERR "%s(): %s: state=%d, current state=%d\n",
+ __FUNCTION__, pci_name(dev), state, dev->current_state);
return -EINVAL;
- else if (dev->current_state == state)
+ } else if (dev->current_state == state)
return 0; /* we're already there */
/* find PCI PM capability in list */
@@ -444,6 +446,10 @@ pci_save_state(struct pci_dev *dev)
/* XXX: 100% dword access ok here? */
for (i = 0; i < 16; i++)
pci_read_config_dword(dev, i * 4,&dev->saved_config_space[i]);
+ if ((i = pci_save_msi_state(dev)) != 0)
+ return i;
+ if ((i = pci_save_msix_state(dev)) != 0)
+ return i;
return 0;
}
@@ -458,6 +464,8 @@ pci_restore_state(struct pci_dev *dev)
for (i = 0; i < 16; i++)
pci_write_config_dword(dev,i * 4, dev->saved_config_space[i]);
+ pci_restore_msi_state(dev);
+ pci_restore_msix_state(dev);
return 0;
}