Lines Matching refs:xsoftc
157 static struct xpt_softc xsoftc; variable
159 MTX_SYSINIT(xpt_topo_init, &xsoftc.xpt_topo_lock, "XPT topology lock", MTX_DEF);
162 &xsoftc.boot_delay, 0, "Bus registration wait time");
164 &xsoftc.xpt_generation, 0, "CAM peripheral generation count");
798 if (TAILQ_EMPTY(&xsoftc.ccb_scanq)) in xpt_scanner_thread()
799 msleep(&xsoftc.ccb_scanq, &xsoftc.xpt_topo_lock, PRIBIO, in xpt_scanner_thread()
801 if ((ccb = (union ccb *)TAILQ_FIRST(&xsoftc.ccb_scanq)) != NULL) { in xpt_scanner_thread()
802 TAILQ_REMOVE(&xsoftc.ccb_scanq, &ccb->ccb_h, sim_links.tqe); in xpt_scanner_thread()
859 TAILQ_FOREACH(hdr, &xsoftc.ccb_scanq, sim_links.tqe) { in xpt_rescan()
861 wakeup(&xsoftc.ccb_scanq); in xpt_rescan()
870 TAILQ_INSERT_TAIL(&xsoftc.ccb_scanq, &ccb->ccb_h, sim_links.tqe); in xpt_rescan()
872 wakeup(&xsoftc.ccb_scanq); in xpt_rescan()
886 TAILQ_INIT(&xsoftc.xpt_busses); in xpt_init()
887 TAILQ_INIT(&xsoftc.ccb_scanq); in xpt_init()
888 STAILQ_INIT(&xsoftc.highpowerq); in xpt_init()
889 xsoftc.num_highpower = CAM_MAX_HIGHPOWER; in xpt_init()
891 mtx_init(&xsoftc.xpt_highpower_lock, "XPT highpower lock", NULL, MTX_DEF); in xpt_init()
892 xsoftc.xpt_taskq = taskqueue_create("CAM XPT task", M_WAITOK, in xpt_init()
893 taskqueue_thread_enqueue, /*context*/&xsoftc.xpt_taskq); in xpt_init()
900 xsoftc.boot_delay = CAM_BOOT_DELAY; in xpt_init()
1018 atomic_add_32(&xsoftc.xpt_generation, 1); in xpt_add_periph()
1035 atomic_add_32(&xsoftc.xpt_generation, 1); in xpt_remove_periph()
1633 xsoftc.bus_generation; in xptedtbusfunc()
1767 xsoftc.bus_generation; in xptedtdevicefunc()
1881 xsoftc.bus_generation; in xptedtperiphfunc()
1930 xsoftc.bus_generation) { in xptedtmatch()
2137 bus = TAILQ_FIRST(&xsoftc.xpt_busses); in xptbustraverse()
3262 taskqueue_enqueue(xsoftc.xpt_taskq, in xpt_run_allocq()
3316 mtx_lock(&xsoftc.xpt_highpower_lock); in xpt_run_devq()
3317 if (xsoftc.num_highpower <= 0) { in xpt_run_devq()
3325 STAILQ_INSERT_TAIL(&xsoftc.highpowerq, device, in xpt_run_devq()
3328 mtx_unlock(&xsoftc.xpt_highpower_lock); in xpt_run_devq()
3335 xsoftc.num_highpower--; in xpt_run_devq()
3337 mtx_unlock(&xsoftc.xpt_highpower_lock); in xpt_run_devq()
3910 old_bus = TAILQ_FIRST(&xsoftc.xpt_busses); in xpt_bus_register()
3917 TAILQ_INSERT_TAIL(&xsoftc.xpt_busses, new_bus, links); in xpt_bus_register()
3918 xsoftc.bus_generation++; in xpt_bus_register()
4015 mtx_assert(&xsoftc.xpt_topo_lock, MA_OWNED); in xptnextfreepathid()
4017 bus = TAILQ_FIRST(&xsoftc.xpt_busses); in xptnextfreepathid()
4655 TAILQ_REMOVE(&xsoftc.xpt_busses, bus, links); in xpt_release_bus()
4656 xsoftc.bus_generation++; in xpt_release_bus()
4670 mtx_assert(&xsoftc.xpt_topo_lock, MA_OWNED); in xpt_alloc_target()
4876 taskqueue_enqueue(xsoftc.xpt_taskq, &device->device_destroy_task); in xpt_release_device()
4901 for (bus = TAILQ_FIRST(&xsoftc.xpt_busses); in xpt_find_bus()
5023 callout_init(&xsoftc.boot_callout, 1); in xpt_ch_done()
5024 callout_reset_sbt(&xsoftc.boot_callout, SBT_1MS * xsoftc.boot_delay, in xpt_ch_done()
5035 if (taskqueue_start_threads(&xsoftc.xpt_taskq, 1, PRIBIO, "CAM taskq")) in xpt_config()
5065 if (xsoftc.buses_to_config++ == 0) in xpt_hold_boot_locked()
5066 root_mount_hold_token("CAM", &xsoftc.xpt_rootmount); in xpt_hold_boot_locked()
5083 if (--xsoftc.buses_to_config == 0) { in xpt_release_boot()
5084 if (xsoftc.buses_config_done == 0) { in xpt_release_boot()
5085 xsoftc.buses_config_done = 1; in xpt_release_boot()
5086 xsoftc.buses_to_config++; in xpt_release_boot()
5087 TASK_INIT(&xsoftc.boot_task, 0, xpt_finishconfig_task, in xpt_release_boot()
5089 taskqueue_enqueue(taskqueue_thread, &xsoftc.boot_task); in xpt_release_boot()
5091 root_mount_rel(&xsoftc.xpt_rootmount); in xpt_release_boot()
5240 mtx_lock(&xsoftc.xpt_topo_lock); in xpt_lock_buses()
5246 mtx_unlock(&xsoftc.xpt_topo_lock); in xpt_unlock_buses()
5277 mtx_lock(&xsoftc.xpt_highpower_lock); in xpt_done_process()
5278 hphead = &xsoftc.highpowerq; in xpt_done_process()
5285 xsoftc.num_highpower++; in xpt_done_process()
5292 mtx_unlock(&xsoftc.xpt_highpower_lock); in xpt_done_process()
5299 mtx_unlock(&xsoftc.xpt_highpower_lock); in xpt_done_process()