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.
Unified · Split
| @@ -463,7 +463,11 @@ pci_restore_state(struct pci_dev *dev) · 462 unmodified lines | ||
| 463 | 463 | int i; |
| 464 | 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 | 471 | pci_read_config_dword(dev, i * 4, &val); |
| 468 | 472 | if (val != dev->saved_config_space[i]) { |
| 469 | 473 | printk(KERN_DEBUG "PM: Writing back config space on " |