Home
last modified time | relevance | path

Searched refs:sim (Results 1 – 25 of 80) sorted by relevance

1234

/dflybsd-src/sys/bus/cam/
H A Dcam_sim.c165 struct cam_sim *sim; in cam_sim_alloc() local
188 sim = kmalloc(sizeof(struct cam_sim), M_CAMSIM, M_INTWAIT | M_ZERO); in cam_sim_alloc()
189 sim->sim_action = sim_action; in cam_sim_alloc()
190 sim->sim_poll = sim_poll; in cam_sim_alloc()
191 sim->sim_name = sim_name; in cam_sim_alloc()
192 sim->softc = softc; in cam_sim_alloc()
193 sim->path_id = CAM_PATH_ANY; in cam_sim_alloc()
194 sim->unit_number = unit; in cam_sim_alloc()
195 sim->bus_id = 0; /* set in xpt_bus_register */ in cam_sim_alloc()
196 sim->max_tagged_dev_openings = max_tagged_dev_transactions; in cam_sim_alloc()
[all …]
H A Dcam_sim.h53 typedef void (*sim_action_func)(struct cam_sim *sim, union ccb *ccb);
54 typedef void (*sim_poll_func)(struct cam_sim *sim);
79 void cam_sim_free(struct cam_sim *sim);
80 void cam_sim_release(struct cam_sim *sim, int flags);
81 void cam_sim_set_max_tags(struct cam_sim *sim, int max_tags);
86 void cam_sim_set_path(struct cam_sim *sim, u_int32_t path_id);
91 static __inline u_int32_t cam_sim_path(struct cam_sim *sim);
92 static __inline const char *cam_sim_name(struct cam_sim *sim);
93 static __inline void * cam_sim_softc(struct cam_sim *sim);
94 static __inline u_int32_t cam_sim_unit(struct cam_sim *sim);
[all …]
H A Dcam_xpt.c123 struct cam_sim *sim; member
193 struct cam_sim *sim; member
693 static void dead_sim_action(struct cam_sim *sim, union ccb *ccb);
694 static void dead_sim_poll(struct cam_sim *sim);
798 static void xptaction(struct cam_sim *sim, union ccb *work_ccb);
799 static void xptpoll(struct cam_sim *sim);
877 if (bus->sim->devq && dev->ccbq.devq_openings > 0) { in xpt_schedule_dev_allocq()
889 retval = xpt_schedule_dev(&bus->sim->devq->alloc_queue, in xpt_schedule_dev_allocq()
904 if (bus->sim->devq && dev->ccbq.dev_openings > 0) { in xpt_schedule_dev_sendq()
911 xpt_schedule_dev(&bus->sim->devq->send_queue, in xpt_schedule_dev_sendq()
[all …]
H A Dcam_periph.c61 struct cam_sim *sim, path_id_t pathid,
159 struct cam_sim *sim; in cam_periph_alloc() local
203 sim = xpt_path_sim(path); in cam_periph_alloc()
204 CAM_SIM_LOCK(sim); in cam_periph_alloc()
216 periph->sim = sim; in cam_periph_alloc()
231 periph->unit_number = camperiphunit(*p_drv, sim, path_id, in cam_periph_alloc()
262 CAM_SIM_UNLOCK(sim); in cam_periph_alloc()
274 CAM_SIM_UNLOCK(sim); /* sim was retrieved from path */ in cam_periph_alloc()
343 struct cam_sim *sim; in cam_periph_release() local
350 sim = periph->sim; in cam_periph_release()
[all …]
H A Dcam_xpt_sim.h40 int32_t xpt_bus_register(struct cam_sim *sim, u_int32_t bus);
42 u_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count);
43 void xpt_release_simq(struct cam_sim *sim, int run_queue);
/dflybsd-src/sys/dev/disk/iscsi/initiator/
H A Disc_cam.c166 _inq(struct cam_sim *sim, union ccb *ccb, int maxluns) in _inq() argument
180 cpi->bus_id = cam_sim_bus(sim); in _inq()
184 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in _inq()
185 cpi->unit_number = cam_sim_unit(sim); in _inq()
190 _scsi_encap(struct cam_sim *sim, union ccb *ccb) in _scsi_encap() argument
193 struct isc_softc *isp = (struct isc_softc *)cam_sim_softc(sim); in _scsi_encap()
196 ret = scsi_encap(sim, ccb); in _scsi_encap()
202 ic_action(struct cam_sim *sim, union ccb *ccb) in ic_action() argument
205 struct isc_softc *isp = (struct isc_softc *)cam_sim_softc(sim); in ic_action()
254 _inq(sim, ccb, (sp? sp->opt.maxluns: ISCSI_MAX_LUNS) - 1); in ic_action()
[all …]
/dflybsd-src/sys/dev/raid/aac/
H A Daac_cam.c69 struct cam_sim *sim; member
111 struct aac_sim *sim; in aac_cam_rescan() local
117 TAILQ_FOREACH(sim, &sc->aac_sim_tqh, sim_link) { in aac_cam_rescan()
118 camsc = sim->aac_cam; in aac_cam_rescan()
131 cam_sim_path(camsc->sim), in aac_cam_rescan()
169 xpt_release_simq(camsc->sim, 1); in aac_cam_event()
205 xpt_bus_deregister(cam_sim_path(camsc->sim)); in aac_cam_detach()
206 cam_sim_free(camsc->sim); in aac_cam_detach()
222 struct cam_sim *sim; in aac_cam_attach() local
238 sim = cam_sim_alloc(aac_cam_action, aac_cam_poll, "aacp", camsc, in aac_cam_attach()
[all …]
/dflybsd-src/sys/dev/raid/twa/
H A Dtw_osl_cam.c57 static TW_VOID twa_action(struct cam_sim *sim, union ccb *ccb);
58 static TW_VOID twa_poll(struct cam_sim *sim);
103 sc->sim = cam_sim_alloc(twa_action, twa_poll, "twa", sc, in tw_osli_cam_attach()
107 if (sc->sim == NULL) { in tw_osli_cam_attach()
122 if (xpt_bus_register(sc->sim, 0) != CAM_SUCCESS) { in tw_osli_cam_attach()
123 cam_sim_free(sc->sim); in tw_osli_cam_attach()
124 sc->sim = NULL; /* so cam_detach will not try to free it */ in tw_osli_cam_attach()
137 cam_sim_path(sc->sim), in tw_osli_cam_attach()
140 xpt_bus_deregister(cam_sim_path (sc->sim)); in tw_osli_cam_attach()
141 cam_sim_free(sc->sim); in tw_osli_cam_attach()
[all …]
/dflybsd-src/sys/dev/disk/vpo/
H A Dvpo.c76 struct cam_sim *sim; member
87 static void vpo_action(struct cam_sim *sim, union ccb *ccb);
88 static void vpo_poll(struct cam_sim *sim);
156 vpo->sim = cam_sim_alloc(vpo_action, vpo_poll, "vpo", vpo, in vpo_attach()
160 if (vpo->sim == NULL) { in vpo_attach()
164 if (xpt_bus_register(vpo->sim, /*bus*/0) != CAM_SUCCESS) { in vpo_attach()
165 cam_sim_free(vpo->sim); in vpo_attach()
189 if (xpt_create_path(&path, xpt_periph, cam_sim_path(vpo->sim), 0, 0) in vpo_cam_rescan()
329 vpo_action(struct cam_sim *sim, union ccb *ccb) in vpo_action() argument
332 struct vpo_data *vpo = (struct vpo_data *)sim->softc; in vpo_action()
[all …]
/dflybsd-src/sys/dev/raid/mfi/
H A Dmfi_cam.c65 struct cam_sim *sim; member
121 sc->sim = cam_sim_alloc(mfip_cam_action, mfip_cam_poll, "mfi", sc, in mfip_attach()
125 if (sc->sim == NULL) { in mfip_attach()
131 if (xpt_bus_register(sc->sim, 0) != 0) { in mfip_attach()
133 cam_sim_free(sc->sim); in mfip_attach()
151 if (sc->sim != NULL) { in mfip_detach()
153 xpt_bus_deregister(cam_sim_path(sc->sim)); in mfip_detach()
154 cam_sim_free(sc->sim); in mfip_detach()
162 mfip_cam_action(struct cam_sim *sim, union ccb *ccb) in mfip_cam_action() argument
164 struct mfip_softc *sc = cam_sim_softc(sim); in mfip_cam_action()
[all …]
/dflybsd-src/sys/dev/disk/nata/
H A Datapi-cam.c66 struct cam_sim *sim; member
191 struct cam_sim *sim = NULL; in atapi_cam_attach() local
214 if ((sim = cam_sim_alloc(atapi_action, atapi_poll, "ata", in atapi_cam_attach()
219 scp->sim = sim; in atapi_cam_attach()
221 if (xpt_bus_register(sim, 0) != CAM_SUCCESS) { in atapi_cam_attach()
228 cam_sim_path(sim), CAM_TARGET_WILDCARD, in atapi_cam_attach()
254 xpt_freeze_simq(scp->sim, 1 /*count*/); in atapi_cam_detach()
320 cam_rescan(scp->sim); in reinit_bus()
337 csa->callback_arg = scp->sim; in setup_async_cb()
345 atapi_action(struct cam_sim *sim, union ccb *ccb) in atapi_action() argument
[all …]
/dflybsd-src/sys/dev/raid/mrsas/
H A Dmrsas_cam.c57 int mrsas_ldio_inq(struct cam_sim *sim, union ccb *ccb);
59 int mrsas_bus_scan_sim(struct mrsas_softc *sc, struct cam_sim *sim);
64 union ccb *ccb, struct cam_sim *sim);
80 static void mrsas_freeze_simq(struct mrsas_mpt_cmd *cmd, struct cam_sim *sim);
81 static void mrsas_poll(struct cam_sim *sim);
82 static void mrsas_action(struct cam_sim *sim, union ccb *ccb);
86 static int32_t mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim,
239 static void mrsas_action(struct cam_sim *sim, union ccb *ccb) in mrsas_action() argument
241 struct mrsas_softc *sc = (struct mrsas_softc *)cam_sim_softc(sim); in mrsas_action()
253 if (cam_sim_bus(sim) == 1 && in mrsas_action()
[all …]
/dflybsd-src/contrib/gdb-7/gdb/
H A Dconfigure.tgt110 gdb_sim=../sim/arm/libsim.a
116 gdb_sim=../sim/avr/libsim.a
122 gdb_sim=../sim/bfin/libsim.a
128 gdb_sim=../sim/bfin/libsim.a
139 gdb_sim=../sim/frv/libsim.a
144 gdb_sim=../sim/moxie/libsim.a
150 gdb_sim=../sim/h8300/libsim.a
277 gdb_sim=../sim/iq2000/libsim.a
282 gdb_sim=../sim/lm32/libsim.a
289 # but we do have DJ Delorie's mini-sim.
[all …]
/dflybsd-src/sys/dev/raid/tws/
H A Dtws_cam.c54 static void tws_action(struct cam_sim *sim, union ccb *ccb);
55 static void tws_poll(struct cam_sim *sim);
167 sc->sim = cam_sim_alloc(tws_action, tws_poll, "tws", sc, in tws_cam_attach()
173 if (sc->sim == NULL) { in tws_cam_attach()
178 if (xpt_bus_register(sc->sim, 0) != CAM_SUCCESS) { in tws_cam_attach()
179 cam_sim_free(sc->sim); in tws_cam_attach()
180 sc->sim = NULL; /* so cam_detach will not try to free it */ in tws_cam_attach()
185 if (xpt_create_path(&sc->path, NULL, cam_sim_path(sc->sim), in tws_cam_attach()
188 xpt_bus_deregister(cam_sim_path(sc->sim)); in tws_cam_attach()
189 cam_sim_free(sc->sim); in tws_cam_attach()
[all …]
/dflybsd-src/sys/dev/raid/amr/
H A Damr_cam.c84 static void amr_cam_action(struct cam_sim *sim, union ccb *ccb);
85 static void amr_cam_poll(struct cam_sim *sim);
238 amr_cam_action(struct cam_sim *sim, union ccb *ccb) in amr_cam_action() argument
240 struct amr_softc *sc = cam_sim_softc(sim); in amr_cam_action()
293 csio->ccb_h.sim_priv.entries[0].field= cam_sim_bus(sim); in amr_cam_action()
326 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in amr_cam_action()
327 cpi->unit_number = cam_sim_unit(sim); in amr_cam_action()
328 cpi->bus_id = cam_sim_bus(sim); in amr_cam_action()
533 amr_cam_poll(struct cam_sim *sim) in amr_cam_poll() argument
536 amr_done(cam_sim_softc(sim)); in amr_cam_poll()
/dflybsd-src/sys/dev/disk/advansys/
H A Dadvansys.c72 static void adv_action(struct cam_sim *sim, union ccb *ccb);
75 static void adv_poll(struct cam_sim *sim);
118 xpt_freeze_simq(adv->sim, /*count*/1); in adv_set_state()
189 adv_action(struct cam_sim *sim, union ccb *ccb) in adv_action() argument
195 adv = (struct adv_softc *)cam_sim_softc(sim); in adv_action()
487 cpi->bus_id = cam_sim_bus(sim); in adv_action()
491 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in adv_action()
492 cpi->unit_number = cam_sim_unit(sim); in adv_action()
520 struct cam_sim *sim; in adv_execute_ccb() local
528 sim = xpt_path_sim(ccb_h->path); in adv_execute_ccb()
[all …]
H A Dadwcam.c89 static void adw_action(struct cam_sim *sim, union ccb *ccb);
90 static void adw_poll(struct cam_sim *sim);
336 adw_action(struct cam_sim *sim, union ccb *ccb) in adw_action() argument
342 adw = (struct adw_softc *)cam_sim_softc(sim); in adw_action()
366 xpt_freeze_simq(sim, /*count*/1); in adw_action()
455 xpt_freeze_simq(sim, 1); in adw_action()
785 cpi->bus_id = cam_sim_bus(sim); in adw_action()
789 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in adw_action()
790 cpi->unit_number = cam_sim_unit(sim); in adw_action()
807 adw_poll(struct cam_sim *sim) in adw_poll() argument
[all …]
/dflybsd-src/sys/dev/raid/hptrr/
H A Dhptrr_osm_bsd.c407 static void hpt_action(struct cam_sim *sim, union ccb *ccb);
408 static void hpt_poll(struct cam_sim *sim);
742 static void hpt_action(struct cam_sim *sim, union ccb *ccb) in hpt_action() argument
744 PVBUS_EXT vbus_ext = (PVBUS_EXT)cam_sim_softc(sim); in hpt_action()
779 cpi->unit_number = cam_sim_unit(sim); in hpt_action()
780 cpi->bus_id = cam_sim_bus(sim); in hpt_action()
786 strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in hpt_action()
813 static void hpt_poll(struct cam_sim *sim) in hpt_poll() argument
815 PVBUS_EXT vbus_ext = cam_sim_softc(sim); in hpt_poll()
1052 vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, in hpt_final_init()
[all …]
/dflybsd-src/sys/dev/raid/hpt27xx/
H A Dhpt27xx_osm_bsd.c392 static void hpt_action(struct cam_sim *sim, union ccb *ccb);
393 static void hpt_poll(struct cam_sim *sim);
764 static void hpt_action(struct cam_sim *sim, union ccb *ccb) in hpt_action() argument
766 PVBUS_EXT vbus_ext = (PVBUS_EXT)cam_sim_softc(sim); in hpt_action()
807 cpi->unit_number = cam_sim_unit(sim); in hpt_action()
808 cpi->bus_id = cam_sim_bus(sim); in hpt_action()
814 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in hpt_action()
841 static void hpt_poll(struct cam_sim *sim) in hpt_poll() argument
843 hpt_pci_intr(cam_sim_softc(sim)); in hpt_poll()
1076 vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, in hpt_final_init()
[all …]
/dflybsd-src/sys/dev/raid/mps/
H A Dmps_sas.c143 static void mpssas_action(struct cam_sim *sim, union ccb *ccb);
144 static void mpssas_poll(struct cam_sim *sim);
205 xpt_freeze_simq(sassc->sim, 1); in mpssas_startup_increment()
223 xpt_release_simq(sassc->sim, 1); in mpssas_startup_decrement()
244 xpt_freeze_simq(sc->sassc->sim, 1); in mpssas_alloc_tm()
264 xpt_release_simq(sc->sassc->sim, 1); in mpssas_free_tm()
281 pathid = cam_sim_path(sassc->sim); in mpssas_rescan_target()
332 cam_sim_name(cm->cm_sc->sassc->sim), in mpssas_log_command()
333 cam_sim_unit(cm->cm_sc->sassc->sim), in mpssas_log_command()
334 cam_sim_bus(cm->cm_sc->sassc->sim), in mpssas_log_command()
[all …]
/dflybsd-src/sys/dev/virtual/vmware/pvscsi/
H A Dpvscsi.c94 static void pvscsi_poll(struct cam_sim *sim);
98 static void pvscsi_action(struct cam_sim *sim, union ccb *ccb);
196 struct cam_sim *sim; member
253 xpt_freeze_simq(sc->sim, 1); in pvscsi_freeze()
1095 cam_sim_path(sc->sim), desc->target, desc->lun[1]) in pvscsi_process_msg()
1171 pvscsi_poll(struct cam_sim *sim) in pvscsi_poll() argument
1175 sc = cam_sim_softc(sim); in pvscsi_poll()
1271 pvscsi_action(struct cam_sim *sim, union ccb *ccb) in pvscsi_action() argument
1276 sc = cam_sim_softc(sim); in pvscsi_action()
1345 e->bus = cam_sim_bus(sim); in pvscsi_action()
[all …]
/dflybsd-src/sys/dev/disk/buslogic/
H A Dbt.c154 static void btaction(struct cam_sim *sim, union ccb *ccb);
155 static void btpoll(struct cam_sim *sim);
763 bt->sim = cam_sim_alloc(btaction, btpoll, "bt", bt, in bt_attach()
766 if (bt->sim == NULL) in bt_attach()
770 if (xpt_bus_register(bt->sim, 0) != CAM_SUCCESS) { in bt_attach()
771 cam_sim_free(bt->sim); in bt_attach()
777 cam_sim_path(bt->sim), CAM_TARGET_WILDCARD, in bt_attach()
779 xpt_bus_deregister(cam_sim_path(bt->sim)); in bt_attach()
780 cam_sim_free(bt->sim); in bt_attach()
904 btaction(struct cam_sim *sim, union ccb *ccb) in btaction() argument
[all …]
/dflybsd-src/sys/dev/disk/sbp/
H A Dsbp.c209 struct cam_sim *sim; member
245 static void sbp_action(struct cam_sim *sim, union ccb *ccb);
246 static void sbp_poll(struct cam_sim *sim);
744 if ((sbp->sim->flags & SIMQ_FREEZED) == 0) { in sbp_post_busreset()
745 xpt_freeze_simq(sbp->sim, /*count*/1); in sbp_post_busreset()
746 sbp->sim->flags |= SIMQ_FREEZED; in sbp_post_busreset()
819 xpt_release_simq(sbp->sim, /*run queue*/TRUE); in sbp_post_explore()
820 sbp->sim->flags &= ~SIMQ_FREEZED; in sbp_post_explore()
1019 cam_sim_path(target->sbp->sim), in sbp_do_attach()
1886 sbp->sim = cam_sim_alloc(sbp_action, sbp_poll, "sbp", sbp, in sbp_attach()
[all …]
/dflybsd-src/sys/dev/disk/isp/
H A Disp_freebsd.c88 struct cam_sim *sim; in isp_attach_chan() local
94sim = cam_sim_alloc(isp_action, isp_poll, "isp", isp, device_get_unit(isp->isp_dev), &isp->isp_osi… in isp_attach_chan()
97 if (sim == NULL) { in isp_attach_chan()
102 if (xpt_bus_register(sim, chan) != CAM_SUCCESS) { in isp_attach_chan()
104 cam_sim_free(sim); in isp_attach_chan()
108 …if (xpt_create_path_unlocked(&path, NULL, cam_sim_path(sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD… in isp_attach_chan()
110 xpt_bus_deregister(cam_sim_path(sim)); in isp_attach_chan()
112 cam_sim_free(sim); in isp_attach_chan()
120 csa->callback_arg = sim; in isp_attach_chan()
126 spi->sim = sim; in isp_attach_chan()
[all …]
/dflybsd-src/sys/dev/raid/mpr/
H A Dmpr_sas.c118 static void mprsas_action(struct cam_sim *sim, union ccb *ccb);
119 static void mprsas_poll(struct cam_sim *sim);
186 xpt_freeze_simq(sassc->sim, 1); in mprsas_startup_increment()
198 xpt_release_simq(sassc->sim, 1); in mprsas_release_simq_reinit()
216 xpt_release_simq(sassc->sim, 1); in mprsas_startup_decrement()
292 pathid = cam_sim_path(sassc->sim); in mprsas_rescan_target()
355 cam_sim_name(cm->cm_sc->sassc->sim), in mprsas_log_command()
356 cam_sim_unit(cm->cm_sc->sassc->sim), in mprsas_log_command()
357 cam_sim_bus(cm->cm_sc->sassc->sim), in mprsas_log_command()
780 sassc->sim = cam_sim_alloc(mprsas_action, mprsas_poll, "mpr", sassc, in mpr_attach_sas()
[all …]

1234