diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/intel-iommu.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.c | 4 | ||||
-rw-r--r-- | drivers/parisc/dino.c | 10 | ||||
-rw-r--r-- | drivers/parisc/iosapic.c | 2 | ||||
-rw-r--r-- | drivers/parisc/lba_pci.c | 22 | ||||
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 8 | ||||
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_pci.c | 6 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_pci.c | 4 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_pci.c | 6 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_sysfs.c | 6 | ||||
-rw-r--r-- | drivers/pci/iov.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci.c | 2 | ||||
-rw-r--r-- | drivers/pci/probe.c | 58 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 24 | ||||
-rw-r--r-- | drivers/pcmcia/cardbus.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 26 |
16 files changed, 93 insertions, 93 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b12af2ff8c54..2fb7d1598a68 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -661,7 +661,7 @@ static struct intel_iommu *device_to_iommu(int segment, u8 bus, u8 devfn) | |||
661 | if (drhd->devices[i] && | 661 | if (drhd->devices[i] && |
662 | drhd->devices[i]->subordinate && | 662 | drhd->devices[i]->subordinate && |
663 | drhd->devices[i]->subordinate->number <= bus && | 663 | drhd->devices[i]->subordinate->number <= bus && |
664 | drhd->devices[i]->subordinate->subordinate >= bus) | 664 | drhd->devices[i]->subordinate->busn_res.end >= bus) |
665 | return drhd->iommu; | 665 | return drhd->iommu; |
666 | } | 666 | } |
667 | 667 | ||
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index edeeb516807a..09fa3c687a1f 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -14168,7 +14168,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
14168 | if (bridge->subordinate && | 14168 | if (bridge->subordinate && |
14169 | (bridge->subordinate->number <= | 14169 | (bridge->subordinate->number <= |
14170 | tp->pdev->bus->number) && | 14170 | tp->pdev->bus->number) && |
14171 | (bridge->subordinate->subordinate >= | 14171 | (bridge->subordinate->busn_res.end >= |
14172 | tp->pdev->bus->number)) { | 14172 | tp->pdev->bus->number)) { |
14173 | tg3_flag_set(tp, 5701_DMA_BUG); | 14173 | tg3_flag_set(tp, 5701_DMA_BUG); |
14174 | pci_dev_put(bridge); | 14174 | pci_dev_put(bridge); |
@@ -14196,7 +14196,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
14196 | if (bridge && bridge->subordinate && | 14196 | if (bridge && bridge->subordinate && |
14197 | (bridge->subordinate->number <= | 14197 | (bridge->subordinate->number <= |
14198 | tp->pdev->bus->number) && | 14198 | tp->pdev->bus->number) && |
14199 | (bridge->subordinate->subordinate >= | 14199 | (bridge->subordinate->busn_res.end >= |
14200 | tp->pdev->bus->number)) { | 14200 | tp->pdev->bus->number)) { |
14201 | tg3_flag_set(tp, 40BIT_DMA_BUG); | 14201 | tg3_flag_set(tp, 40BIT_DMA_BUG); |
14202 | pci_dev_put(bridge); | 14202 | pci_dev_put(bridge); |
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 432d4bbcc62a..70517b0f94e6 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -174,7 +174,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where, | |||
174 | int size, u32 *val) | 174 | int size, u32 *val) |
175 | { | 175 | { |
176 | struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); | 176 | struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); |
177 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 177 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
178 | u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); | 178 | u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); |
179 | void __iomem *base_addr = d->hba.base_addr; | 179 | void __iomem *base_addr = d->hba.base_addr; |
180 | unsigned long flags; | 180 | unsigned long flags; |
@@ -209,7 +209,7 @@ static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where, | |||
209 | int size, u32 val) | 209 | int size, u32 val) |
210 | { | 210 | { |
211 | struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); | 211 | struct dino_device *d = DINO_DEV(parisc_walk_tree(bus->bridge)); |
212 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 212 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
213 | u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); | 213 | u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); |
214 | void __iomem *base_addr = d->hba.base_addr; | 214 | void __iomem *base_addr = d->hba.base_addr; |
215 | unsigned long flags; | 215 | unsigned long flags; |
@@ -554,7 +554,7 @@ dino_fixup_bus(struct pci_bus *bus) | |||
554 | struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); | 554 | struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); |
555 | 555 | ||
556 | DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", | 556 | DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", |
557 | __func__, bus, bus->secondary, | 557 | __func__, bus, bus->busn_res.start, |
558 | bus->bridge->platform_data); | 558 | bus->bridge->platform_data); |
559 | 559 | ||
560 | /* Firmware doesn't set up card-mode dino, so we have to */ | 560 | /* Firmware doesn't set up card-mode dino, so we have to */ |
@@ -998,12 +998,12 @@ static int __init dino_probe(struct parisc_device *dev) | |||
998 | return 0; | 998 | return 0; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | bus->subordinate = pci_scan_child_bus(bus); | 1001 | bus->busn_res.end = pci_scan_child_bus(bus); |
1002 | 1002 | ||
1003 | /* This code *depends* on scanning being single threaded | 1003 | /* This code *depends* on scanning being single threaded |
1004 | * if it isn't, this global bus number count will fail | 1004 | * if it isn't, this global bus number count will fail |
1005 | */ | 1005 | */ |
1006 | dino_current_bus = bus->subordinate + 1; | 1006 | dino_current_bus = bus->busn_res.end + 1; |
1007 | pci_bus_assign_resources(bus); | 1007 | pci_bus_assign_resources(bus); |
1008 | pci_bus_add_devices(bus); | 1008 | pci_bus_add_devices(bus); |
1009 | return 0; | 1009 | return 0; |
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 1f9e9fefb8e7..83380c8fcb6b 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c | |||
@@ -532,7 +532,7 @@ iosapic_xlate_pin(struct iosapic_info *isi, struct pci_dev *pcidev) | |||
532 | intr_slot = PCI_SLOT(pcidev->devfn); | 532 | intr_slot = PCI_SLOT(pcidev->devfn); |
533 | } | 533 | } |
534 | DBG_IRT("iosapic_xlate_pin: bus %d slot %d pin %d\n", | 534 | DBG_IRT("iosapic_xlate_pin: bus %d slot %d pin %d\n", |
535 | pcidev->bus->secondary, intr_slot, intr_pin); | 535 | pcidev->bus->busn_res.start, intr_slot, intr_pin); |
536 | 536 | ||
537 | return irt_find_irqline(isi, intr_slot, intr_pin); | 537 | return irt_find_irqline(isi, intr_slot, intr_pin); |
538 | } | 538 | } |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 052fa230bc77..cd8f9ce8720f 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -189,8 +189,8 @@ lba_dump_res(struct resource *r, int d) | |||
189 | 189 | ||
190 | static int lba_device_present(u8 bus, u8 dfn, struct lba_device *d) | 190 | static int lba_device_present(u8 bus, u8 dfn, struct lba_device *d) |
191 | { | 191 | { |
192 | u8 first_bus = d->hba.hba_bus->secondary; | 192 | u8 first_bus = d->hba.hba_bus->busn_res.start; |
193 | u8 last_sub_bus = d->hba.hba_bus->subordinate; | 193 | u8 last_sub_bus = d->hba.hba_bus->busn_res.end; |
194 | 194 | ||
195 | if ((bus < first_bus) || | 195 | if ((bus < first_bus) || |
196 | (bus > last_sub_bus) || | 196 | (bus > last_sub_bus) || |
@@ -364,7 +364,7 @@ lba_rd_cfg(struct lba_device *d, u32 tok, u8 reg, u32 size) | |||
364 | static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) | 364 | static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) |
365 | { | 365 | { |
366 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); | 366 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); |
367 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 367 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
368 | u32 tok = LBA_CFG_TOK(local_bus, devfn); | 368 | u32 tok = LBA_CFG_TOK(local_bus, devfn); |
369 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; | 369 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; |
370 | 370 | ||
@@ -380,7 +380,7 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int | |||
380 | return 0; | 380 | return 0; |
381 | } | 381 | } |
382 | 382 | ||
383 | if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) { | 383 | if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->busn_res.start, devfn, d)) { |
384 | DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos); | 384 | DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos); |
385 | /* either don't want to look or know device isn't present. */ | 385 | /* either don't want to look or know device isn't present. */ |
386 | *data = ~0U; | 386 | *data = ~0U; |
@@ -431,7 +431,7 @@ lba_wr_cfg(struct lba_device *d, u32 tok, u8 reg, u32 data, u32 size) | |||
431 | static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) | 431 | static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) |
432 | { | 432 | { |
433 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); | 433 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); |
434 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 434 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
435 | u32 tok = LBA_CFG_TOK(local_bus,devfn); | 435 | u32 tok = LBA_CFG_TOK(local_bus,devfn); |
436 | 436 | ||
437 | if ((pos > 255) || (devfn > 255)) | 437 | if ((pos > 255) || (devfn > 255)) |
@@ -444,7 +444,7 @@ static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int | |||
444 | return 0; | 444 | return 0; |
445 | } | 445 | } |
446 | 446 | ||
447 | if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) { | 447 | if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->busn_res.start, devfn, d))) { |
448 | DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data); | 448 | DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data); |
449 | return 1; /* New Workaround */ | 449 | return 1; /* New Workaround */ |
450 | } | 450 | } |
@@ -481,7 +481,7 @@ static struct pci_ops elroy_cfg_ops = { | |||
481 | static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) | 481 | static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) |
482 | { | 482 | { |
483 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); | 483 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); |
484 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 484 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
485 | u32 tok = LBA_CFG_TOK(local_bus, devfn); | 485 | u32 tok = LBA_CFG_TOK(local_bus, devfn); |
486 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; | 486 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; |
487 | 487 | ||
@@ -514,7 +514,7 @@ static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, i | |||
514 | { | 514 | { |
515 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); | 515 | struct lba_device *d = LBA_DEV(parisc_walk_tree(bus->bridge)); |
516 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; | 516 | void __iomem *data_reg = d->hba.base_addr + LBA_PCI_CFG_DATA; |
517 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->secondary; | 517 | u32 local_bus = (bus->parent == NULL) ? 0 : bus->busn_res.start; |
518 | u32 tok = LBA_CFG_TOK(local_bus,devfn); | 518 | u32 tok = LBA_CFG_TOK(local_bus,devfn); |
519 | 519 | ||
520 | if ((pos > 255) || (devfn > 255)) | 520 | if ((pos > 255) || (devfn > 255)) |
@@ -636,7 +636,7 @@ lba_fixup_bus(struct pci_bus *bus) | |||
636 | struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge)); | 636 | struct lba_device *ldev = LBA_DEV(parisc_walk_tree(bus->bridge)); |
637 | 637 | ||
638 | DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n", | 638 | DBG("lba_fixup_bus(0x%p) bus %d platform_data 0x%p\n", |
639 | bus, bus->secondary, bus->bridge->platform_data); | 639 | bus, (int)bus->busn_res.start, bus->bridge->platform_data); |
640 | 640 | ||
641 | /* | 641 | /* |
642 | ** Properly Setup MMIO resources for this bus. | 642 | ** Properly Setup MMIO resources for this bus. |
@@ -1511,7 +1511,7 @@ lba_driver_probe(struct parisc_device *dev) | |||
1511 | return 0; | 1511 | return 0; |
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | lba_bus->subordinate = pci_scan_child_bus(lba_bus); | 1514 | lba_bus->busn_res.end = pci_scan_child_bus(lba_bus); |
1515 | 1515 | ||
1516 | /* This is in lieu of calling pci_assign_unassigned_resources() */ | 1516 | /* This is in lieu of calling pci_assign_unassigned_resources() */ |
1517 | if (is_pdc_pat()) { | 1517 | if (is_pdc_pat()) { |
@@ -1541,7 +1541,7 @@ lba_driver_probe(struct parisc_device *dev) | |||
1541 | lba_dev->flags |= LBA_FLAG_SKIP_PROBE; | 1541 | lba_dev->flags |= LBA_FLAG_SKIP_PROBE; |
1542 | } | 1542 | } |
1543 | 1543 | ||
1544 | lba_next_bus = lba_bus->subordinate + 1; | 1544 | lba_next_bus = lba_res->busn_res.end + 1; |
1545 | pci_bus_add_devices(lba_bus); | 1545 | pci_bus_add_devices(lba_bus); |
1546 | 1546 | ||
1547 | /* Whew! Finally done! Tell services we got this one covered. */ | 1547 | /* Whew! Finally done! Tell services we got this one covered. */ |
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 806c44fa645a..62d0ae4dfcad 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -100,11 +100,11 @@ static int post_dock_fixups(struct notifier_block *nb, unsigned long val, | |||
100 | PCI_PRIMARY_BUS, | 100 | PCI_PRIMARY_BUS, |
101 | &buses); | 101 | &buses); |
102 | 102 | ||
103 | if (((buses >> 8) & 0xff) != bus->secondary) { | 103 | if (((buses >> 8) & 0xff) != bus->busn_res.start) { |
104 | buses = (buses & 0xff000000) | 104 | buses = (buses & 0xff000000) |
105 | | ((unsigned int)(bus->primary) << 0) | 105 | | ((unsigned int)(bus->primary) << 0) |
106 | | ((unsigned int)(bus->secondary) << 8) | 106 | | ((unsigned int)(bus->busn_res.start) << 8) |
107 | | ((unsigned int)(bus->subordinate) << 16); | 107 | | ((unsigned int)(bus->busn_res.end) << 16); |
108 | pci_write_config_dword(bus->self, PCI_PRIMARY_BUS, buses); | 108 | pci_write_config_dword(bus->self, PCI_PRIMARY_BUS, buses); |
109 | } | 109 | } |
110 | return NOTIFY_OK; | 110 | return NOTIFY_OK; |
@@ -692,7 +692,7 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus) | |||
692 | * bus->subordinate value because it could have | 692 | * bus->subordinate value because it could have |
693 | * padding in it. | 693 | * padding in it. |
694 | */ | 694 | */ |
695 | max = bus->secondary; | 695 | max = bus->busn_res.start; |
696 | 696 | ||
697 | list_for_each(tmp, &bus->children) { | 697 | list_for_each(tmp, &bus->children) { |
698 | n = pci_bus_max_busnr(pci_bus_b(tmp)); | 698 | n = pci_bus_max_busnr(pci_bus_b(tmp)); |
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index ae853ccd0cd5..42f3a61db87c 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c | |||
@@ -292,8 +292,8 @@ int __ref cpci_configure_slot(struct slot *slot) | |||
292 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { | 292 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { |
293 | /* Find an unused bus number for the new bridge */ | 293 | /* Find an unused bus number for the new bridge */ |
294 | struct pci_bus *child; | 294 | struct pci_bus *child; |
295 | unsigned char busnr, start = parent->secondary; | 295 | unsigned char busnr, start = parent->busn_res.start; |
296 | unsigned char end = parent->subordinate; | 296 | unsigned char end = parent->busn_res.end; |
297 | 297 | ||
298 | for (busnr = start; busnr <= end; busnr++) { | 298 | for (busnr = start; busnr <= end; busnr++) { |
299 | if (!pci_find_bus(pci_domain_nr(parent), | 299 | if (!pci_find_bus(pci_domain_nr(parent), |
@@ -312,7 +312,7 @@ int __ref cpci_configure_slot(struct slot *slot) | |||
312 | pci_dev_put(dev); | 312 | pci_dev_put(dev); |
313 | continue; | 313 | continue; |
314 | } | 314 | } |
315 | child->subordinate = pci_do_scan_bus(child); | 315 | child->busn_res.end = pci_do_scan_bus(child); |
316 | pci_bus_size_bridges(child); | 316 | pci_bus_size_bridges(child); |
317 | } | 317 | } |
318 | pci_dev_put(dev); | 318 | pci_dev_put(dev); |
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c index 47d9dc06b109..b898f06b588d 100644 --- a/drivers/pci/hotplug/pciehp_pci.c +++ b/drivers/pci/hotplug/pciehp_pci.c | |||
@@ -37,8 +37,8 @@ | |||
37 | static int __ref pciehp_add_bridge(struct pci_dev *dev) | 37 | static int __ref pciehp_add_bridge(struct pci_dev *dev) |
38 | { | 38 | { |
39 | struct pci_bus *parent = dev->bus; | 39 | struct pci_bus *parent = dev->bus; |
40 | int pass, busnr, start = parent->secondary; | 40 | int pass, busnr, start = parent->busn_res.start; |
41 | int end = parent->subordinate; | 41 | int end = parent->busn_res.end; |
42 | 42 | ||
43 | for (busnr = start; busnr <= end; busnr++) { | 43 | for (busnr = start; busnr <= end; busnr++) { |
44 | if (!pci_find_bus(pci_domain_nr(parent), busnr)) | 44 | if (!pci_find_bus(pci_domain_nr(parent), busnr)) |
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index df7e4bfadae3..d021eb031b3c 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c | |||
@@ -64,8 +64,8 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
64 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { | 64 | (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { |
65 | /* Find an unused bus number for the new bridge */ | 65 | /* Find an unused bus number for the new bridge */ |
66 | struct pci_bus *child; | 66 | struct pci_bus *child; |
67 | unsigned char busnr, start = parent->secondary; | 67 | unsigned char busnr, start = parent->busn_res.start; |
68 | unsigned char end = parent->subordinate; | 68 | unsigned char end = parent->busn_res.end; |
69 | for (busnr = start; busnr <= end; busnr++) { | 69 | for (busnr = start; busnr <= end; busnr++) { |
70 | if (!pci_find_bus(pci_domain_nr(parent), | 70 | if (!pci_find_bus(pci_domain_nr(parent), |
71 | busnr)) | 71 | busnr)) |
@@ -84,7 +84,7 @@ int __ref shpchp_configure_device(struct slot *p_slot) | |||
84 | pci_dev_put(dev); | 84 | pci_dev_put(dev); |
85 | continue; | 85 | continue; |
86 | } | 86 | } |
87 | child->subordinate = pci_do_scan_bus(child); | 87 | child->busn_res.end = pci_do_scan_bus(child); |
88 | pci_bus_size_bridges(child); | 88 | pci_bus_size_bridges(child); |
89 | } | 89 | } |
90 | pci_configure_slot(dev); | 90 | pci_configure_slot(dev); |
diff --git a/drivers/pci/hotplug/shpchp_sysfs.c b/drivers/pci/hotplug/shpchp_sysfs.c index efa30da1ae8f..eeb23ceae4a8 100644 --- a/drivers/pci/hotplug/shpchp_sysfs.c +++ b/drivers/pci/hotplug/shpchp_sysfs.c | |||
@@ -73,13 +73,13 @@ static ssize_t show_ctrl (struct device *dev, struct device_attribute *attr, cha | |||
73 | } | 73 | } |
74 | } | 74 | } |
75 | out += sprintf(out, "Free resources: bus numbers\n"); | 75 | out += sprintf(out, "Free resources: bus numbers\n"); |
76 | for (busnr = bus->secondary; busnr <= bus->subordinate; busnr++) { | 76 | for (busnr = bus->busn_res.start; busnr <= bus->busn_res.end; busnr++) { |
77 | if (!pci_find_bus(pci_domain_nr(bus), busnr)) | 77 | if (!pci_find_bus(pci_domain_nr(bus), busnr)) |
78 | break; | 78 | break; |
79 | } | 79 | } |
80 | if (busnr < bus->subordinate) | 80 | if (busnr < bus->busn_res.end) |
81 | out += sprintf(out, "start = %8.8x, length = %8.8x\n", | 81 | out += sprintf(out, "start = %8.8x, length = %8.8x\n", |
82 | busnr, (bus->subordinate - busnr)); | 82 | busnr, (int)(bus->busn_res.end - busnr)); |
83 | 83 | ||
84 | return out - buf; | 84 | return out - buf; |
85 | } | 85 | } |
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 6554e1a0f634..e873060fb35b 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -47,7 +47,7 @@ static struct pci_bus *virtfn_add_bus(struct pci_bus *bus, int busnr) | |||
47 | if (!child) | 47 | if (!child) |
48 | return NULL; | 48 | return NULL; |
49 | 49 | ||
50 | child->subordinate = busnr; | 50 | child->busn_res.end = busnr; |
51 | child->dev.parent = bus->bridge; | 51 | child->dev.parent = bus->bridge; |
52 | rc = pci_bus_add_child(child); | 52 | rc = pci_bus_add_child(child); |
53 | if (rc) { | 53 | if (rc) { |
@@ -327,7 +327,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn) | |||
327 | iov->offset = offset; | 327 | iov->offset = offset; |
328 | iov->stride = stride; | 328 | iov->stride = stride; |
329 | 329 | ||
330 | if (virtfn_bus(dev, nr_virtfn - 1) > dev->bus->subordinate) { | 330 | if (virtfn_bus(dev, nr_virtfn - 1) > dev->bus->busn_res.end) { |
331 | dev_err(&dev->dev, "SR-IOV: bus number out of range\n"); | 331 | dev_err(&dev->dev, "SR-IOV: bus number out of range\n"); |
332 | return -ENOMEM; | 332 | return -ENOMEM; |
333 | } | 333 | } |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 447e83472c01..aeda6e9c245c 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -110,7 +110,7 @@ unsigned char pci_bus_max_busnr(struct pci_bus* bus) | |||
110 | struct list_head *tmp; | 110 | struct list_head *tmp; |
111 | unsigned char max, n; | 111 | unsigned char max, n; |
112 | 112 | ||
113 | max = bus->subordinate; | 113 | max = bus->busn_res.end; |
114 | list_for_each(tmp, &bus->children) { | 114 | list_for_each(tmp, &bus->children) { |
115 | n = pci_bus_max_busnr(pci_bus_b(tmp)); | 115 | n = pci_bus_max_busnr(pci_bus_b(tmp)); |
116 | if(n > max) | 116 | if(n > max) |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 658ac977cb56..651b096134dc 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -381,8 +381,8 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
381 | if (pci_is_root_bus(child)) /* It's a host bus, nothing to read */ | 381 | if (pci_is_root_bus(child)) /* It's a host bus, nothing to read */ |
382 | return; | 382 | return; |
383 | 383 | ||
384 | dev_info(&dev->dev, "PCI bridge to [bus %02x-%02x]%s\n", | 384 | dev_info(&dev->dev, "PCI bridge to %pR%s\n", |
385 | child->secondary, child->subordinate, | 385 | &child->busn_res, |
386 | dev->transparent ? " (subtractive decode)" : ""); | 386 | dev->transparent ? " (subtractive decode)" : ""); |
387 | 387 | ||
388 | pci_bus_remove_resources(child); | 388 | pci_bus_remove_resources(child); |
@@ -599,9 +599,9 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, | |||
599 | * Set up the primary, secondary and subordinate | 599 | * Set up the primary, secondary and subordinate |
600 | * bus numbers. | 600 | * bus numbers. |
601 | */ | 601 | */ |
602 | child->number = child->secondary = busnr; | 602 | child->number = child->busn_res.start = busnr; |
603 | child->primary = parent->secondary; | 603 | child->primary = parent->busn_res.start; |
604 | child->subordinate = 0xff; | 604 | child->busn_res.end = 0xff; |
605 | 605 | ||
606 | if (!bridge) | 606 | if (!bridge) |
607 | return child; | 607 | return child; |
@@ -643,8 +643,8 @@ static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) | |||
643 | if (!pcibios_assign_all_busses()) | 643 | if (!pcibios_assign_all_busses()) |
644 | return; | 644 | return; |
645 | 645 | ||
646 | while (parent->parent && parent->subordinate < max) { | 646 | while (parent->parent && parent->busn_res.end < max) { |
647 | parent->subordinate = max; | 647 | parent->busn_res.end = max; |
648 | pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max); | 648 | pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max); |
649 | parent = parent->parent; | 649 | parent = parent->parent; |
650 | } | 650 | } |
@@ -718,15 +718,15 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
718 | if (!child) | 718 | if (!child) |
719 | goto out; | 719 | goto out; |
720 | child->primary = primary; | 720 | child->primary = primary; |
721 | child->subordinate = subordinate; | 721 | child->busn_res.end = subordinate; |
722 | child->bridge_ctl = bctl; | 722 | child->bridge_ctl = bctl; |
723 | } | 723 | } |
724 | 724 | ||
725 | cmax = pci_scan_child_bus(child); | 725 | cmax = pci_scan_child_bus(child); |
726 | if (cmax > max) | 726 | if (cmax > max) |
727 | max = cmax; | 727 | max = cmax; |
728 | if (child->subordinate > max) | 728 | if (child->busn_res.end > max) |
729 | max = child->subordinate; | 729 | max = child->busn_res.end; |
730 | } else { | 730 | } else { |
731 | /* | 731 | /* |
732 | * We need to assign a number to this bus which we always | 732 | * We need to assign a number to this bus which we always |
@@ -759,8 +759,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
759 | } | 759 | } |
760 | buses = (buses & 0xff000000) | 760 | buses = (buses & 0xff000000) |
761 | | ((unsigned int)(child->primary) << 0) | 761 | | ((unsigned int)(child->primary) << 0) |
762 | | ((unsigned int)(child->secondary) << 8) | 762 | | ((unsigned int)(child->busn_res.start) << 8) |
763 | | ((unsigned int)(child->subordinate) << 16); | 763 | | ((unsigned int)(child->busn_res.end) << 16); |
764 | 764 | ||
765 | /* | 765 | /* |
766 | * yenta.c forces a secondary latency timer of 176. | 766 | * yenta.c forces a secondary latency timer of 176. |
@@ -805,8 +805,8 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
805 | break; | 805 | break; |
806 | while (parent->parent) { | 806 | while (parent->parent) { |
807 | if ((!pcibios_assign_all_busses()) && | 807 | if ((!pcibios_assign_all_busses()) && |
808 | (parent->subordinate > max) && | 808 | (parent->busn_res.end > max) && |
809 | (parent->subordinate <= max+i)) { | 809 | (parent->busn_res.end <= max+i)) { |
810 | j = 1; | 810 | j = 1; |
811 | } | 811 | } |
812 | parent = parent->parent; | 812 | parent = parent->parent; |
@@ -827,7 +827,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
827 | /* | 827 | /* |
828 | * Set the subordinate bus number to its real value. | 828 | * Set the subordinate bus number to its real value. |
829 | */ | 829 | */ |
830 | child->subordinate = max; | 830 | child->busn_res.end = max; |
831 | pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max); | 831 | pci_write_config_byte(dev, PCI_SUBORDINATE_BUS, max); |
832 | } | 832 | } |
833 | 833 | ||
@@ -837,19 +837,19 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
837 | 837 | ||
838 | /* Has only triggered on CardBus, fixup is in yenta_socket */ | 838 | /* Has only triggered on CardBus, fixup is in yenta_socket */ |
839 | while (bus->parent) { | 839 | while (bus->parent) { |
840 | if ((child->subordinate > bus->subordinate) || | 840 | if ((child->busn_res.end > bus->busn_res.end) || |
841 | (child->number > bus->subordinate) || | 841 | (child->number > bus->busn_res.end) || |
842 | (child->number < bus->number) || | 842 | (child->number < bus->number) || |
843 | (child->subordinate < bus->number)) { | 843 | (child->busn_res.end < bus->number)) { |
844 | dev_info(&child->dev, "[bus %02x-%02x] %s " | 844 | dev_info(&child->dev, "%pR %s " |
845 | "hidden behind%s bridge %s [bus %02x-%02x]\n", | 845 | "hidden behind%s bridge %s %pR\n", |
846 | child->number, child->subordinate, | 846 | &child->busn_res, |
847 | (bus->number > child->subordinate && | 847 | (bus->number > child->busn_res.end && |
848 | bus->subordinate < child->number) ? | 848 | bus->busn_res.end < child->number) ? |
849 | "wholly" : "partially", | 849 | "wholly" : "partially", |
850 | bus->self->transparent ? " transparent" : "", | 850 | bus->self->transparent ? " transparent" : "", |
851 | dev_name(&bus->dev), | 851 | dev_name(&bus->dev), |
852 | bus->number, bus->subordinate); | 852 | &bus->busn_res); |
853 | } | 853 | } |
854 | bus = bus->parent; | 854 | bus = bus->parent; |
855 | } | 855 | } |
@@ -1548,7 +1548,7 @@ EXPORT_SYMBOL_GPL(pcie_bus_configure_settings); | |||
1548 | 1548 | ||
1549 | unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) | 1549 | unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) |
1550 | { | 1550 | { |
1551 | unsigned int devfn, pass, max = bus->secondary; | 1551 | unsigned int devfn, pass, max = bus->busn_res.start; |
1552 | struct pci_dev *dev; | 1552 | struct pci_dev *dev; |
1553 | 1553 | ||
1554 | dev_dbg(&bus->dev, "scanning bus\n"); | 1554 | dev_dbg(&bus->dev, "scanning bus\n"); |
@@ -1642,7 +1642,7 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | |||
1642 | /* Create legacy_io and legacy_mem files for this bus */ | 1642 | /* Create legacy_io and legacy_mem files for this bus */ |
1643 | pci_create_legacy_files(b); | 1643 | pci_create_legacy_files(b); |
1644 | 1644 | ||
1645 | b->number = b->secondary = bus; | 1645 | b->number = b->busn_res.start = bus; |
1646 | 1646 | ||
1647 | if (parent) | 1647 | if (parent) |
1648 | dev_info(parent, "PCI host bridge to bus %s\n", dev_name(&b->dev)); | 1648 | dev_info(parent, "PCI host bridge to bus %s\n", dev_name(&b->dev)); |
@@ -1693,7 +1693,7 @@ struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus, | |||
1693 | if (!b) | 1693 | if (!b) |
1694 | return NULL; | 1694 | return NULL; |
1695 | 1695 | ||
1696 | b->subordinate = pci_scan_child_bus(b); | 1696 | b->busn_res.end = pci_scan_child_bus(b); |
1697 | pci_bus_add_devices(b); | 1697 | pci_bus_add_devices(b); |
1698 | return b; | 1698 | return b; |
1699 | } | 1699 | } |
@@ -1710,7 +1710,7 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, | |||
1710 | pci_add_resource(&resources, &iomem_resource); | 1710 | pci_add_resource(&resources, &iomem_resource); |
1711 | b = pci_create_root_bus(parent, bus, ops, sysdata, &resources); | 1711 | b = pci_create_root_bus(parent, bus, ops, sysdata, &resources); |
1712 | if (b) | 1712 | if (b) |
1713 | b->subordinate = pci_scan_child_bus(b); | 1713 | b->busn_res.end = pci_scan_child_bus(b); |
1714 | else | 1714 | else |
1715 | pci_free_resource_list(&resources); | 1715 | pci_free_resource_list(&resources); |
1716 | return b; | 1716 | return b; |
@@ -1727,7 +1727,7 @@ struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, | |||
1727 | pci_add_resource(&resources, &iomem_resource); | 1727 | pci_add_resource(&resources, &iomem_resource); |
1728 | b = pci_create_root_bus(NULL, bus, ops, sysdata, &resources); | 1728 | b = pci_create_root_bus(NULL, bus, ops, sysdata, &resources); |
1729 | if (b) { | 1729 | if (b) { |
1730 | b->subordinate = pci_scan_child_bus(b); | 1730 | b->busn_res.end = pci_scan_child_bus(b); |
1731 | pci_bus_add_devices(b); | 1731 | pci_bus_add_devices(b); |
1732 | } else { | 1732 | } else { |
1733 | pci_free_resource_list(&resources); | 1733 | pci_free_resource_list(&resources); |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 8fa2d4be88de..192172c87b77 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -404,8 +404,8 @@ void pci_setup_cardbus(struct pci_bus *bus) | |||
404 | struct resource *res; | 404 | struct resource *res; |
405 | struct pci_bus_region region; | 405 | struct pci_bus_region region; |
406 | 406 | ||
407 | dev_info(&bridge->dev, "CardBus bridge to [bus %02x-%02x]\n", | 407 | dev_info(&bridge->dev, "CardBus bridge to %pR\n", |
408 | bus->secondary, bus->subordinate); | 408 | &bus->busn_res); |
409 | 409 | ||
410 | res = bus->resource[0]; | 410 | res = bus->resource[0]; |
411 | pcibios_resource_to_bus(bridge, ®ion, res); | 411 | pcibios_resource_to_bus(bridge, ®ion, res); |
@@ -553,8 +553,8 @@ static void __pci_setup_bridge(struct pci_bus *bus, unsigned long type) | |||
553 | { | 553 | { |
554 | struct pci_dev *bridge = bus->self; | 554 | struct pci_dev *bridge = bus->self; |
555 | 555 | ||
556 | dev_info(&bridge->dev, "PCI bridge to [bus %02x-%02x]\n", | 556 | dev_info(&bridge->dev, "PCI bridge to %pR\n", |
557 | bus->secondary, bus->subordinate); | 557 | &bus->busn_res); |
558 | 558 | ||
559 | if (type & IORESOURCE_IO) | 559 | if (type & IORESOURCE_IO) |
560 | pci_setup_bridge_io(bus); | 560 | pci_setup_bridge_io(bus); |
@@ -745,8 +745,8 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t min_size, | |||
745 | if (!size0 && !size1) { | 745 | if (!size0 && !size1) { |
746 | if (b_res->start || b_res->end) | 746 | if (b_res->start || b_res->end) |
747 | dev_info(&bus->self->dev, "disabling bridge window " | 747 | dev_info(&bus->self->dev, "disabling bridge window " |
748 | "%pR to [bus %02x-%02x] (unused)\n", b_res, | 748 | "%pR to %pR (unused)\n", b_res, |
749 | bus->secondary, bus->subordinate); | 749 | &bus->busn_res); |
750 | b_res->flags = 0; | 750 | b_res->flags = 0; |
751 | return; | 751 | return; |
752 | } | 752 | } |
@@ -757,8 +757,8 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t min_size, | |||
757 | if (size1 > size0 && realloc_head) { | 757 | if (size1 > size0 && realloc_head) { |
758 | add_to_list(realloc_head, bus->self, b_res, size1-size0, 4096); | 758 | add_to_list(realloc_head, bus->self, b_res, size1-size0, 4096); |
759 | dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window " | 759 | dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window " |
760 | "%pR to [bus %02x-%02x] add_size %lx\n", b_res, | 760 | "%pR to %pR add_size %lx\n", b_res, |
761 | bus->secondary, bus->subordinate, size1-size0); | 761 | &bus->busn_res, size1-size0); |
762 | } | 762 | } |
763 | } | 763 | } |
764 | 764 | ||
@@ -863,8 +863,8 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, | |||
863 | if (!size0 && !size1) { | 863 | if (!size0 && !size1) { |
864 | if (b_res->start || b_res->end) | 864 | if (b_res->start || b_res->end) |
865 | dev_info(&bus->self->dev, "disabling bridge window " | 865 | dev_info(&bus->self->dev, "disabling bridge window " |
866 | "%pR to [bus %02x-%02x] (unused)\n", b_res, | 866 | "%pR to %pR (unused)\n", b_res, |
867 | bus->secondary, bus->subordinate); | 867 | &bus->busn_res); |
868 | b_res->flags = 0; | 868 | b_res->flags = 0; |
869 | return 1; | 869 | return 1; |
870 | } | 870 | } |
@@ -874,8 +874,8 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, | |||
874 | if (size1 > size0 && realloc_head) { | 874 | if (size1 > size0 && realloc_head) { |
875 | add_to_list(realloc_head, bus->self, b_res, size1-size0, min_align); | 875 | add_to_list(realloc_head, bus->self, b_res, size1-size0, min_align); |
876 | dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window " | 876 | dev_printk(KERN_DEBUG, &bus->self->dev, "bridge window " |
877 | "%pR to [bus %02x-%02x] add_size %llx\n", b_res, | 877 | "%pR to %pR add_size %llx\n", b_res, |
878 | bus->secondary, bus->subordinate, (unsigned long long)size1-size0); | 878 | &bus->busn_res, (unsigned long long)size1-size0); |
879 | } | 879 | } |
880 | return 1; | 880 | return 1; |
881 | } | 881 | } |
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index 6e75153c5b4f..24caeaf50529 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c | |||
@@ -73,7 +73,7 @@ int __ref cb_alloc(struct pcmcia_socket *s) | |||
73 | s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); | 73 | s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); |
74 | pci_fixup_cardbus(bus); | 74 | pci_fixup_cardbus(bus); |
75 | 75 | ||
76 | max = bus->secondary; | 76 | max = bus->busn_res.start; |
77 | for (pass = 0; pass < 2; pass++) | 77 | for (pass = 0; pass < 2; pass++) |
78 | list_for_each_entry(dev, &bus->devices, bus_list) | 78 | list_for_each_entry(dev, &bus->devices, bus_list) |
79 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || | 79 | if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index d07f9ac8c41d..667678db1153 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -1048,8 +1048,8 @@ static void yenta_config_init(struct yenta_socket *socket) | |||
1048 | config_writeb(socket, PCI_LATENCY_TIMER, 168); | 1048 | config_writeb(socket, PCI_LATENCY_TIMER, 168); |
1049 | config_writel(socket, PCI_PRIMARY_BUS, | 1049 | config_writel(socket, PCI_PRIMARY_BUS, |
1050 | (176 << 24) | /* sec. latency timer */ | 1050 | (176 << 24) | /* sec. latency timer */ |
1051 | (dev->subordinate->subordinate << 16) | /* subordinate bus */ | 1051 | ((unsigned int)dev->subordinate->busn_res.end << 16) | /* subordinate bus */ |
1052 | (dev->subordinate->secondary << 8) | /* secondary bus */ | 1052 | ((unsigned int)dev->subordinate->busn_res.start << 8) | /* secondary bus */ |
1053 | dev->subordinate->primary); /* primary bus */ | 1053 | dev->subordinate->primary); /* primary bus */ |
1054 | 1054 | ||
1055 | /* | 1055 | /* |
@@ -1086,14 +1086,14 @@ static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge) | |||
1086 | struct pci_bus *bridge_to_fix = cardbus_bridge->parent; | 1086 | struct pci_bus *bridge_to_fix = cardbus_bridge->parent; |
1087 | 1087 | ||
1088 | /* Check bus numbers are already set up correctly: */ | 1088 | /* Check bus numbers are already set up correctly: */ |
1089 | if (bridge_to_fix->subordinate >= cardbus_bridge->subordinate) | 1089 | if (bridge_to_fix->busn_res.end >= cardbus_bridge->busn_res.end) |
1090 | return; /* The subordinate number is ok, nothing to do */ | 1090 | return; /* The subordinate number is ok, nothing to do */ |
1091 | 1091 | ||
1092 | if (!bridge_to_fix->parent) | 1092 | if (!bridge_to_fix->parent) |
1093 | return; /* Root bridges are ok */ | 1093 | return; /* Root bridges are ok */ |
1094 | 1094 | ||
1095 | /* stay within the limits of the bus range of the parent: */ | 1095 | /* stay within the limits of the bus range of the parent: */ |
1096 | upper_limit = bridge_to_fix->parent->subordinate; | 1096 | upper_limit = bridge_to_fix->parent->busn_res.end; |
1097 | 1097 | ||
1098 | /* check the bus ranges of all silbling bridges to prevent overlap */ | 1098 | /* check the bus ranges of all silbling bridges to prevent overlap */ |
1099 | list_for_each(tmp, &bridge_to_fix->parent->children) { | 1099 | list_for_each(tmp, &bridge_to_fix->parent->children) { |
@@ -1104,36 +1104,36 @@ static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge) | |||
1104 | * current upper limit, set the new upper limit to | 1104 | * current upper limit, set the new upper limit to |
1105 | * the bus number below the silbling's range: | 1105 | * the bus number below the silbling's range: |
1106 | */ | 1106 | */ |
1107 | if (silbling->secondary > bridge_to_fix->subordinate | 1107 | if (silbling->busn_res.start > bridge_to_fix->busn_res.end |
1108 | && silbling->secondary <= upper_limit) | 1108 | && silbling->busn_res.start <= upper_limit) |
1109 | upper_limit = silbling->secondary - 1; | 1109 | upper_limit = silbling->busn_res.start - 1; |
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | /* Show that the wanted subordinate number is not possible: */ | 1112 | /* Show that the wanted subordinate number is not possible: */ |
1113 | if (cardbus_bridge->subordinate > upper_limit) | 1113 | if (cardbus_bridge->busn_res.end > upper_limit) |
1114 | dev_printk(KERN_WARNING, &cardbus_bridge->dev, | 1114 | dev_printk(KERN_WARNING, &cardbus_bridge->dev, |
1115 | "Upper limit for fixing this " | 1115 | "Upper limit for fixing this " |
1116 | "bridge's parent bridge: #%02x\n", upper_limit); | 1116 | "bridge's parent bridge: #%02x\n", upper_limit); |
1117 | 1117 | ||
1118 | /* If we have room to increase the bridge's subordinate number, */ | 1118 | /* If we have room to increase the bridge's subordinate number, */ |
1119 | if (bridge_to_fix->subordinate < upper_limit) { | 1119 | if (bridge_to_fix->busn_res.end < upper_limit) { |
1120 | 1120 | ||
1121 | /* use the highest number of the hidden bus, within limits */ | 1121 | /* use the highest number of the hidden bus, within limits */ |
1122 | unsigned char subordinate_to_assign = | 1122 | unsigned char subordinate_to_assign = |
1123 | min(cardbus_bridge->subordinate, upper_limit); | 1123 | min_t(int, cardbus_bridge->busn_res.end, upper_limit); |
1124 | 1124 | ||
1125 | dev_printk(KERN_INFO, &bridge_to_fix->dev, | 1125 | dev_printk(KERN_INFO, &bridge_to_fix->dev, |
1126 | "Raising subordinate bus# of parent " | 1126 | "Raising subordinate bus# of parent " |
1127 | "bus (#%02x) from #%02x to #%02x\n", | 1127 | "bus (#%02x) from #%02x to #%02x\n", |
1128 | bridge_to_fix->number, | 1128 | bridge_to_fix->number, |
1129 | bridge_to_fix->subordinate, subordinate_to_assign); | 1129 | (int)bridge_to_fix->busn_res.end, subordinate_to_assign); |
1130 | 1130 | ||
1131 | /* Save the new subordinate in the bus struct of the bridge */ | 1131 | /* Save the new subordinate in the bus struct of the bridge */ |
1132 | bridge_to_fix->subordinate = subordinate_to_assign; | 1132 | bridge_to_fix->busn_res.end = subordinate_to_assign; |
1133 | 1133 | ||
1134 | /* and update the PCI config space with the new subordinate */ | 1134 | /* and update the PCI config space with the new subordinate */ |
1135 | pci_write_config_byte(bridge_to_fix->self, | 1135 | pci_write_config_byte(bridge_to_fix->self, |
1136 | PCI_SUBORDINATE_BUS, bridge_to_fix->subordinate); | 1136 | PCI_SUBORDINATE_BUS, bridge_to_fix->busn_res.end); |
1137 | } | 1137 | } |
1138 | } | 1138 | } |
1139 | 1139 | ||