diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-06-20 16:36:38 -0400 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-06-20 16:36:38 -0400 |
| commit | 75ba632a01d4dc70d0a0f3a92b5ec9b4a3644b2d (patch) | |
| tree | c2f02ee30609d0d69308b4ca80d68d02a5f85552 /drivers/pci/pci.c | |
| parent | 0fd1ffe0633b4b039b343b753598e6df435e034d (diff) | |
| parent | 25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/pci/pci.c')
| -rw-r--r-- | drivers/pci/pci.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 2329f941a0dc..fde41cc14734 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -164,7 +164,6 @@ int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap) | |||
| 164 | return __pci_bus_find_cap(bus, devfn, hdr_type & 0x7f, cap); | 164 | return __pci_bus_find_cap(bus, devfn, hdr_type & 0x7f, cap); |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | #if 0 | ||
| 168 | /** | 167 | /** |
| 169 | * pci_find_ext_capability - Find an extended capability | 168 | * pci_find_ext_capability - Find an extended capability |
| 170 | * @dev: PCI device to query | 169 | * @dev: PCI device to query |
| @@ -212,7 +211,7 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap) | |||
| 212 | 211 | ||
| 213 | return 0; | 212 | return 0; |
| 214 | } | 213 | } |
| 215 | #endif /* 0 */ | 214 | EXPORT_SYMBOL_GPL(pci_find_ext_capability); |
| 216 | 215 | ||
| 217 | /** | 216 | /** |
| 218 | * pci_find_parent_resource - return resource region of parent bus of given region | 217 | * pci_find_parent_resource - return resource region of parent bus of given region |
| @@ -461,9 +460,23 @@ int | |||
| 461 | pci_restore_state(struct pci_dev *dev) | 460 | pci_restore_state(struct pci_dev *dev) |
| 462 | { | 461 | { |
| 463 | int i; | 462 | int i; |
| 463 | int val; | ||
| 464 | 464 | ||
| 465 | for (i = 0; i < 16; i++) | 465 | /* |
| 466 | pci_write_config_dword(dev,i * 4, dev->saved_config_space[i]); | 466 | * The Base Address register should be programmed before the command |
| 467 | * register(s) | ||
| 468 | */ | ||
| 469 | for (i = 15; i >= 0; i--) { | ||
| 470 | pci_read_config_dword(dev, i * 4, &val); | ||
| 471 | if (val != dev->saved_config_space[i]) { | ||
| 472 | printk(KERN_DEBUG "PM: Writing back config space on " | ||
| 473 | "device %s at offset %x (was %x, writing %x)\n", | ||
| 474 | pci_name(dev), i, | ||
| 475 | val, (int)dev->saved_config_space[i]); | ||
| 476 | pci_write_config_dword(dev,i * 4, | ||
| 477 | dev->saved_config_space[i]); | ||
| 478 | } | ||
| 479 | } | ||
| 467 | pci_restore_msi_state(dev); | 480 | pci_restore_msi_state(dev); |
| 468 | pci_restore_msix_state(dev); | 481 | pci_restore_msix_state(dev); |
| 469 | return 0; | 482 | return 0; |
