Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154978
b: refs/heads/master
c: 626fdfe
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Jesse Barnes committed Jun 30, 2009
1 parent 67762b4 commit ef37dd9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 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: 2cdb3f1d834aab27a927be7555fbf4f9e43e9261
refs/heads/master: 626fdfec1588ac1341a37805809d03a719d977e0
32 changes: 9 additions & 23 deletions trunk/arch/x86/pci/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
return AE_OK;
}

static void
adjust_transparent_bridge_resources(struct pci_bus *bus)
{
struct pci_dev *dev;

list_for_each_entry(dev, &bus->devices, bus_list) {
int i;
u16 class = dev->class >> 8;

if (class == PCI_CLASS_BRIDGE_PCI && dev->transparent) {
for(i = 3; i < PCI_BUS_NUM_RESOURCES; i++)
dev->subordinate->resource[i] =
dev->bus->resource[i - 3];
}
}
}

static void
get_current_resources(struct acpi_device *device, int busnum,
int domain, struct pci_bus *bus)
Expand Down Expand Up @@ -161,8 +144,6 @@ get_current_resources(struct acpi_device *device, int busnum,
info.res_num = 0;
acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource,
&info);
if (info.res_num)
adjust_transparent_bridge_resources(bus);

return;

Expand Down Expand Up @@ -225,8 +206,15 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
*/
memcpy(bus->sysdata, sd, sizeof(*sd));
kfree(sd);
} else
bus = pci_scan_bus_parented(NULL, busnum, &pci_root_ops, sd);
} else {
bus = pci_create_bus(NULL, busnum, &pci_root_ops, sd);
if (bus) {
if (pci_probe & PCI_USE__CRS)
get_current_resources(device, busnum, domain,
bus);
bus->subordinate = pci_scan_child_bus(bus);
}
}

if (!bus)
kfree(sd);
Expand All @@ -241,8 +229,6 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
#endif
}

if (bus && (pci_probe & PCI_USE__CRS))
get_current_resources(device, busnum, domain, bus);
return bus;
}

Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/x86/pci/amd_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b)
int j;
struct pci_root_info *info;

/* don't go for it if _CRS is used */
if (pci_probe & PCI_USE__CRS)
/* don't go for it if _CRS is used already */
if (b->resource[0] != &ioport_resource ||
b->resource[1] != &iomem_resource)
return;

/* if only one root bus, don't need to anything */
Expand All @@ -116,6 +117,9 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b)
if (i == pci_root_num)
return;

printk(KERN_DEBUG "PCI: peer root bus %02x res updated from pci conf\n",
b->number);

info = &pci_root_info[i];
for (j = 0; j < info->res_num; j++) {
struct resource *res;
Expand Down

0 comments on commit ef37dd9

Please sign in to comment.