diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:40:27 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:40:27 -0400 |
| commit | c1b054d03f5b31c33eaa0b267c629b118eaf3790 (patch) | |
| tree | 9333907ca767be24fcb3667877242976c3e3c8dd /drivers/pci/setup-bus.c | |
| parent | 559fb51ba7e66fe298b8355fabde1275b7def35f (diff) | |
| parent | bf4e70e54cf31dcca48d279c7f7e71328eebe749 (diff) | |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/pci/setup-bus.c')
| -rw-r--r-- | drivers/pci/setup-bus.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 1ba84be0b4c0..6d864c502a1f 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | * FIXME: IO should be max 256 bytes. However, since we may | 40 | * FIXME: IO should be max 256 bytes. However, since we may |
| 41 | * have a P2P bridge below a cardbus bridge, we need 4K. | 41 | * have a P2P bridge below a cardbus bridge, we need 4K. |
| 42 | */ | 42 | */ |
| 43 | #define CARDBUS_IO_SIZE (4096) | 43 | #define CARDBUS_IO_SIZE (256) |
| 44 | #define CARDBUS_MEM_SIZE (32*1024*1024) | 44 | #define CARDBUS_MEM_SIZE (32*1024*1024) |
| 45 | 45 | ||
| 46 | static void __devinit | 46 | static void __devinit |
| @@ -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,17 +60,17 @@ 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 | ||
| 72 | for (list = head.next; list;) { | 66 | for (list = head.next; list;) { |
| 73 | res = list->res; | 67 | res = list->res; |
| 74 | idx = res - &list->dev->resource[0]; | 68 | idx = res - &list->dev->resource[0]; |
| 75 | pci_assign_resource(list->dev, idx); | 69 | if (pci_assign_resource(list->dev, idx)) { |
| 70 | res->start = 0; | ||
| 71 | res->end = 0; | ||
| 72 | res->flags = 0; | ||
| 73 | } | ||
| 76 | tmp = list; | 74 | tmp = list; |
| 77 | list = list->next; | 75 | list = list->next; |
| 78 | kfree(tmp); | 76 | kfree(tmp); |
| @@ -270,6 +268,8 @@ find_free_bus_resource(struct pci_bus *bus, unsigned long type) | |||
| 270 | 268 | ||
| 271 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | 269 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { |
| 272 | r = bus->resource[i]; | 270 | r = bus->resource[i]; |
| 271 | if (r == &ioport_resource || r == &iomem_resource) | ||
| 272 | continue; | ||
| 273 | if (r && (r->flags & type_mask) == type && !r->parent) | 273 | if (r && (r->flags & type_mask) == type && !r->parent) |
| 274 | return r; | 274 | return r; |
| 275 | } | 275 | } |
| @@ -503,12 +503,6 @@ pci_bus_assign_resources(struct pci_bus *bus) | |||
| 503 | 503 | ||
| 504 | pbus_assign_resources_sorted(bus); | 504 | pbus_assign_resources_sorted(bus); |
| 505 | 505 | ||
| 506 | if (bus->bridge_ctl & PCI_BRIDGE_CTL_VGA) { | ||
| 507 | /* Propagate presence of the VGA to upstream bridges */ | ||
| 508 | for (b = bus; b->parent; b = b->parent) { | ||
| 509 | b->bridge_ctl |= PCI_BRIDGE_CTL_VGA; | ||
| 510 | } | ||
| 511 | } | ||
| 512 | list_for_each_entry(dev, &bus->devices, bus_list) { | 506 | list_for_each_entry(dev, &bus->devices, bus_list) { |
| 513 | b = dev->subordinate; | 507 | b = dev->subordinate; |
| 514 | if (!b) | 508 | if (!b) |
