[PATCH] reverse pci config space restore order

From: Yu, Luming
Date: Tue Apr 25 2006 - 02:51:15 EST



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.

Note:
I'm sorry the patch is NOT in good format.
If you want to apply please use the attached patch file.
sorry for my email client.


Signed-off-by: Luming Yu <luming.yu@xxxxxxxxx>

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index bea1ad1..19a71a6 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -456,7 +456,7 @@ pci_restore_state(struct pci_dev *dev)
{
int i;

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

Attachment: reverse_pci_config_space_restore_order.patch
Description: reverse_pci_config_space_restore_order.patch