Index: drivers/pci/probe.c =================================================================== RCS file: /var/cvs/linux-2.6/drivers/pci/probe.c,v retrieving revision 1.3 diff -u -p -r1.3 probe.c --- drivers/pci/probe.c 7 Jan 2004 21:30:28 -0000 1.3 +++ drivers/pci/probe.c 19 Jan 2004 18:52:38 -0000 @@ -319,6 +319,10 @@ int __devinit pci_scan_bridge(struct pci child->secondary = (buses >> 8) & 0xFF; child->subordinate = (buses >> 16) & 0xFF; child->number = child->secondary; + + pci_read_config_word(dev, PCI_BRIDGE_CONTROL, + &child->bridge_ctl); + cmax = pci_scan_child_bus(child); if (cmax > max) max = cmax; } else { @@ -353,6 +357,8 @@ int __devinit pci_scan_bridge(struct pci pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses); if (!is_cardbus) { + child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA; + /* Now we can scan all subordinate buses... */ max = pci_scan_child_bus(child); } else { Index: drivers/pci/setup-bus.c =================================================================== RCS file: /var/cvs/linux-2.6/drivers/pci/setup-bus.c,v retrieving revision 1.4 diff -u -p -r1.4 setup-bus.c --- drivers/pci/setup-bus.c 24 Nov 2003 03:16:17 -0000 1.4 +++ drivers/pci/setup-bus.c 19 Jan 2004 18:52:38 -0000 @@ -43,13 +43,15 @@ #define CARDBUS_IO_SIZE (4096) #define CARDBUS_MEM_SIZE (32*1024*1024) -static int __devinit +static void __devinit pbus_assign_resources_sorted(struct pci_bus *bus) { struct pci_dev *dev; struct resource *res; struct resource_list head, *list, *tmp; - int idx, found_vga = 0; + int idx; + + bus->bridge_ctl &= ~PCI_BRIDGE_CTL_VGA; head.next = NULL; list_for_each_entry(dev, &bus->devices, bus_list) { @@ -57,7 +59,7 @@ pbus_assign_resources_sorted(struct pci_ if (class == PCI_CLASS_DISPLAY_VGA || class == PCI_CLASS_NOT_DEFINED_VGA) - found_vga = 1; + bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA; pdev_sort_resources(dev, &head); } @@ -70,8 +72,6 @@ pbus_assign_resources_sorted(struct pci_ list = list->next; kfree(tmp); } - - return found_vga; } static void __devinit @@ -211,10 +211,7 @@ pci_setup_bridge(struct pci_bus *bus) /* Clear out the upper 32 bits of PREF base. */ pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, 0); - /* Check if we have VGA behind the bridge. - Enable ISA in either case (FIXME!). */ - l = (bus->resource[0]->flags & IORESOURCE_BUS_HAS_VGA) ? 0x0c : 0x04; - pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, l); + pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, bus->bridge_ctl); } /* Check whether the bridge supports optional I/O and @@ -498,13 +495,14 @@ void __devinit pci_bus_assign_resources(struct pci_bus *bus) { struct pci_bus *b; - int found_vga = pbus_assign_resources_sorted(bus); struct pci_dev *dev; - if (found_vga) { + pbus_assign_resources_sorted(bus); + + if (bus->bridge_ctl & PCI_BRIDGE_CTL_VGA) { /* Propagate presence of the VGA to upstream bridges */ for (b = bus; b->parent; b = b->parent) { - b->resource[0]->flags |= IORESOURCE_BUS_HAS_VGA; + b->bridge_ctl |= PCI_BRIDGE_CTL_VGA; } } list_for_each_entry(dev, &bus->devices, bus_list) { Index: include/linux/ioport.h =================================================================== RCS file: /var/cvs/linux-2.6/include/linux/ioport.h,v retrieving revision 1.6 diff -u -p -r1.6 ioport.h --- include/linux/ioport.h 26 Oct 2003 20:40:33 -0000 1.6 +++ include/linux/ioport.h 19 Jan 2004 18:52:42 -0000 @@ -41,7 +41,6 @@ struct resource_list { #define IORESOURCE_CACHEABLE 0x00004000 #define IORESOURCE_RANGELENGTH 0x00008000 #define IORESOURCE_SHADOWABLE 0x00010000 -#define IORESOURCE_BUS_HAS_VGA 0x00080000 #define IORESOURCE_DISABLED 0x10000000 #define IORESOURCE_UNSET 0x20000000 Index: include/linux/pci.h =================================================================== RCS file: /var/cvs/linux-2.6/include/linux/pci.h,v retrieving revision 1.7 diff -u -p -r1.7 pci.h --- include/linux/pci.h 7 Jan 2004 21:30:47 -0000 1.7 +++ include/linux/pci.h 19 Jan 2004 18:52:42 -0000 @@ -473,6 +473,8 @@ struct pci_bus { char name[48]; + unsigned short bridge_ctl; /* manage NO_ISA/FBB/et al behaviors */ + unsigned short pad2; struct device * dev; };