Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154977
b: refs/heads/master
c: 2cdb3f1
h: refs/heads/master
i:
  154975: 89e698f
v: v3
  • Loading branch information
Yinghai Lu authored and Jesse Barnes committed Jun 30, 2009
1 parent ae1d5c8 commit 67762b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 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: 12abb8ba8444f7c9b355bbdd44a6d0839f7a41b6
refs/heads/master: 2cdb3f1d834aab27a927be7555fbf4f9e43e9261
27 changes: 15 additions & 12 deletions trunk/arch/x86/pci/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
unsigned long flags;
struct resource *root;
int max_root_bus_resources = PCI_BUS_NUM_RESOURCES;
u64 start, end;

if (bus_has_transparent_bridge(info->bus))
max_root_bus_resources -= 3;

status = resource_to_addr(acpi_res, &addr);
if (!ACPI_SUCCESS(status))
Expand All @@ -84,25 +88,24 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
} else
return AE_OK;

res = &info->res[info->res_num];
res->name = info->name;
res->flags = flags;
res->start = addr.minimum + addr.translation_offset;
res->end = res->start + addr.address_length - 1;
res->child = NULL;

if (bus_has_transparent_bridge(info->bus))
max_root_bus_resources -= 3;
start = addr.minimum + addr.translation_offset;
end = start + addr.address_length - 1;
if (info->res_num >= max_root_bus_resources) {
printk(KERN_WARNING "PCI: Failed to allocate 0x%lx-0x%lx "
"from %s for %s due to _CRS returning more than "
"%d resource descriptors\n", (unsigned long) res->start,
(unsigned long) res->end, root->name, info->name,
"%d resource descriptors\n", (unsigned long) start,
(unsigned long) end, root->name, info->name,
max_root_bus_resources);
info->res_num++;
return AE_OK;
}

res = &info->res[info->res_num];
res->name = info->name;
res->flags = flags;
res->start = start;
res->end = end;
res->child = NULL;

if (insert_resource(root, res)) {
printk(KERN_ERR "PCI: Failed to allocate 0x%lx-0x%lx "
"from %s for %s\n", (unsigned long) res->start,
Expand Down

0 comments on commit 67762b4

Please sign in to comment.