diff -ru 2.4.0-test12-pre3/drivers/pci/setup-bus.c 2.4.0-test12-pre3-pci-patch/drivers/pci/setup-bus.c --- 2.4.0-test12-pre3/drivers/pci/setup-bus.c Fri Dec 1 15:38:12 2000 +++ 2.4.0-test12-pre3-pci-patch/drivers/pci/setup-bus.c Fri Dec 1 16:03:31 2000 @@ -45,24 +45,28 @@ head_io.next = head_mem.next = NULL; for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) { struct pci_dev *dev = pci_dev_b(ln); + u16 class = dev->class >> 8; u16 cmd; /* First, disable the device to avoid side effects of possibly overlapping I/O and memory ranges. - Except the VGA - for obvious reason. :-) */ - if (dev->class >> 8 == PCI_CLASS_DISPLAY_VGA) + Leave VGA enabled - for obvious reason. :-) + Same with all sorts of bridges - they may + have VGA behind them. */ + if (class == PCI_CLASS_DISPLAY_VGA + || class == PCI_CLASS_NOT_DEFINED_VGA) found_vga = 1; - else { + else if (class >> 8 != PCI_BASE_CLASS_BRIDGE) { pci_read_config_word(dev, PCI_COMMAND, &cmd); cmd &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); pci_write_config_word(dev, PCI_COMMAND, cmd); } - + /* Reserve some resources for CardBus. Are these values reasonable? */ - if (dev->class >> 8 == PCI_CLASS_BRIDGE_CARDBUS) { + if (class == PCI_CLASS_BRIDGE_CARDBUS) { io_reserved += 8*1024; mem_reserved += 32*1024*1024; continue; diff -ru 2.4.0-test12-pre3/drivers/pci/setup-res.c 2.4.0-test12-pre3-pci-patch/drivers/pci/setup-res.c --- 2.4.0-test12-pre3/drivers/pci/setup-res.c Fri Dec 1 15:38:12 2000 +++ 2.4.0-test12-pre3-pci-patch/drivers/pci/setup-res.c Fri Dec 1 17:17:18 2000 @@ -148,8 +148,11 @@ continue; for (list = head; ; list = list->next) { unsigned long size = 0; - struct resource_list *ln = list->next; + struct resource_list *ln; + if (!list) + return; + ln = list->next; if (ln) size = ln->res->end - ln->res->start; if (r->end - r->start > size) {