@@ -665,10 +665,16 @@ static void pci_bridge_check_ranges(struct pci_bus *bus)
pci_read_config_word(bridge, PCI_IO_BASE, &io);
if (!io) {
- pci_write_config_word(bridge, PCI_IO_BASE, 0xf0f0);
- pci_read_config_word(bridge, PCI_IO_BASE, &io);
- pci_write_config_word(bridge, PCI_IO_BASE, 0x0);
- }
+ u16 command;
+ pci_read_config_word(bridge, PCI_COMMAND, &command);
+ if (command & PCI_COMMAND_IO)
+ b_res[0].flags |= IORESOURCE_IO;
+ else {
+ pci_write_config_word(bridge, PCI_IO_BASE, 0x00f0);
+ pci_read_config_word(bridge, PCI_IO_BASE, &io);
+ pci_write_config_word(bridge, PCI_IO_BASE, 0x0);
+ }
+ }
if (io)
b_res[0].flags |= IORESOURCE_IO;
/* DECchip 21050 pass 2 errata: the bridge may miss an address