Lines Matching refs:sim

49 static void  tws_action(struct cam_sim *sim, union ccb *ccb);
50 static void tws_poll(struct cam_sim *sim);
131 /* Create a device queue for sim */
155 sc->sim = cam_sim_alloc(tws_action, tws_poll, "tws", sc,
160 if (sc->sim == NULL) {
166 if (xpt_bus_register(sc->sim,
169 cam_sim_free(sc->sim, TRUE); /* passing true will free the devq */
170 sc->sim = NULL; /* so cam_detach will not try to free it */
175 if (xpt_create_path(&sc->path, NULL, cam_sim_path(sc->sim),
178 xpt_bus_deregister(cam_sim_path(sc->sim));
180 cam_sim_free(sc->sim, TRUE);
197 if (sc->sim) {
198 xpt_bus_deregister(cam_sim_path(sc->sim));
199 cam_sim_free(sc->sim, TRUE);
210 if (!(sc->sim))
214 if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(sc->sim),
226 tws_action(struct cam_sim *sim, union ccb *ccb)
228 struct tws_softc *sc = (struct tws_softc *)cam_sim_softc(sim);
246 TWS_TRACE_DEBUG(sc, "reset bus", sim, ccb);
251 TWS_TRACE_DEBUG(sc, "set tran settings", sim, ccb);
259 TWS_TRACE_DEBUG(sc, "get tran settings", sim, ccb);
286 TWS_TRACE_DEBUG(sc, "path inquiry", sim, ccb);
294 ccb->cpi.unit_number = cam_sim_unit(sim);
295 ccb->cpi.bus_id = cam_sim_bus(sim);
300 strlcpy(ccb->cpi.dev_name, cam_sim_name(sim), DEV_IDLEN);
312 TWS_TRACE_DEBUG(sc, "default", sim, ccb);
1112 tws_poll(struct cam_sim *sim)
1114 struct tws_softc *sc = (struct tws_softc *)cam_sim_softc(sim);
1140 xpt_freeze_simq(sc->sim, 1);
1161 xpt_release_simq(sc->sim, 1);
1175 xpt_freeze_simq(sc->sim, 1);
1190 xpt_release_simq(sc->sim, 1);
1274 xpt_freeze_simq(sc->sim, 1);