Lines Matching refs:sim
66 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
347 struct atapi_xpt_softc *softc = (struct atapi_xpt_softc*)cam_sim_softc(sim); in atapi_action()
351 int unit = cam_sim_unit(sim); in atapi_action()
352 int bus = cam_sim_bus(sim); in atapi_action()
374 strncpy(cpi->dev_name, cam_sim_name(sim), sizeof cpi->dev_name); in atapi_action()
375 cpi->unit_number = cam_sim_unit(sim); in atapi_action()
376 cpi->bus_id = cam_sim_bus(sim); in atapi_action()
661 xpt_freeze_simq(sim, /*count*/ 1); in atapi_action()
675 atapi_poll(struct cam_sim *sim) in atapi_poll() argument
830 cam_rescan(struct cam_sim *sim) in cam_rescan() argument
838 if (xpt_create_path(&path, xpt_periph, cam_sim_path(sim), in cam_rescan()
895 if (xpt_bus_deregister(cam_sim_path(scp->sim)) == CAM_REQ_CMP) in free_softc()
898 if (scp->sim != NULL) { in free_softc()
900 cam_sim_free(scp->sim); in free_softc()
903 cam_sim_name(scp->sim)); in free_softc()