diff options
Diffstat (limited to 'drivers/parisc/lba_pci.c')
-rw-r--r-- | drivers/parisc/lba_pci.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index ad4a1a12a1ae..eae0812f01a5 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -1406,13 +1406,20 @@ lba_hw_init(struct lba_device *d) | |||
1406 | return 0; | 1406 | return 0; |
1407 | } | 1407 | } |
1408 | 1408 | ||
1409 | 1409 | /* | |
1410 | * Unfortunately, when firmware numbers busses, it doesn't take into account | ||
1411 | * Cardbus bridges. So we have to renumber the busses to suit ourselves. | ||
1412 | * Elroy/Mercury don't actually know what bus number they're attached to; | ||
1413 | * we use bus 0 to indicate the directly attached bus and any other bus | ||
1414 | * number will be taken care of by the PCI-PCI bridge. | ||
1415 | */ | ||
1416 | static unsigned int lba_next_bus = 0; | ||
1410 | 1417 | ||
1411 | /* | 1418 | /* |
1412 | ** Determine if lba should claim this chip (return 0) or not (return 1). | 1419 | * Determine if lba should claim this chip (return 0) or not (return 1). |
1413 | ** If so, initialize the chip and tell other partners in crime they | 1420 | * If so, initialize the chip and tell other partners in crime they |
1414 | ** have work to do. | 1421 | * have work to do. |
1415 | */ | 1422 | */ |
1416 | static int __init | 1423 | static int __init |
1417 | lba_driver_probe(struct parisc_device *dev) | 1424 | lba_driver_probe(struct parisc_device *dev) |
1418 | { | 1425 | { |
@@ -1478,9 +1485,7 @@ lba_driver_probe(struct parisc_device *dev) | |||
1478 | return -ENODEV; | 1485 | return -ENODEV; |
1479 | } | 1486 | } |
1480 | 1487 | ||
1481 | /* | 1488 | /* Tell I/O SAPIC driver we have a IRQ handler/region. */ |
1482 | ** Tell I/O SAPIC driver we have a IRQ handler/region. | ||
1483 | */ | ||
1484 | tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE); | 1489 | tmp_obj = iosapic_register(dev->hpa.start + LBA_IOSAPIC_BASE); |
1485 | 1490 | ||
1486 | /* NOTE: PCI devices (e.g. 103c:1005 graphics card) which don't | 1491 | /* NOTE: PCI devices (e.g. 103c:1005 graphics card) which don't |
@@ -1529,16 +1534,17 @@ lba_driver_probe(struct parisc_device *dev) | |||
1529 | lba_legacy_resources(dev, lba_dev); | 1534 | lba_legacy_resources(dev, lba_dev); |
1530 | } | 1535 | } |
1531 | 1536 | ||
1532 | /* | 1537 | if (lba_dev->hba.bus_num.start < lba_next_bus) |
1533 | ** Tell PCI support another PCI bus was found. | 1538 | lba_dev->hba.bus_num.start = lba_next_bus; |
1534 | ** Walks PCI bus for us too. | 1539 | |
1535 | */ | ||
1536 | dev->dev.platform_data = lba_dev; | 1540 | dev->dev.platform_data = lba_dev; |
1537 | lba_bus = lba_dev->hba.hba_bus = | 1541 | lba_bus = lba_dev->hba.hba_bus = |
1538 | pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start, | 1542 | pci_scan_bus_parented(&dev->dev, lba_dev->hba.bus_num.start, |
1539 | cfg_ops, NULL); | 1543 | cfg_ops, NULL); |
1540 | if (lba_bus) | 1544 | if (lba_bus) { |
1545 | lba_next_bus = lba_bus->subordinate + 1; | ||
1541 | pci_bus_add_devices(lba_bus); | 1546 | pci_bus_add_devices(lba_bus); |
1547 | } | ||
1542 | 1548 | ||
1543 | /* This is in lieu of calling pci_assign_unassigned_resources() */ | 1549 | /* This is in lieu of calling pci_assign_unassigned_resources() */ |
1544 | if (is_pdc_pat()) { | 1550 | if (is_pdc_pat()) { |