Lines Matching refs:sim

47 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));
188 cam_sim_free(sc->sim, TRUE);
205 if (sc->sim) {
206 xpt_bus_deregister(cam_sim_path(sc->sim));
207 cam_sim_free(sc->sim, TRUE);
218 if (!(sc->sim))
222 if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(sc->sim),
234 tws_action(struct cam_sim *sim, union ccb *ccb)
236 struct tws_softc *sc = (struct tws_softc *)cam_sim_softc(sim);
255 TWS_TRACE_DEBUG(sc, "reset bus", sim, ccb);
260 TWS_TRACE_DEBUG(sc, "set tran settings", sim, ccb);
268 TWS_TRACE_DEBUG(sc, "get tran settings", sim, ccb);
300 TWS_TRACE_DEBUG(sc, "path inquiry", sim, ccb);
308 ccb->cpi.unit_number = cam_sim_unit(sim);
309 ccb->cpi.bus_id = cam_sim_bus(sim);
314 strlcpy(ccb->cpi.dev_name, cam_sim_name(sim), DEV_IDLEN);
328 TWS_TRACE_DEBUG(sc, "default", sim, ccb);
1143 tws_poll(struct cam_sim *sim)
1145 struct tws_softc *sc = (struct tws_softc *)cam_sim_softc(sim);
1172 xpt_freeze_simq(sc->sim, 1);
1193 xpt_release_simq(sc->sim, 1);
1207 xpt_freeze_simq(sc->sim, 1);
1222 xpt_release_simq(sc->sim, 1);
1308 xpt_freeze_simq(sc->sim, 1);