git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
pci
/
setup-bus.c
diff --git
a/drivers/pci/setup-bus.c
b/drivers/pci/setup-bus.c
index
7f0f6c2
..
82d877c
100644
(file)
--- a/
drivers/pci/setup-bus.c
+++ b/
drivers/pci/setup-bus.c
@@
-57,8
+57,13
@@
pbus_assign_resources_sorted(struct pci_bus *bus)
list_for_each_entry(dev, &bus->devices, bus_list) {
u16 class = dev->class >> 8;
list_for_each_entry(dev, &bus->devices, bus_list) {
u16 class = dev->class >> 8;
- if (class == PCI_CLASS_DISPLAY_VGA
- || class == PCI_CLASS_NOT_DEFINED_VGA)
+ /* Don't touch classless devices and host bridges. */
+ if (class == PCI_CLASS_NOT_DEFINED ||
+ class == PCI_CLASS_BRIDGE_HOST)
+ continue;
+
+ if (class == PCI_CLASS_DISPLAY_VGA ||
+ class == PCI_CLASS_NOT_DEFINED_VGA)
bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
pdev_sort_resources(dev, &head);
bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
pdev_sort_resources(dev, &head);
@@
-533,15
+538,16
@@
EXPORT_SYMBOL(pci_bus_assign_resources);
void __init
pci_assign_unassigned_resources(void)
{
void __init
pci_assign_unassigned_resources(void)
{
- struct
list_head *ln
;
+ struct
pci_bus *bus
;
/* Depth first, calculate sizes and alignments of all
subordinate buses. */
/* Depth first, calculate sizes and alignments of all
subordinate buses. */
- for(ln=pci_root_buses.next; ln != &pci_root_buses; ln=ln->next)
- pci_bus_size_bridges(pci_bus_b(ln));
+ list_for_each_entry(bus, &pci_root_buses, node) {
+ pci_bus_size_bridges(bus);
+ }
/* Depth last, allocate resources and update the hardware. */
/* Depth last, allocate resources and update the hardware. */
-
for(ln=pci_root_buses.next; ln != &pci_root_buses; ln=ln->next
) {
- pci_bus_assign_resources(
pci_bus_b(ln)
);
- pci_enable_bridges(
pci_bus_b(ln)
);
+
list_for_each_entry(bus, &pci_root_buses, node
) {
+ pci_bus_assign_resources(
bus
);
+ pci_enable_bridges(
bus
);
}
}
}
}