aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn/kernel/io_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/sn/kernel/io_init.c')
-rw-r--r--arch/ia64/sn/kernel/io_init.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index a6649baf629a..414cdf2e3c96 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -203,6 +203,7 @@ static void sn_fixup_ionodes(void)
203 continue; 203 continue;
204 } 204 }
205 205
206 spin_lock_init(&sn_flush_device_list->sfdl_flush_lock);
206 hubdev->hdi_flush_nasid_list.widget_p[widget] = 207 hubdev->hdi_flush_nasid_list.widget_p[widget] =
207 sn_flush_device_list; 208 sn_flush_device_list;
208 } 209 }
@@ -322,7 +323,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
322 struct pci_controller *controller; 323 struct pci_controller *controller;
323 struct pcibus_bussoft *prom_bussoft_ptr; 324 struct pcibus_bussoft *prom_bussoft_ptr;
324 struct hubdev_info *hubdev_info; 325 struct hubdev_info *hubdev_info;
325 void *provider_soft; 326 void *provider_soft = NULL;
326 struct sn_pcibus_provider *provider; 327 struct sn_pcibus_provider *provider;
327 328
328 status = sal_get_pcibus_info((u64) segment, (u64) busnum, 329 status = sal_get_pcibus_info((u64) segment, (u64) busnum,
@@ -338,7 +339,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
338 if (bus == NULL) { 339 if (bus == NULL) {
339 bus = pci_scan_bus(busnum, &pci_root_ops, controller); 340 bus = pci_scan_bus(busnum, &pci_root_ops, controller);
340 if (bus == NULL) 341 if (bus == NULL)
341 return; /* error, or bus already scanned */ 342 goto error_return; /* error, or bus already scanned */
342 bus->sysdata = NULL; 343 bus->sysdata = NULL;
343 } 344 }
344 345
@@ -351,28 +352,30 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
351 */ 352 */
352 353
353 if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES) 354 if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES)
354 return; /* unsupported asic type */ 355 goto error_return; /* unsupported asic type */
355 356
356 if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB) 357 if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB)
357 goto error_return; /* no further fixup necessary */ 358 goto error_return; /* no further fixup necessary */
358 359
359 provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type]; 360 provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type];
360 if (provider == NULL) 361 if (provider == NULL)
361 return; /* no provider registerd for this asic */ 362 goto error_return; /* no provider registerd for this asic */
362 363
363 provider_soft = NULL; 364 bus->sysdata = controller;
364 if (provider->bus_fixup) 365 if (provider->bus_fixup)
365 provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller); 366 provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller);
366 367
367 if (provider_soft == NULL) 368 if (provider_soft == NULL) {
368 return; /* fixup failed or not applicable */ 369 /* fixup failed or not applicable */
370 bus->sysdata = NULL;
371 goto error_return;
372 }
369 373
370 /* 374 /*
371 * Generic bus fixup goes here. Don't reference prom_bussoft_ptr 375 * Generic bus fixup goes here. Don't reference prom_bussoft_ptr
372 * after this point. 376 * after this point.
373 */ 377 */
374 378
375 bus->sysdata = controller;
376 PCI_CONTROLLER(bus)->platform_data = provider_soft; 379 PCI_CONTROLLER(bus)->platform_data = provider_soft;
377 nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base); 380 nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base);
378 cnode = nasid_to_cnodeid(nasid); 381 cnode = nasid_to_cnodeid(nasid);