[PATCH] reverse pci config space restore order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

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


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux