aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2006-02-08 04:11:38 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-04-14 15:25:25 -0400
commit41017f0cac925e4a6bcf3359b75e5538112d4216 (patch)
tree5c8f4590707450820ffb286f681bcaeb300cde84 /drivers/pci/pci.c
parentf043ca43c1ae354346f72dc5826d820d5619f0b2 (diff)
[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)
444 /* XXX: 100% dword access ok here? */ 444 /* XXX: 100% dword access ok here? */
445 for (i = 0; i < 16; i++) 445 for (i = 0; i < 16; i++)
446 pci_read_config_dword(dev, i * 4,&dev->saved_config_space[i]); 446 pci_read_config_dword(dev, i * 4,&dev->saved_config_space[i]);
447 if ((i = pci_save_msi_state(dev)) != 0)
448 return i;
449 if ((i = pci_save_msix_state(dev)) != 0)
450 return i;
447 return 0; 451 return 0;
448} 452}
449 453
@@ -458,6 +462,8 @@ pci_restore_state(struct pci_dev *dev)
458 462
459 for (i = 0; i < 16; i++) 463 for (i = 0; i < 16; i++)
460 pci_write_config_dword(dev,i * 4, dev->saved_config_space[i]); 464 pci_write_config_dword(dev,i * 4, dev->saved_config_space[i]);
465 pci_restore_msi_state(dev);
466 pci_restore_msix_state(dev);
461 return 0; 467 return 0;
462} 468}
463 469