Lines Matching refs:sim
57 static void ahd_action(struct cam_sim *sim, union ccb *ccb);
68 static void ahd_poll(struct cam_sim *sim);
69 static void ahd_setup_data(struct ahd_softc *ahd, struct cam_sim *sim,
71 static void ahd_abort_ccb(struct ahd_softc *ahd, struct cam_sim *sim,
144 path_id = cam_sim_path(ahd->platform_data->sim);
215 struct cam_sim *sim;
221 sim = NULL;
244 sim = cam_sim_alloc(ahd_action, ahd_poll, "ahd", ahd,
247 if (sim == NULL) {
252 if (xpt_bus_register(sim, ahd->dev_softc, /*bus_id*/0) != CAM_SUCCESS) {
253 cam_sim_free(sim, /*free_devq*/TRUE);
254 sim = NULL;
259 cam_sim_path(sim), CAM_TARGET_WILDCARD,
261 xpt_bus_deregister(cam_sim_path(sim));
262 cam_sim_free(sim, /*free_devq*/TRUE);
263 sim = NULL;
272 csa.callback_arg = sim;
277 ahd->platform_data->sim = sim;
462 ahd_action(struct cam_sim *sim, union ccb *ccb)
473 ahd = (struct ahd_softc *)cam_sim_softc(sim);
476 our_id = SIM_SCSI_ID(ahd, sim);
487 status = ahd_find_tmode_devs(ahd, sim, ccb, &tstate,
551 xpt_freeze_simq(sim, /*count*/1);
572 hscb->scsiid = BUILD_SCSIID(ahd, sim, target_id, our_id);
606 ahd_setup_data(ahd, sim, &ccb->csio, scb);
618 status = ahd_find_tmode_devs(ahd, sim, ccb, &tstate,
633 ahd_handle_en_lun(ahd, sim, ccb);
639 ahd_abort_ccb(ahd, sim, ccb);
644 ahd_set_tran_settings(ahd, SIM_SCSI_ID(ahd, sim),
645 SIM_CHANNEL(ahd, sim), &ccb->cts);
652 ahd_get_tran_settings(ahd, SIM_SCSI_ID(ahd, sim),
653 SIM_CHANNEL(ahd, sim), &ccb->cts);
667 found = ahd_reset_channel(ahd, SIM_CHANNEL(ahd, sim),
670 xpt_print_path(SIM_PATH(ahd, sim));
706 cpi->bus_id = cam_sim_bus(sim);
710 strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
711 cpi->unit_number = cam_sim_unit(sim);
745 ahd_compile_devinfo(&devinfo, SIM_SCSI_ID(ahd, sim),
748 SIM_CHANNEL(ahd, sim),
916 struct cam_sim *sim;
918 sim = (struct cam_sim *)callback_arg;
919 ahd = (struct ahd_softc *)cam_sim_softc(sim);
925 ahd_compile_devinfo(&devinfo, SIM_SCSI_ID(ahd, sim),
928 SIM_CHANNEL(ahd, sim),
1061 ahd_poll(struct cam_sim *sim)
1063 ahd_intr(cam_sim_softc(sim));
1067 ahd_setup_data(struct ahd_softc *ahd, struct cam_sim *sim,
1129 xpt_freeze_simq(sim, /*count*/1);
1135 ahd_abort_ccb(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb)
1151 status = ahd_find_tmode_devs(ahd, sim, abort_ccb, &tstate,
1305 if (pdata->sim != NULL) {
1308 xpt_bus_deregister(cam_sim_path(pdata->sim));
1309 cam_sim_free(pdata->sim, /*free_devq*/TRUE);