Lines Matching refs:sim
59 static void ataaction(struct cam_sim *sim, union ccb *ccb);
60 static void atapoll(struct cam_sim *sim);
183 ch->sim = cam_sim_alloc(ataaction, atapoll, "ata", ch, in ata_attach()
185 if (ch->sim == NULL) { in ata_attach()
191 if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { in ata_attach()
196 if (xpt_create_path(&ch->path, /*periph*/NULL, cam_sim_path(ch->sim), in ata_attach()
206 xpt_bus_deregister(cam_sim_path(ch->sim)); in ata_attach()
208 cam_sim_free(ch->sim, /*free_devq*/TRUE); in ata_attach()
209 ch->sim = NULL; in ata_attach()
239 xpt_bus_deregister(cam_sim_path(ch->sim)); in ata_detach()
240 cam_sim_free(ch->sim, /*free_devq*/TRUE); in ata_detach()
241 ch->sim = NULL; in ata_detach()
265 if (ch->sim == NULL) { in ata_conn_event()
273 cam_sim_path(ch->sim), in ata_conn_event()
288 xpt_freeze_simq(ch->sim, 1); in ata_reinit()
303 xpt_release_simq(ch->sim, TRUE); in ata_reinit()
319 xpt_freeze_simq(ch->sim, 1); in ata_suspend()
338 xpt_release_simq(ch->sim, TRUE); in ata_resume()
894 xpt_freeze_simq(ch->sim, 1); in ata_cam_end_transaction()
976 ataaction(struct cam_sim *sim, union ccb *ccb) in ataaction() argument
984 ch = (struct ata_channel *)cam_sim_softc(sim); in ataaction()
1162 cpi->bus_id = cam_sim_bus(sim); in ataaction()
1169 strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in ataaction()
1170 cpi->unit_number = cam_sim_unit(sim); in ataaction()
1197 atapoll(struct cam_sim *sim) in atapoll() argument
1199 struct ata_channel *ch = (struct ata_channel *)cam_sim_softc(sim); in atapoll()