diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-07-07 20:08:27 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-07-07 20:08:27 +1000 |
commit | 717cb906bd43a9ac00631d600adda5c6546843a6 (patch) | |
tree | f41b250e9e0fa1e664f002fa9c4608d94527f2f2 /arch/i386/pci/i386.c | |
parent | 22f579c621e2f264e6d093b07d75f99bc97d5df2 (diff) | |
parent | c101f3136cc98a003d0d16be6fab7d0d950581a6 (diff) | |
download | kernel-crypto-717cb906bd43a9ac00631d600adda5c6546843a6.tar.gz kernel-crypto-717cb906bd43a9ac00631d600adda5c6546843a6.tar.xz kernel-crypto-717cb906bd43a9ac00631d600adda5c6546843a6.zip |
Merge ../linux-2.6/
Diffstat (limited to 'arch/i386/pci/i386.c')
-rw-r--r-- | arch/i386/pci/i386.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c index c205ea7e233..93a364c8215 100644 --- a/arch/i386/pci/i386.c +++ b/arch/i386/pci/i386.c @@ -106,11 +106,16 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) if ((dev = bus->self)) { for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) { r = &dev->resource[idx]; - if (!r->start) + if (!r->flags) continue; pr = pci_find_parent_resource(dev, r); - if (!pr || request_resource(pr, r) < 0) + if (!r->start || !pr || request_resource(pr, r) < 0) { printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); + /* Something is wrong with the region. + Invalidate the resource to prevent child + resource allocations in this range. */ + r->flags = 0; + } } } pcibios_allocate_bus_resources(&bus->children); @@ -227,7 +232,7 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask) pci_read_config_word(dev, PCI_COMMAND, &cmd); old_cmd = cmd; - for(idx=0; idx<6; idx++) { + for(idx = 0; idx < PCI_NUM_RESOURCES; idx++) { /* Only set up the requested stuff */ if (!(mask & (1<<idx))) continue; |