tangled
alpha
login
or
join now
tjh.dev
/
kernel
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Pull prarit-bus-sysdata into release branch
Tony Luck
20 years ago
034e5356
729c80c6
+10
-8
1 changed file
expand all
collapse all
unified
split
arch
ia64
sn
kernel
io_init.c
+10
-8
arch/ia64/sn/kernel/io_init.c
···
323
struct pci_controller *controller;
324
struct pcibus_bussoft *prom_bussoft_ptr;
325
struct hubdev_info *hubdev_info;
326
-
void *provider_soft;
327
struct sn_pcibus_provider *provider;
328
329
status = sal_get_pcibus_info((u64) segment, (u64) busnum,
···
339
if (bus == NULL) {
340
bus = pci_scan_bus(busnum, &pci_root_ops, controller);
341
if (bus == NULL)
342
-
return; /* error, or bus already scanned */
343
bus->sysdata = NULL;
344
}
345
···
352
*/
353
354
if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES)
355
-
return; /* unsupported asic type */
356
357
if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB)
358
goto error_return; /* no further fixup necessary */
359
360
provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type];
361
if (provider == NULL)
362
-
return; /* no provider registerd for this asic */
363
364
-
provider_soft = NULL;
365
if (provider->bus_fixup)
366
provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller);
367
368
-
if (provider_soft == NULL)
369
-
return; /* fixup failed or not applicable */
0
0
0
370
371
/*
372
* Generic bus fixup goes here. Don't reference prom_bussoft_ptr
373
* after this point.
374
*/
375
376
-
bus->sysdata = controller;
377
PCI_CONTROLLER(bus)->platform_data = provider_soft;
378
nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base);
379
cnode = nasid_to_cnodeid(nasid);
···
323
struct pci_controller *controller;
324
struct pcibus_bussoft *prom_bussoft_ptr;
325
struct hubdev_info *hubdev_info;
326
+
void *provider_soft = NULL;
327
struct sn_pcibus_provider *provider;
328
329
status = sal_get_pcibus_info((u64) segment, (u64) busnum,
···
339
if (bus == NULL) {
340
bus = pci_scan_bus(busnum, &pci_root_ops, controller);
341
if (bus == NULL)
342
+
goto error_return; /* error, or bus already scanned */
343
bus->sysdata = NULL;
344
}
345
···
352
*/
353
354
if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES)
355
+
goto error_return; /* unsupported asic type */
356
357
if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB)
358
goto error_return; /* no further fixup necessary */
359
360
provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type];
361
if (provider == NULL)
362
+
goto error_return; /* no provider registerd for this asic */
363
364
+
bus->sysdata = controller;
365
if (provider->bus_fixup)
366
provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller);
367
368
+
if (provider_soft == NULL) {
369
+
/* fixup failed or not applicable */
370
+
bus->sysdata = NULL;
371
+
goto error_return;
372
+
}
373
374
/*
375
* Generic bus fixup goes here. Don't reference prom_bussoft_ptr
376
* after this point.
377
*/
378
0
379
PCI_CONTROLLER(bus)->platform_data = provider_soft;
380
nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base);
381
cnode = nasid_to_cnodeid(nasid);