aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorYu, Luming <luming.yu@intel.com>2006-04-25 03:00:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-11 17:02:27 -0400
commit8b8c8d280ab2d18fe6e42d671f60d4ffed451cdc (patch)
tree83702395aa09b3a4497758e3cf0e5c52761c798a /drivers/pci/pci.c
parent04d9c1a1100b6bdeffa7e1bfc30080bdac28e183 (diff)
[PATCH] PCI: reverse pci config space restore order
According to Intel ICH spec, there are several rules that Base Address should be programmed before IOSE (PCICMD register ) enabled. For example ICH7: 12.1.3 SATA : the base address register for the bus master register should be programmed before this bit is set. 11.1.3: PCICMD (USB): The base address register for USB should be programmed before this bit is set. .... To make sure kernel code follow this rule , and prevent unnecessary confusion. I proposal this patch. Signed-off-by: Luming Yu <luming.yu@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> 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, 5 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d2520451f36b..12286275b1c8 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -463,7 +463,11 @@ pci_restore_state(struct pci_dev *dev)
463 int i; 463 int i;
464 int val; 464 int val;
465 465
466 for (i = 0; i < 16; i++) { 466 /*
467 * The Base Address register should be programmed before the command
468 * register(s)
469 */
470 for (i = 15; i >= 0; i--) {
467 pci_read_config_dword(dev, i * 4, &val); 471 pci_read_config_dword(dev, i * 4, &val);
468 if (val != dev->saved_config_space[i]) { 472 if (val != dev->saved_config_space[i]) {
469 printk(KERN_DEBUG "PM: Writing back config space on " 473 printk(KERN_DEBUG "PM: Writing back config space on "