summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2006-02-08 17:11:38 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 12:25:25 -0700
commit41017f0cac925e4a6bcf3359b75e5538112d4216 (patch)
tree5c8f4590707450820ffb286f681bcaeb300cde84 /drivers/pci/pci.c
parentf043ca43c1ae354346f72dc5826d820d5619f0b2 (diff)
downloadlinux-41017f0cac925e4a6bcf3359b75e5538112d4216.tar.gz
linux-41017f0cac925e4a6bcf3359b75e5538112d4216.tar.bz2
linux-41017f0cac925e4a6bcf3359b75e5538112d4216.zip
[PATCH] PCI: MSI(X) save/restore for suspend/resume
Add MSI(X) configure sapce save/restore in generic PCI helper. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index bea1ad1ad5ba..69a617d21824 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -444,6 +444,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 +462,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;
}