diff options
author | Tony Luck <tony.luck@intel.com> | 2005-08-23 10:27:28 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-08-23 10:27:28 -0400 |
commit | 034e5356a4c0401d1227393de4c756e9c414be35 (patch) | |
tree | 11b23fad114eab4880d104c8704c3c5c7991b348 /arch/ia64 | |
parent | 729c80c6ffd7633210a09d4b55fdfab3c8d1866b (diff) | |
parent | c1ffb910f7a4e1e79d462bb359067d97ad1a8a25 (diff) |
Pull prarit-bus-sysdata into release branch
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/sn/kernel/io_init.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 37e10e010a2f..414cdf2e3c96 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -323,7 +323,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) | |||
323 | struct pci_controller *controller; | 323 | struct pci_controller *controller; |
324 | struct pcibus_bussoft *prom_bussoft_ptr; | 324 | struct pcibus_bussoft *prom_bussoft_ptr; |
325 | struct hubdev_info *hubdev_info; | 325 | struct hubdev_info *hubdev_info; |
326 | void *provider_soft; | 326 | void *provider_soft = NULL; |
327 | struct sn_pcibus_provider *provider; | 327 | struct sn_pcibus_provider *provider; |
328 | 328 | ||
329 | status = sal_get_pcibus_info((u64) segment, (u64) busnum, | 329 | status = sal_get_pcibus_info((u64) segment, (u64) busnum, |
@@ -339,7 +339,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) | |||
339 | if (bus == NULL) { | 339 | if (bus == NULL) { |
340 | bus = pci_scan_bus(busnum, &pci_root_ops, controller); | 340 | bus = pci_scan_bus(busnum, &pci_root_ops, controller); |
341 | if (bus == NULL) | 341 | if (bus == NULL) |
342 | return; /* error, or bus already scanned */ | 342 | goto error_return; /* error, or bus already scanned */ |
343 | bus->sysdata = NULL; | 343 | bus->sysdata = NULL; |
344 | } | 344 | } |
345 | 345 | ||
@@ -352,28 +352,30 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus) | |||
352 | */ | 352 | */ |
353 | 353 | ||
354 | if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES) | 354 | if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES) |
355 | return; /* unsupported asic type */ | 355 | goto error_return; /* unsupported asic type */ |
356 | 356 | ||
357 | if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB) | 357 | if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB) |
358 | goto error_return; /* no further fixup necessary */ | 358 | goto error_return; /* no further fixup necessary */ |
359 | 359 | ||
360 | provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type]; | 360 | provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type]; |
361 | if (provider == NULL) | 361 | if (provider == NULL) |
362 | return; /* no provider registerd for this asic */ | 362 | goto error_return; /* no provider registerd for this asic */ |
363 | 363 | ||
364 | provider_soft = NULL; | 364 | bus->sysdata = controller; |
365 | if (provider->bus_fixup) | 365 | if (provider->bus_fixup) |
366 | provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller); | 366 | provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller); |
367 | 367 | ||
368 | if (provider_soft == NULL) | 368 | if (provider_soft == NULL) { |
369 | return; /* fixup failed or not applicable */ | 369 | /* fixup failed or not applicable */ |
370 | bus->sysdata = NULL; | ||
371 | goto error_return; | ||
372 | } | ||
370 | 373 | ||
371 | /* | 374 | /* |
372 | * Generic bus fixup goes here. Don't reference prom_bussoft_ptr | 375 | * Generic bus fixup goes here. Don't reference prom_bussoft_ptr |
373 | * after this point. | 376 | * after this point. |
374 | */ | 377 | */ |
375 | 378 | ||
376 | bus->sysdata = controller; | ||
377 | PCI_CONTROLLER(bus)->platform_data = provider_soft; | 379 | PCI_CONTROLLER(bus)->platform_data = provider_soft; |
378 | nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base); | 380 | nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base); |
379 | cnode = nasid_to_cnodeid(nasid); | 381 | cnode = nasid_to_cnodeid(nasid); |