From fed99b1e86f5ff4f1b41e37264bb869da67d3174 Mon Sep 17 00:00:00 2001 From: Grant Grundler Date: Mon, 20 Apr 2009 04:28:22 +0000 Subject: 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 Signed-off-by: Grant Grundler Signed-off-by: Kyle McMartin --- drivers/parisc/lba_pci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/parisc/lba_pci.c') diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 59fbbf12836..f2661e1255a 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c @@ -1509,10 +1509,6 @@ lba_driver_probe(struct parisc_device *dev) lba_bus = lba_dev->hba.hba_bus = pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start, cfg_ops, NULL); - if (lba_bus) { - lba_next_bus = lba_bus->subordinate + 1; - pci_bus_add_devices(lba_bus); - } /* This is in lieu of calling pci_assign_unassigned_resources() */ if (is_pdc_pat()) { @@ -1533,7 +1529,6 @@ lba_driver_probe(struct parisc_device *dev) } pci_enable_bridges(lba_bus); - /* ** Once PCI register ops has walked the bus, access to config ** space is restricted. Avoids master aborts on config cycles. @@ -1543,6 +1538,11 @@ lba_driver_probe(struct parisc_device *dev) lba_dev->flags |= LBA_FLAG_SKIP_PROBE; } + if (lba_bus) { + lba_next_bus = lba_bus->subordinate + 1; + pci_bus_add_devices(lba_bus); + } + /* Whew! Finally done! Tell services we got this one covered. */ return 0; } -- cgit v1.2.3-70-g09d2