dev_softc
ahc->dev_softc = dev;
ahc->dev_softc = dev;
if (resource_int_value(device_get_name(ahc->dev_softc),
device_get_unit(ahc->dev_softc),
device_printf(ahc->dev_softc, "Defaulting to MEMIO ");
regs = bus_alloc_resource_any(ahc->dev_softc, regs_type,
device_printf(ahc->dev_softc,
aic_get_pci_bus(ahc->dev_softc),
aic_get_pci_slot(ahc->dev_softc),
aic_get_pci_function(ahc->dev_softc));
bus_release_resource(ahc->dev_softc, regs_type,
regs = bus_alloc_resource_any(ahc->dev_softc, regs_type,
device_printf(ahc->dev_softc,
aic_get_pci_bus(ahc->dev_softc),
aic_get_pci_slot(ahc->dev_softc),
aic_get_pci_function(ahc->dev_softc));
bus_release_resource(ahc->dev_softc, regs_type,
device_printf(ahc->dev_softc,
ahd->dev_softc = dev;
if (resource_int_value(device_get_name(ahd->dev_softc),
device_get_unit(ahd->dev_softc),
device_printf(ahd->dev_softc,
regs = bus_alloc_resource_any(ahd->dev_softc, regs_type,
device_printf(ahd->dev_softc,
aic_get_pci_bus(ahd->dev_softc),
aic_get_pci_slot(ahd->dev_softc),
aic_get_pci_function(ahd->dev_softc));
bus_release_resource(ahd->dev_softc, regs_type,
regs = bus_alloc_resource_any(ahd->dev_softc, regs_type,
device_printf(ahd->dev_softc,
regs2 = bus_alloc_resource_any(ahd->dev_softc, regs_type,
device_printf(ahd->dev_softc,
bus_alloc_resource_any(ahd->dev_softc, SYS_RES_IRQ, &zero,
list_pci = list_ahd->dev_softc;
pci = ahd->dev_softc;
cmd = aic_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
aic_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
aic_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
aic_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
resource_int_value(device_get_name(ahd->dev_softc),
device_get_unit(ahd->dev_softc),
aic_dev_softc_t dev_softc;
bus_release_resource(ahd->dev_softc,
bus_release_resource(ahd->dev_softc,
bus_release_resource(ahd->dev_softc,
device_get_nameunit(ahd->dev_softc),
error = bus_setup_intr(ahd->dev_softc, ahd->platform_data->irq,
device_printf(ahd->dev_softc, "bus_setup_intr() failed: %d\n",
device_get_unit(ahd->dev_softc),
if (xpt_bus_register(sim, ahd->dev_softc, /*bus_id*/0) != CAM_SUCCESS) {
device = aic_pci_read_config(ahd->dev_softc,
subvendor = aic_pci_read_config(ahd->dev_softc,
pci_find_cap(ahd->dev_softc, PCIY_PCIX, &ahd->pcix_ptr);
devconfig = aic_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4);
devconfig = aic_pci_read_config(ahd->dev_softc,
aic_pci_write_config(ahd->dev_softc, DEVCONFIG,
command = aic_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
aic_pci_write_config(ahd->dev_softc, PCIR_COMMAND, command, /*bytes*/2);
aic_pci_read_config(ahd->dev_softc, CSIZE_LATTIME,
cmd = aic_pci_read_config(ahd->dev_softc, PCIR_COMMAND, /*bytes*/2);
aic_pci_write_config(ahd->dev_softc, PCIR_COMMAND,
pci_status1 = aic_pci_read_config(ahd->dev_softc,
aic_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
pci_status1 = aic_pci_read_config(ahd->dev_softc,
aic_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
aic_pci_write_config(ahd->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
devconfig = aic_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4);
aic_pci_write_config(ahd->dev_softc, DEVCONFIG, devconfig, /*bytes*/4);
pci_status1 = aic_pci_read_config(ahd->dev_softc,
aic_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
pcix_status = aic_pci_read_config(ahd->dev_softc,
aic_pci_write_config(ahd->dev_softc, ahd->pcix_ptr + PCIXR_STATUS,
pci = ahd->dev_softc;
list_pci = list_ahc->dev_softc;
pci = ahc->dev_softc;
resource_int_value(device_get_name(ahc->dev_softc),
device_get_unit(ahc->dev_softc),
aic_dev_softc_t dev_softc;
error = bus_setup_intr(ahc->dev_softc, ahc->platform_data->irq,
device_printf(ahc->dev_softc, "bus_setup_intr() failed: %d\n",
regs = bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IOPORT, &rid,
device_printf(ahc->dev_softc, "Unable to map I/O space?!\n");
bus_release_resource(ahc->dev_softc,
bus_release_resource(ahc->dev_softc,
device_get_unit(ahc->dev_softc),
if (xpt_bus_register(sim, ahc->dev_softc, bus_id) != CAM_SUCCESS) {
ahc, device_get_unit(ahc->dev_softc),
if (xpt_bus_register(sim2, ahc->dev_softc, bus_id2) !=
bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IRQ, &zero,
device_printf(ahc->dev_softc,
aic_pci_read_config(ahc->dev_softc, DEVCONFIG, /*bytes*/4);
aic_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/1);
aic_pci_read_config(ahc->dev_softc, CSIZE_LATTIME, /*bytes*/1);
devconfig = aic_pci_read_config(ahc->dev_softc,
ahc_outb(ahc, SCBBADDR, aic_get_pci_function(ahc->dev_softc));
devconfig = aic_pci_read_config(ahc->dev_softc, DEVCONFIG, /*bytes*/4);
aic_pci_write_config(ahc->dev_softc, DEVCONFIG, devconfig, /*bytes*/4);
cmd = aic_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/2);
aic_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
status1 = aic_pci_read_config(ahc->dev_softc,
aic_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
status1 = aic_pci_read_config(ahc->dev_softc,
status1 = aic_pci_read_config(ahc->dev_softc,
aic_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
aic_pci_write_config(ahc->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
devconfig = aic_pci_read_config(ahc->dev_softc,
aic_pci_write_config(ahc->dev_softc, DEVCONFIG,
status1 = aic_pci_read_config(ahc->dev_softc,
aic_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
aic_pci_write_config(ahc->dev_softc, DEVCONFIG,
aic_pci_write_config(ahc->dev_softc, PCIR_COMMAND,
aic_pci_write_config(ahc->dev_softc, CSIZE_LATTIME,
pci = ahc->dev_softc;
pci = ahc->dev_softc;
pci = ahc->dev_softc;
pci = ahc->dev_softc;
pci = ahc->dev_softc;
pci = ahc->dev_softc;
pci = ahc->dev_softc;
pci = ahc->dev_softc;
pci = ahc->dev_softc;
pci = ahc->dev_softc;
devconfig = aic_pci_read_config(ahc->dev_softc, DEVCONFIG, /*bytes*/4);
aic_pci_write_config(ahc->dev_softc, DEVCONFIG, devconfig, /*bytes*/4);
command = aic_pci_read_config(ahc->dev_softc, PCIR_COMMAND, /*bytes*/2);
aic_pci_write_config(ahc->dev_softc, PCIR_COMMAND, command, /*bytes*/2);
aic_pci_read_config(ahc->dev_softc, CSIZE_LATTIME,
aic_pci_write_config(ahc->dev_softc, CSIZE_LATTIME,
devconfig = aic_pci_read_config(ahc->dev_softc,
return (pci_set_powerstate(aic->dev_softc, new_state));
void *dev_softc, struct pci_devinst *pi,
assert((void *)vs == dev_softc);
void *dev_softc, struct pci_devinst *pi,