Lines Matching refs:sim
262 static void xptaction(struct cam_sim *sim, union ccb *work_ccb);
263 static void xptpoll(struct cam_sim *sim);
1063 path->bus->sim->sim_name, in xpt_announce_periph_sbuf()
1064 path->bus->sim->unit_number, in xpt_announce_periph_sbuf()
1065 path->bus->sim->bus_id, in xpt_announce_periph_sbuf()
1137 path->bus->sim->sim_name, in xpt_denounce_periph_sbuf()
1138 path->bus->sim->unit_number, in xpt_denounce_periph_sbuf()
1139 path->bus->sim->bus_id, in xpt_denounce_periph_sbuf()
1333 && (cur_pattern->bus_id != bus->sim->bus_id)) in xptbusmatch()
1337 && (cur_pattern->unit_number != bus->sim->unit_number)) in xptbusmatch()
1341 && (strncmp(cur_pattern->dev_name, bus->sim->sim_name, in xptbusmatch()
1641 cdm->matches[j].result.bus_result.bus_id = bus->sim->bus_id; in xptedtbusfunc()
1643 bus->sim->unit_number; in xptedtbusfunc()
1645 bus->sim->sim_name, in xptedtbusfunc()
2529 struct cam_sim *sim; in xpt_action_default() local
2588 devq = path->bus->sim->devq; in xpt_action_default()
2617 devq = device->sim->devq; in xpt_action_default()
2676 sim = path->bus->sim; in xpt_action_default()
2677 mtx = sim->mtx; in xpt_action_default()
2685 (*(sim->sim_action))(sim, start_ccb); in xpt_action_default()
2725 struct cam_devq *devq = bus->sim->devq; in xpt_action_default()
2910 cur_entry->event_lock = (path->bus->sim->mtx && in xpt_action_default()
2911 mtx_owned(path->bus->sim->mtx)) ? 1 : 0; in xpt_action_default()
2944 mtx_lock(&dev->sim->devq->send_mtx); in xpt_action_default()
2988 mtx_unlock(&dev->sim->devq->send_mtx); in xpt_action_default()
3078 xpt_sim_poll(struct cam_sim *sim) in xpt_sim_poll() argument
3082 KASSERT(cam_sim_pollable(sim), ("%s: non-pollable sim", __func__)); in xpt_sim_poll()
3083 mtx = sim->mtx; in xpt_sim_poll()
3086 (*(sim->sim_poll))(sim); in xpt_sim_poll()
3096 struct cam_sim *sim; in xpt_poll_setup() local
3101 sim = start_ccb->ccb_h.path->bus->sim; in xpt_poll_setup()
3102 devq = sim->devq; in xpt_poll_setup()
3105 KASSERT(cam_sim_pollable(sim), ("%s: non-pollable sim", __func__)); in xpt_poll_setup()
3117 xpt_sim_poll(sim); in xpt_poll_setup()
3130 KASSERT(cam_sim_pollable(start_ccb->ccb_h.path->bus->sim), in xpt_pollwait()
3133 xpt_sim_poll(start_ccb->ccb_h.path->bus->sim); in xpt_pollwait()
3295 struct cam_sim *sim; in xpt_run_devq() local
3373 sim = device->sim; in xpt_run_devq()
3374 mtx = sim->mtx; in xpt_run_devq()
3380 (*(sim->sim_action))(sim, work_ccb); in xpt_run_devq()
3718 device->sim->sim_name, in xpt_device_sbuf()
3719 device->sim->unit_number, in xpt_device_sbuf()
3720 device->sim->bus_id, in xpt_device_sbuf()
3770 sbuf_printf(sb, "%s%d:%d:", path->bus->sim->sim_name, in xpt_path_sbuf()
3771 path->bus->sim->unit_number, in xpt_path_sbuf()
3772 path->bus->sim->bus_id); in xpt_path_sbuf()
3817 return (path->bus->sim); in xpt_path_sim()
3875 xpt_bus_register(struct cam_sim *sim, device_t parent, uint32_t bus) in xpt_bus_register() argument
3883 sim->bus_id = bus; in xpt_bus_register()
3893 cam_sim_hold(sim); in xpt_bus_register()
3894 new_bus->sim = sim; in xpt_bus_register()
3902 sim->path_id = new_bus->path_id = in xpt_bus_register()
3903 xptpathid(sim->sim_name, sim->unit_number, sim->bus_id); in xpt_bus_register()
3922 status = xpt_create_path(&path, /*periph*/NULL, sim->path_id, in xpt_bus_register()
3957 if (sim->path_id != CAM_XPT_PATH_ID) { in xpt_bus_register()
4226 xpt_release_simq(path->bus->sim, TRUE); in xpt_async_process()
4252 path->device->sim->mtx : NULL; in xpt_async_bcast()
4315 xpt_freeze_simq(path->bus->sim, 1); in xpt_async()
4341 devq = dev->sim->devq; in xpt_freeze_devq_device()
4360 devq = dev->sim->devq; in xpt_freeze_devq()
4369 xpt_freeze_simq(struct cam_sim *sim, u_int count) in xpt_freeze_simq() argument
4374 devq = sim->devq; in xpt_freeze_simq()
4389 devq = dev->sim->devq; in xpt_release_devq_timeout()
4404 devq = dev->sim->devq; in xpt_release_devq()
4407 xpt_run_devq(dev->sim->devq); in xpt_release_devq()
4415 mtx_assert(&dev->sim->devq->send_mtx, MA_OWNED); in xpt_release_devq_device()
4446 xpt_schedule_devq(dev->sim->devq, dev); in xpt_release_devq_device()
4453 xpt_release_simq(struct cam_sim *sim, int run_queue) in xpt_release_simq() argument
4457 devq = sim->devq; in xpt_release_simq()
4471 xpt_run_devq(sim->devq); in xpt_release_simq()
4654 cam_sim_release(bus->sim); in xpt_release_bus()
4764 devq = bus->sim->devq; in xpt_alloc_device()
4779 device->sim = bus->sim; in xpt_alloc_device()
4781 bus->sim->max_dev_openings) != 0) { in xpt_alloc_device()
4839 devq = bus->sim->devq; in xpt_release_device()
4880 mtx_lock(&dev->sim->devq->send_mtx); in xpt_dev_ccbq_resize()
4882 mtx_unlock(&dev->sim->devq->send_mtx); in xpt_dev_ccbq_resize()
4946 struct cam_sim *sim; in xpt_start_tags() local
4950 sim = path->bus->sim; in xpt_start_tags()
4958 sim->max_tagged_dev_openings); in xpt_start_tags()
4977 struct cam_sim *sim; in xpt_stop_tags() local
4980 sim = path->bus->sim; in xpt_stop_tags()
4985 xpt_dev_ccbq_resize(path, sim->max_dev_openings); in xpt_stop_tags()
5183 xptaction(struct cam_sim *sim, union ccb *work_ccb) in xptaction() argument
5204 strlcpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); in xptaction()
5205 cpi->unit_number = sim->unit_number; in xptaction()
5206 cpi->bus_id = sim->bus_id; in xptaction()
5227 xptpoll(struct cam_sim *sim) in xptpoll() argument
5253 struct cam_sim *sim = NULL; in xpt_done_process() local
5288 mtx_lock(&device->sim->devq->send_mtx); in xpt_done_process()
5291 mtx_unlock(&device->sim->devq->send_mtx); in xpt_done_process()
5302 sim = ccb_h->path->bus->sim; in xpt_done_process()
5305 KASSERT(sim, ("sim missing for CAM_RELEASE_SIMQ request")); in xpt_done_process()
5306 xpt_release_simq(sim, /*run_queue*/FALSE); in xpt_done_process()
5319 if (sim) in xpt_done_process()
5320 devq = sim->devq; in xpt_done_process()