diff options
author | Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 2005-07-29 15:16:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-29 16:12:51 -0400 |
commit | 10f4338ca8534823bc6c843edbbe42fd4e73d258 (patch) | |
tree | e0e94513f07166de7f45cfdc2b8c2199e5be7a3d | |
parent | 761a3ac08c63718dacde12aaf0ec6d6760e8c2b7 (diff) |
[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: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/pci/probe.c | 2 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 12 |
2 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index df3bdae2040f..93e8a878ea95 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -507,7 +507,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max | |||
507 | pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses); | 507 | pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses); |
508 | 508 | ||
509 | if (!is_cardbus) { | 509 | if (!is_cardbus) { |
510 | child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA; | 510 | child->bridge_ctl = bctl | PCI_BRIDGE_CTL_NO_ISA; |
511 | /* | 511 | /* |
512 | * Adjust subordinate busnr in parent buses. | 512 | * Adjust subordinate busnr in parent buses. |
513 | * We do this before scanning for children because | 513 | * We do this before scanning for children because |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 9fe48f712be9..a2eebc6eaacc 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -51,8 +51,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus) | |||
51 | struct resource_list head, *list, *tmp; | 51 | struct resource_list head, *list, *tmp; |
52 | int idx; | 52 | int idx; |
53 | 53 | ||
54 | bus->bridge_ctl &= ~PCI_BRIDGE_CTL_VGA; | ||
55 | |||
56 | head.next = NULL; | 54 | head.next = NULL; |
57 | list_for_each_entry(dev, &bus->devices, bus_list) { | 55 | list_for_each_entry(dev, &bus->devices, bus_list) { |
58 | u16 class = dev->class >> 8; | 56 | u16 class = dev->class >> 8; |
@@ -62,10 +60,6 @@ pbus_assign_resources_sorted(struct pci_bus *bus) | |||
62 | class == PCI_CLASS_BRIDGE_HOST) | 60 | class == PCI_CLASS_BRIDGE_HOST) |
63 | continue; | 61 | continue; |
64 | 62 | ||
65 | if (class == PCI_CLASS_DISPLAY_VGA || | ||
66 | class == PCI_CLASS_NOT_DEFINED_VGA) | ||
67 | bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA; | ||
68 | |||
69 | pdev_sort_resources(dev, &head); | 63 | pdev_sort_resources(dev, &head); |
70 | } | 64 | } |
71 | 65 | ||
@@ -509,12 +503,6 @@ pci_bus_assign_resources(struct pci_bus *bus) | |||
509 | 503 | ||
510 | pbus_assign_resources_sorted(bus); | 504 | pbus_assign_resources_sorted(bus); |
511 | 505 | ||
512 | if (bus->bridge_ctl & PCI_BRIDGE_CTL_VGA) { | ||
513 | /* Propagate presence of the VGA to upstream bridges */ | ||
514 | for (b = bus; b->parent; b = b->parent) { | ||
515 | b->bridge_ctl |= PCI_BRIDGE_CTL_VGA; | ||
516 | } | ||
517 | } | ||
518 | list_for_each_entry(dev, &bus->devices, bus_list) { | 506 | list_for_each_entry(dev, &bus->devices, bus_list) { |
519 | b = dev->subordinate; | 507 | b = dev->subordinate; |
520 | if (!b) | 508 | if (!b) |