Commit 10f4338c authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Linus Torvalds

[PATCH] PCI: remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c

The setup-bus code doesn't work correctly for configurations
with more than one display adapter in the same PCI domain.
This stuff actually is a leftover of an early 2.4 PCI setup code
and apparently it stopped working after some "bridge_ctl" changes.
So the best thing we can do is just to remove it and rely on the fact
that any firmware *has* to configure VGA port forwarding for the boot
display device properly.

But then we need to ensure that the bus->bridge_ctl will always
contain valid information collected at the probe time, therefore
the following change in pci_scan_bridge() is needed.
Signed-off-by: default avatarIvan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 761a3ac0
...@@ -507,7 +507,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max ...@@ -507,7 +507,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses); pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses);
if (!is_cardbus) { if (!is_cardbus) {
child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA; child->bridge_ctl = bctl | PCI_BRIDGE_CTL_NO_ISA;
/* /*
* Adjust subordinate busnr in parent buses. * Adjust subordinate busnr in parent buses.
* We do this before scanning for children because * We do this before scanning for children because
......
...@@ -51,8 +51,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus) ...@@ -51,8 +51,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
struct resource_list head, *list, *tmp; struct resource_list head, *list, *tmp;
int idx; int idx;
bus->bridge_ctl &= ~PCI_BRIDGE_CTL_VGA;
head.next = NULL; head.next = NULL;
list_for_each_entry(dev, &bus->devices, bus_list) { list_for_each_entry(dev, &bus->devices, bus_list) {
u16 class = dev->class >> 8; u16 class = dev->class >> 8;
...@@ -62,10 +60,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus) ...@@ -62,10 +60,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
class == PCI_CLASS_BRIDGE_HOST) class == PCI_CLASS_BRIDGE_HOST)
continue; 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); pdev_sort_resources(dev, &head);
} }
...@@ -509,12 +503,6 @@ pci_bus_assign_resources(struct pci_bus *bus) ...@@ -509,12 +503,6 @@ pci_bus_assign_resources(struct pci_bus *bus)
pbus_assign_resources_sorted(bus); pbus_assign_resources_sorted(bus);
if (bus->bridge_ctl & PCI_BRIDGE_CTL_VGA) {
/* Propagate presence of the VGA to upstream bridges */
for (b = bus; b->parent; b = b->parent) {
b->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
}
}
list_for_each_entry(dev, &bus->devices, bus_list) { list_for_each_entry(dev, &bus->devices, bus_list) {
b = dev->subordinate; b = dev->subordinate;
if (!b) if (!b)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment