Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4091
b: refs/heads/master
c: 299de03
h: refs/heads/master
i:
  4089: dc945fa
  4087: f227597
v: v3
  • Loading branch information
Ivan Kokshaysky authored and Greg Kroah-Hartman committed Jul 1, 2005
1 parent 34bdb4d commit 1fe363b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90b54929b626c80056262d9d99b3f48522e404d0
refs/heads/master: 299de0343c7d18448a69c635378342e9214b14af
1 change: 1 addition & 0 deletions trunk/arch/i386/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ static int __init pcibios_init(void)
if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
pcibios_sort();
#endif
pci_assign_unassigned_resources();
return 0;
}

Expand Down
11 changes: 8 additions & 3 deletions trunk/arch/i386/pci/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ find_free_bus_resource(struct pci_bus *bus, unsigned long type)

for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
r = bus->resource[i];
if (r == &ioport_resource || r == &iomem_resource)
continue;
if (r && (r->flags & type_mask) == type && !r->parent)
return r;
}
Expand Down

0 comments on commit 1fe363b

Please sign in to comment.