Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27186
b: refs/heads/master
c: 04d9c1a
h: refs/heads/master
v: v3
  • Loading branch information
Dave Jones authored and Greg Kroah-Hartman committed Jun 11, 2006
1 parent 8db90e2 commit 1781a35
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 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: 8d92bc2270d67a43b1d7e94a8cb6f81f1435fe9a
refs/heads/master: 04d9c1a1100b6bdeffa7e1bfc30080bdac28e183
16 changes: 13 additions & 3 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,19 @@ int
pci_restore_state(struct pci_dev *dev)
{
int i;

for (i = 0; i < 16; i++)
pci_write_config_dword(dev,i * 4, dev->saved_config_space[i]);
int val;

for (i = 0; i < 16; i++) {
pci_read_config_dword(dev, i * 4, &val);
if (val != dev->saved_config_space[i]) {
printk(KERN_DEBUG "PM: Writing back config space on "
"device %s at offset %x (was %x, writing %x)\n",
pci_name(dev), i,
val, (int)dev->saved_config_space[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;
Expand Down

0 comments on commit 1781a35

Please sign in to comment.