diff options
author | Grant Grundler <grundler@parisc-linux.org> | 2009-04-20 04:28:22 +0000 |
---|---|---|
committer | Kyle McMartin <kyle@mcmartin.ca> | 2009-07-03 03:34:07 +0000 |
commit | fed99b1e86f5ff4f1b41e37264bb869da67d3174 (patch) | |
tree | eea44830caf663e97041dbb90a2f74cb7e28a1b3 /drivers/parisc/dino.c | |
parent | 7d17e2763129ea307702fcdc91f6e9d114b65c2d (diff) |
parisc: advertise PCI devs after "assign_resources"
Alex Chiang asked me why PARISC was calling pci_bus_add_devices()
and pci_bus_assign_resources() in the opposite order from everyone else.
No reason and I couldn't see any data dependency.
Patch below applies cleanly to 2.6.30-rc2.
Later, I suspected the code worked only because no drivers would be
loaded/ready until much later in the system initialization sequence.
Tested "LBA" code on J6000 (32-bit) and A500 (64-bit SMP) with 2.6.30-rc2.
Not tested with any Dino controllers.
Not tested with PCI-PCI Bridge (TBD).
Reported-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'drivers/parisc/dino.c')
-rw-r--r-- | drivers/parisc/dino.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index 52ae0b1d470c..d327c2dbf3e0 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c @@ -1019,22 +1019,22 @@ static int __init dino_probe(struct parisc_device *dev) ** It's not used to avoid chicken/egg problems ** with configuration accessor functions. */ - bus = pci_scan_bus_parented(&dev->dev, dino_current_bus, - &dino_cfg_ops, NULL); + dino_dev->hba.hba_bus = bus = pci_scan_bus_parented(&dev->dev, + dino_current_bus, &dino_cfg_ops, NULL); + if(bus) { - pci_bus_add_devices(bus); /* This code *depends* on scanning being single threaded * if it isn't, this global bus number count will fail */ dino_current_bus = bus->subordinate + 1; pci_bus_assign_resources(bus); + pci_bus_add_devices(bus); } else { - printk(KERN_ERR "ERROR: failed to scan PCI bus on %s (probably duplicate bus number %d)\n", + printk(KERN_ERR "ERROR: failed to scan PCI bus on %s (duplicate bus number %d?)\n", dev_name(&dev->dev), dino_current_bus); /* increment the bus number in case of duplicates */ dino_current_bus++; } - dino_dev->hba.hba_bus = bus; return 0; } |