summaryrefslogtreecommitdiff
path: root/drivers/parisc/dino.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-05-18 01:51:12 (GMT)
committerBjorn Helgaas <bhelgaas@google.com>2012-06-13 21:42:24 (GMT)
commit30aa80da43a5f23728eae1516e3a1aad40e808dd (patch)
treef60ac025d7648e5b4b0960480e08d11d698b22cc /drivers/parisc/dino.c
parentbe8e60d8bed118b19bd7038ac2f6ac6688d072d9 (diff)
downloadlinux-30aa80da43a5f23728eae1516e3a1aad40e808dd.tar.xz
parisc/PCI: register busn_res for root buses
Add the host bridge bus number aperture to the resource list. Like the MMIO and I/O port apertures, this is used when assigning resources to hot-added devices or in the case of conflicts. [bhelgaas: changelog, set flags directly, at LBA bus_num init] CC: Kyle McMartin <kyle@mcmartin.ca> CC: Helge Deller <deller@gmx.de> CC: linux-parisc@vger.kernel.org Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/parisc/dino.c')
-rw-r--r--drivers/parisc/dino.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index 70517b0..ffddc4f 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -898,6 +898,7 @@ static int __init dino_probe(struct parisc_device *dev)
LIST_HEAD(resources);
struct pci_bus *bus;
unsigned long hpa = dev->hpa.start;
+ int max;
name = "Dino";
if (is_card_dino(&dev->id)) {
@@ -983,6 +984,10 @@ static int __init dino_probe(struct parisc_device *dev)
if (dino_dev->hba.gmmio_space.flags)
pci_add_resource(&resources, &dino_dev->hba.gmmio_space);
+ dino_dev->hba.bus_num.start = dino_current_bus;
+ dino_dev->hba.bus_num.end = 255;
+ dino_dev->hba.bus_num.flags = IORESOURCE_BUS;
+ pci_add_resource(&resources, &dino_dev->hba.bus_num);
/*
** It's not used to avoid chicken/egg problems
** with configuration accessor functions.
@@ -998,12 +1003,13 @@ static int __init dino_probe(struct parisc_device *dev)
return 0;
}
- bus->busn_res.end = pci_scan_child_bus(bus);
+ max = pci_scan_child_bus(bus);
+ pci_bus_update_busn_res_end(bus, max);
/* This code *depends* on scanning being single threaded
* if it isn't, this global bus number count will fail
*/
- dino_current_bus = bus->busn_res.end + 1;
+ dino_current_bus = max + 1;
pci_bus_assign_resources(bus);
pci_bus_add_devices(bus);
return 0;