Searched refs:sim (Results 1 - 25 of 143) sorted by relevance

123456

/freebsd-10.0-release/sys/cam/
H A Dcam_sim.c67 struct cam_sim *sim; local
72 sim = (struct cam_sim *)malloc(sizeof(struct cam_sim),
75 if (sim == NULL)
78 sim->sim_action = sim_action;
79 sim->sim_poll = sim_poll;
80 sim->sim_name = sim_name;
81 sim->softc = softc;
82 sim->path_id = CAM_PATH_ANY;
83 sim->unit_number = unit;
84 sim
107 cam_sim_free(struct cam_sim *sim, int free_devq) argument
131 cam_sim_release(struct cam_sim *sim) argument
142 cam_sim_hold(struct cam_sim *sim) argument
151 cam_sim_set_path(struct cam_sim *sim, u_int32_t path_id) argument
[all...]
H A Dcam_sim.h37 * The sim driver creates a sim for each controller. The sim device
39 * sims. For instance, a driver may create one sim for each channel of
48 typedef void (*sim_action_func)(struct cam_sim *sim, union ccb *ccb);
49 typedef void (*sim_poll_func)(struct cam_sim *sim);
63 void cam_sim_free(struct cam_sim *sim, int free_devq);
64 void cam_sim_hold(struct cam_sim *sim);
65 void cam_sim_release(struct cam_sim *sim);
67 /* Optional sim attribute
130 cam_sim_path(struct cam_sim *sim) argument
136 cam_sim_name(struct cam_sim *sim) argument
142 cam_sim_softc(struct cam_sim *sim) argument
148 cam_sim_unit(struct cam_sim *sim) argument
154 cam_sim_bus(struct cam_sim *sim) argument
[all...]
H A Dcam_xpt_sim.h40 int32_t xpt_bus_register(struct cam_sim *sim, device_t parent,
43 u_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count);
44 void xpt_release_simq(struct cam_sim *sim, int run_queue);
49 void xpt_batch_start(struct cam_sim *sim);
50 void xpt_batch_done(struct cam_sim *sim);
H A Dcam_xpt.c245 static void xptaction(struct cam_sim *sim, union ccb *work_ccb);
246 static void xptpoll(struct cam_sim *sim);
460 CAM_SIM_LOCK(bus->sim);
472 CAM_SIM_UNLOCK(bus->sim);
485 CAM_SIM_UNLOCK(bus->sim);
496 CAM_SIM_LOCK(bus->sim);
508 CAM_SIM_UNLOCK(bus->sim);
519 CAM_SIM_UNLOCK(bus->sim);
787 struct cam_sim *sim; local
798 sim
2257 struct cam_sim *sim; local
2532 struct cam_sim *sim; local
2626 struct cam_sim *sim; local
2634 struct cam_sim *sim; local
3028 struct cam_sim *sim; local
3231 struct cam_sim *sim; local
3819 struct cam_sim *sim; local
3858 xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) argument
4207 xpt_freeze_simq(struct cam_sim *sim, u_int count) argument
4278 xpt_release_simq(struct cam_sim *sim, int run_queue) argument
4316 struct cam_sim *sim; local
4325 struct cam_sim *sim; local
4352 xpt_batch_start(struct cam_sim *sim) argument
4360 xpt_batch_done(struct cam_sim *sim) argument
4409 struct cam_sim *sim; local
4697 struct cam_sim *sim; local
4727 struct cam_sim *sim; local
4909 xptaction(struct cam_sim *sim, union ccb *work_ccb) argument
4954 xptpoll(struct cam_sim *sim) argument
4974 struct cam_sim *sim; local
4995 camisr_runqueue(struct cam_sim *sim) argument
[all...]
H A Dcam_periph.h113 struct cam_sim *sim; member in struct:cam_periph
191 mtx_lock(periph->sim->mtx);
197 mtx_unlock(periph->sim->mtx);
203 return (mtx_owned(periph->sim->mtx));
210 return (msleep(chan, periph->sim->mtx, priority, wmesg, timo));
233 mtx_assert(pperiph->sim->mtx, MA_NOTOWNED);
/freebsd-10.0-release/sys/mips/conf/
H A DBERI_SIM_BASE13 makeoptions FDT_DTS_FILE=beri-sim.dts
/freebsd-10.0-release/sys/dev/iscsi_initiator/
H A Disc_cam.c60 _inq(struct cam_sim *sim, union ccb *ccb) argument
63 isc_session_t *sp = cam_sim_softc(sim);
76 cpi->bus_id = cam_sim_bus(sim);
80 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
81 cpi->unit_number = cam_sim_unit(sim);
90 _scsi_encap(struct cam_sim *sim, union ccb *ccb) argument
95 ret = scsi_encap(sim, ccb);
97 isc_session_t *sp = cam_sim_softc(sim);
100 ret = scsi_encap(sim, ccb);
183 ic_action(struct cam_sim *sim, unio argument
284 ic_poll(struct cam_sim *sim) argument
330 struct cam_sim *sim; local
[all...]
/freebsd-10.0-release/sys/dev/twa/
H A Dtw_osl_cam.c56 static TW_VOID twa_action(struct cam_sim *sim, union ccb *ccb);
57 static TW_VOID twa_poll(struct cam_sim *sim);
100 sc->sim = cam_sim_alloc(twa_action, twa_poll, "twa", sc,
103 if (sc->sim == NULL) {
119 if (xpt_bus_register(sc->sim, sc->bus_dev, 0) != CAM_SUCCESS) {
120 cam_sim_free(sc->sim, TRUE);
121 sc->sim = NULL; /* so cam_detach will not try to free it */
134 cam_sim_path(sc->sim),
137 xpt_bus_deregister(cam_sim_path (sc->sim));
139 cam_sim_free(sc->sim, TRU
311 twa_action(struct cam_sim *sim, union ccb *ccb) argument
458 twa_poll(struct cam_sim *sim) argument
[all...]
/freebsd-10.0-release/usr.sbin/nandsim/
H A Dsample.conf34 # [sim] General (common) simulator configuration section.
36 [sim]
/freebsd-10.0-release/sys/dev/aac/
H A Daac_cam.c72 struct cam_sim *sim; member in struct:aac_cam
113 struct aac_sim *sim; local
119 TAILQ_FOREACH(sim, &sc->aac_sim_tqh, sim_link) {
120 camsc = sim->aac_cam;
133 cam_sim_path(camsc->sim),
157 xpt_release_simq(camsc->sim, 1);
191 xpt_bus_deregister(cam_sim_path(camsc->sim));
192 cam_sim_free(camsc->sim, /*free_devq*/TRUE);
208 struct cam_sim *sim; local
224 sim
256 aac_cam_action(struct cam_sim *sim, union ccb *ccb) argument
519 aac_cam_poll(struct cam_sim *sim) argument
627 aac_cam_reset_bus(struct cam_sim *sim, union ccb *ccb) argument
672 aac_cam_abort_ccb(struct cam_sim *sim, union ccb *ccb) argument
678 aac_cam_term_io(struct cam_sim *sim, union ccb *ccb) argument
[all...]
/freebsd-10.0-release/sys/dev/aic7xxx/
H A Daic7xxx_osm.h92 #define SIM_IS_SCSIBUS_B(ahc, sim) \
93 ((sim) == ahc->platform_data->sim_b)
94 #define SIM_CHANNEL(ahc, sim) \
95 (((sim) == ahc->platform_data->sim_b) ? 'B' : 'A')
96 #define SIM_SCSI_ID(ahc, sim) \
97 (((sim) == ahc->platform_data->sim_b) ? ahc->our_id_b : ahc->our_id)
98 #define SIM_PATH(ahc, sim) \
99 (((sim) == ahc->platform_data->sim_b) ? ahc->platform_data->path_b \
101 #define BUILD_SCSIID(ahc, sim, target_id, our_id) \
103 | (SIM_IS_SCSIBUS_B(ahc, sim)
137 struct cam_sim *sim; member in struct:ahc_platform_data
[all...]
H A Daic7xxx_osm.c56 static void ahc_action(struct cam_sim *sim, union ccb *ccb);
64 static void ahc_poll(struct cam_sim *sim);
65 static void ahc_setup_data(struct ahc_softc *ahc, struct cam_sim *sim,
67 static void ahc_abort_ccb(struct ahc_softc *ahc, struct cam_sim *sim,
83 path_id = cam_sim_path(ahc->platform_data->sim);
151 struct cam_sim *sim; local
158 sim = NULL;
197 sim = cam_sim_alloc(ahc_action, ahc_poll, "ahc", ahc,
200 if (sim == NULL) {
205 if (xpt_bus_register(sim, ah
442 ahc_action(struct cam_sim *sim, union ccb *ccb) argument
895 struct cam_sim *sim; local
1127 ahc_poll(struct cam_sim *sim) argument
1136 ahc_setup_data(struct ahc_softc *ahc, struct cam_sim *sim, struct ccb_scsiio *csio, struct scb *scb) argument
1202 ahc_abort_ccb(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) argument
[all...]
H A Daic79xx_osm.c60 static void ahd_action(struct cam_sim *sim, union ccb *ccb);
71 static void ahd_poll(struct cam_sim *sim);
72 static void ahd_setup_data(struct ahd_softc *ahd, struct cam_sim *sim,
74 static void ahd_abort_ccb(struct ahd_softc *ahd, struct cam_sim *sim,
147 path_id = cam_sim_path(ahd->platform_data->sim);
218 struct cam_sim *sim; local
224 sim = NULL;
247 sim = cam_sim_alloc(ahd_action, ahd_poll, "ahd", ahd,
250 if (sim == NULL) {
255 if (xpt_bus_register(sim, ah
454 ahd_action(struct cam_sim *sim, union ccb *ccb) argument
911 struct cam_sim *sim; local
1063 ahd_poll(struct cam_sim *sim) argument
1069 ahd_setup_data(struct ahd_softc *ahd, struct cam_sim *sim, struct ccb_scsiio *csio, struct scb *scb) argument
1140 ahd_abort_ccb(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) argument
[all...]
H A Daic79xx_osm.h82 #define SIM_IS_SCSIBUS_B(ahd, sim) \
84 #define SIM_CHANNEL(ahd, sim) \
86 #define SIM_SCSI_ID(ahd, sim) \
88 #define SIM_PATH(ahd, sim) \
90 #define BUILD_SCSIID(ahd, sim, target_id, our_id) \
95 ((ahd)->platform_data->sim)
128 struct cam_sim *sim; member in struct:ahd_platform_data
228 xpt_freeze_simq(aic->platform_data->sim, /*count*/1);
234 xpt_release_simq(aic->platform_data->sim, /*run queue*/TRUE);
/freebsd-10.0-release/sys/dev/ppbus/
H A Dvpo.c73 struct cam_sim *sim; member in struct:vpo_data
84 static void vpo_action(struct cam_sim *sim, union ccb *ccb);
85 static void vpo_poll(struct cam_sim *sim);
161 vpo->sim = cam_sim_alloc(vpo_action, vpo_poll, "vpo", vpo,
164 if (vpo->sim == NULL) {
170 if (xpt_bus_register(vpo->sim, dev, /*bus*/0) != CAM_SUCCESS) {
171 cam_sim_free(vpo->sim, /*free_devq*/TRUE);
298 vpo_action(struct cam_sim *sim, union ccb *ccb) argument
300 struct vpo_data *vpo = (struct vpo_data *)sim->softc;
385 cpi->bus_id = sim
408 vpo_poll(struct cam_sim *sim) argument
[all...]
/freebsd-10.0-release/sys/dev/isci/
H A Disci_controller.c56 void isci_action(struct cam_sim *sim, union ccb *ccb);
57 void isci_poll(struct cam_sim *sim);
247 controller->sim = NULL;
379 xpt_freeze_simq(controller->sim, 1);
573 xpt_release_simq(isci_controller->sim, TRUE);
584 cam_sim_path(isci_controller->sim),
623 controller->sim = cam_sim_alloc(isci_action, isci_poll, "isci",
627 if(controller->sim == NULL) {
633 if(xpt_bus_register(controller->sim, parent, controller->index)
636 cam_sim_free(controller->sim, TRU
654 isci_poll(struct cam_sim *sim) argument
662 isci_action(struct cam_sim *sim, union ccb *ccb) argument
[all...]
/freebsd-10.0-release/sys/dev/mfi/
H A Dmfi_cam.c78 struct cam_sim *sim; member in struct:mfip_softc
143 sc->sim = cam_sim_alloc(mfip_cam_action, mfip_cam_poll, "mfi", sc,
146 if (sc->sim == NULL) {
156 if (xpt_bus_register(sc->sim, dev, 0) != 0) {
158 cam_sim_free(sc->sim, FALSE);
159 sc->sim = NULL;
189 if (sc->sim != NULL) {
191 xpt_bus_deregister(cam_sim_path(sc->sim));
192 cam_sim_free(sc->sim, FALSE);
193 sc->sim
206 mfip_cam_action(struct cam_sim *sim, union ccb *ccb) argument
293 struct cam_sim *sim; local
465 mfip_cam_poll(struct cam_sim *sim) argument
[all...]
/freebsd-10.0-release/sys/cam/ctl/
H A Dscsi_ctl.c83 struct cam_sim *sim; member in struct:ctlfe_softc
217 static void ctlfe_dump_sim(struct cam_sim *sim);
323 struct cam_sim *sim; local
334 sim = xpt_path_sim(cpi->ccb_h.path);
341 mtx_assert(sim->mtx, MA_OWNED);
384 bus_softc->sim = xpt_path_sim(cpi->ccb_h.path);
541 struct cam_sim *sim; local
548 sim = xpt_path_sim(periph->path);
553 callout_init_mtx(&softc->dma_callout, sim->mtx, /*flags*/ 0);
1677 struct cam_sim *sim; local
1847 struct cam_sim *sim; local
1918 struct cam_sim *sim; local
1973 struct cam_sim *sim; local
2030 struct cam_sim *sim; local
2061 ctlfe_dump_sim(struct cam_sim *sim) argument
2161 struct cam_sim *sim; local
2203 struct cam_sim *sim; local
[all...]
/freebsd-10.0-release/sys/dev/ahci/
H A Dahciem.c57 static void ahciemaction(struct cam_sim *sim, union ccb *ccb);
58 static void ahciempoll(struct cam_sim *sim);
120 enc->sim = cam_sim_alloc(ahciemaction, ahciempoll, "ahciem", enc,
123 if (enc->sim == NULL) {
129 if (xpt_bus_register(enc->sim, dev, 0) != CAM_SUCCESS) {
134 if (xpt_create_path(&enc->path, /*periph*/NULL, cam_sim_path(enc->sim),
183 xpt_bus_deregister(cam_sim_path(enc->sim));
185 cam_sim_free(enc->sim, /*free_devq*/TRUE);
211 xpt_bus_deregister(cam_sim_path(enc->sim));
212 cam_sim_free(enc->sim, /*free_dev
543 ahciemaction(struct cam_sim *sim, union ccb *ccb) argument
603 ahciempoll(struct cam_sim *sim) argument
[all...]
/freebsd-10.0-release/tools/tools/vhba/
H A Dvhba.c49 vhba->sim = cam_sim_alloc(vhba_action, vhba_poll, VHBA_MOD, vhba, 0, &vhba->lock, VHBA_MAXCMDS, VHBA_MAXCMDS, vhba->devq);
50 if (vhba->sim == NULL) {
56 if (xpt_bus_register(vhba->sim, 0, 0) != CAM_SUCCESS) {
57 cam_sim_free(vhba->sim, TRUE);
72 xpt_bus_deregister(cam_sim_path(vhba->sim));
73 cam_sim_free(vhba->sim, TRUE);
77 vhba_poll(struct cam_sim *sim) argument
79 vhba_softc_t *vhba = cam_sim_softc(sim);
84 vhba_action(struct cam_sim *sim, union ccb *ccb) argument
89 vhba = cam_sim_softc(sim);
[all...]
/freebsd-10.0-release/sys/dev/tws/
H A Dtws_cam.c47 static void tws_action(struct cam_sim *sim, union ccb *ccb);
48 static void tws_poll(struct cam_sim *sim);
135 /* Create a device queue for sim */
159 sc->sim = cam_sim_alloc(tws_action, tws_poll, "tws", sc,
166 if (sc->sim == NULL) {
172 if (xpt_bus_register(sc->sim,
177 cam_sim_free(sc->sim, TRUE); /* passing true will free the devq */
178 sc->sim = NULL; /* so cam_detach will not try to free it */
183 if (xpt_create_path(&sc->path, NULL, cam_sim_path(sc->sim),
186 xpt_bus_deregister(cam_sim_path(sc->sim));
234 tws_action(struct cam_sim *sim, union ccb *ccb) argument
1142 tws_poll(struct cam_sim *sim) argument
[all...]
/freebsd-10.0-release/sys/dev/aacraid/
H A Daacraid_cam.c103 struct cam_sim *sim; member in struct:aac_cam
185 struct aac_sim *sim; local
191 TAILQ_FOREACH(sim, &sc->aac_sim_tqh, sim_link) {
192 camsc = sim->aac_cam;
205 cam_sim_path(camsc->sim),
229 xpt_release_simq(camsc->sim, 1);
273 xpt_bus_deregister(cam_sim_path(camsc->sim));
274 cam_sim_free(camsc->sim, /*free_devq*/TRUE);
290 struct cam_sim *sim; local
307 sim
371 aac_container_rw_command(struct cam_sim *sim, union ccb *ccb, u_int8_t *cmdp) argument
518 aac_container_special_command(struct cam_sim *sim, union ccb *ccb, u_int8_t *cmdp) argument
842 aac_passthrough_command(struct cam_sim *sim, union ccb *ccb) argument
958 aac_cam_action(struct cam_sim *sim, union ccb *ccb) argument
1114 aac_cam_poll(struct cam_sim *sim) argument
1235 aac_cam_reset_bus(struct cam_sim *sim, union ccb *ccb) argument
1313 aac_cam_abort_ccb(struct cam_sim *sim, union ccb *ccb) argument
1319 aac_cam_term_io(struct cam_sim *sim, union ccb *ccb) argument
[all...]
/freebsd-10.0-release/sys/dev/amr/
H A Damr_cam.c89 static void amr_cam_action(struct cam_sim *sim, union ccb *ccb);
90 static void amr_cam_poll(struct cam_sim *sim);
177 /* allocate a sim */
217 * If a sim was allocated for this channel, free it
243 amr_cam_action(struct cam_sim *sim, union ccb *ccb) argument
245 struct amr_softc *sc = cam_sim_softc(sim);
295 csio->ccb_h.sim_priv.entries[0].field= cam_sim_bus(sim);
328 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
329 cpi->unit_number = cam_sim_unit(sim);
330 cpi->bus_id = cam_sim_bus(sim);
535 amr_cam_poll(struct cam_sim *sim) argument
[all...]
/freebsd-10.0-release/sys/dev/wds/
H A Dwd7000.c304 struct cam_sim *sim; /* SIM descriptor for this card */ member in struct:wds
328 static void wds_action(struct cam_sim * sim, union ccb * ccb);
329 static void wds_poll(struct cam_sim * sim);
340 static void wds_scsi_io(struct cam_sim * sim, struct ccb_scsiio * csio);
516 struct cam_sim *sim; local
609 sim = cam_sim_alloc(wds_action, wds_poll, "wds", (void *) wp,
611 if (sim == NULL) {
615 wp->sim = sim;
617 if (xpt_bus_register(sim, de
1037 wds_scsi_io(struct cam_sim * sim, struct ccb_scsiio * csio) argument
1170 wds_action(struct cam_sim * sim, union ccb * ccb) argument
1243 wds_poll(struct cam_sim * sim) argument
[all...]
/freebsd-10.0-release/sys/dev/ata/
H A Data-all.c60 static void ataaction(struct cam_sim *sim, union ccb *ccb);
61 static void atapoll(struct cam_sim *sim);
188 ch->sim = cam_sim_alloc(ataaction, atapoll, "ata", ch,
190 if (ch->sim == NULL) {
191 device_printf(dev, "unable to allocate sim\n");
196 if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) {
201 if (xpt_create_path(&ch->path, /*periph*/NULL, cam_sim_path(ch->sim),
211 xpt_bus_deregister(cam_sim_path(ch->sim));
213 cam_sim_free(ch->sim, /*free_devq*/TRUE);
214 ch->sim
900 ataaction(struct cam_sim *sim, union ccb *ccb) argument
1125 atapoll(struct cam_sim *sim) argument
[all...]

Completed in 151 milliseconds

123456