/freebsd/sys/cam/ |
H A D | cam_sim.c | 105 struct cam_sim *sim; in cam_sim_alloc() local 107 sim = malloc(sizeof(struct cam_sim), M_CAMSIM, M_ZERO | M_NOWAIT); in cam_sim_alloc() 108 if (sim == NULL) in cam_sim_alloc() 111 sim->sim_action = sim_action; in cam_sim_alloc() 112 sim->sim_poll = sim_poll; in cam_sim_alloc() 113 sim->sim_name = sim_name; in cam_sim_alloc() 114 sim->softc = softc; in cam_sim_alloc() 115 sim->path_id = CAM_PATH_ANY; in cam_sim_alloc() 116 sim->unit_number = unit; in cam_sim_alloc() 117 sim->bus_id = 0; /* set in xpt_bus_register */ in cam_sim_alloc() [all …]
|
H A D | cam_sim.h | 48 typedef void (*sim_action_func)(struct cam_sim *sim, union ccb *ccb); 49 typedef void (*sim_poll_func)(struct cam_sim *sim); 63 void cam_sim_free(struct cam_sim *sim, int free_devq); 64 void cam_sim_hold(struct cam_sim *sim); 65 void cam_sim_release(struct cam_sim *sim); 68 void cam_sim_set_path(struct cam_sim *sim, uint32_t path_id); 98 cam_sim_path(const struct cam_sim *sim) in cam_sim_path() argument 100 return (sim->path_id); in cam_sim_path() 104 cam_sim_name(const struct cam_sim *sim) in cam_sim_name() argument 106 return (sim->sim_name); in cam_sim_name() [all …]
|
H A D | cam_xpt.c | 262 static void xptaction(struct cam_sim *sim, union ccb *work_ccb); 263 static void xptpoll(struct cam_sim *sim); 1064 path->bus->sim->sim_name, in xpt_announce_periph_sbuf() 1065 path->bus->sim->unit_number, in xpt_announce_periph_sbuf() 1066 path->bus->sim->bus_id, in xpt_announce_periph_sbuf() 1138 path->bus->sim->sim_name, in xpt_denounce_periph_sbuf() 1139 path->bus->sim->unit_number, in xpt_denounce_periph_sbuf() 1140 path->bus->sim->bus_id, in xpt_denounce_periph_sbuf() 1334 && (cur_pattern->bus_id != bus->sim->bus_id)) in xptbusmatch() 1338 && (cur_pattern->unit_number != bus->sim->unit_number)) in xptbusmatch() [all …]
|
H A D | cam_xpt_sim.h | 40 int xpt_bus_register(struct cam_sim *sim, device_t parent, 43 uint32_t xpt_freeze_simq(struct cam_sim *sim, u_int count); 44 void xpt_release_simq(struct cam_sim *sim, int run_queue);
|
/freebsd/sys/dev/aac/ |
H A D | aac_cam.c | 72 struct cam_sim *sim; member 111 struct aac_sim *sim; in aac_cam_rescan() local 117 TAILQ_FOREACH(sim, &sc->aac_sim_tqh, sim_link) { in aac_cam_rescan() 118 camsc = sim->aac_cam; in aac_cam_rescan() 131 cam_sim_path(camsc->sim), in aac_cam_rescan() 154 xpt_release_simq(camsc->sim, 1); in aac_cam_event() 188 xpt_bus_deregister(cam_sim_path(camsc->sim)); in aac_cam_detach() 189 cam_sim_free(camsc->sim, /*free_devq*/TRUE); in aac_cam_detach() 205 struct cam_sim *sim; in aac_cam_attach() local 221 sim = cam_sim_alloc(aac_cam_action, aac_cam_poll, "aacp", camsc, in aac_cam_attach() [all …]
|
/freebsd/sys/dev/nvmf/host/ |
H A D | nvmf_sim.c | 43 struct cam_sim *sim = xpt_path_sim(ccb->ccb_h.path); in nvmf_ccb_done() local 44 struct nvmf_softc *sc = cam_sim_softc(sim); in nvmf_ccb_done() 156 nvmf_sim_action(struct cam_sim *sim, union ccb *ccb) in nvmf_sim_action() argument 158 struct nvmf_softc *sc = cam_sim_softc(sim); in nvmf_sim_action() 181 strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in nvmf_sim_action() 182 cpi->unit_number = cam_sim_unit(sim); in nvmf_sim_action() 261 sc->sim = cam_sim_alloc(nvmf_sim_action, NULL, "nvme", sc, in nvmf_init_sim() 263 if (sc->sim == NULL) { in nvmf_init_sim() 269 if (xpt_bus_register(sc->sim, sc->dev, 0) != CAM_SUCCESS) { in nvmf_init_sim() 271 cam_sim_free(sc->sim, TRUE); in nvmf_init_sim() [all …]
|
/freebsd/sys/dev/aic7xxx/ |
H A D | aic7xxx_osm.h | 70 #define SIM_IS_SCSIBUS_B(ahc, sim) \ argument 71 ((sim) == ahc->platform_data->sim_b) 72 #define SIM_CHANNEL(ahc, sim) \ argument 73 (((sim) == ahc->platform_data->sim_b) ? 'B' : 'A') 74 #define SIM_SCSI_ID(ahc, sim) \ argument 75 (((sim) == ahc->platform_data->sim_b) ? ahc->our_id_b : ahc->our_id) 76 #define SIM_PATH(ahc, sim) \ argument 77 (((sim) == ahc->platform_data->sim_b) ? ahc->platform_data->path_b \ 79 #define BUILD_SCSIID(ahc, sim, target_id, our_id) \ argument 81 | (SIM_IS_SCSIBUS_B(ahc, sim) ? TWIN_CHNLB : 0)) [all …]
|
H A D | aic7xxx_osm.c | 51 static void ahc_action(struct cam_sim *sim, union ccb *ccb); 59 static void ahc_poll(struct cam_sim *sim); 60 static void ahc_setup_data(struct ahc_softc *ahc, struct cam_sim *sim, 62 static void ahc_abort_ccb(struct ahc_softc *ahc, struct cam_sim *sim, 77 path_id = cam_sim_path(ahc->platform_data->sim); in ahc_create_path() 145 struct cam_sim *sim; in ahc_attach() 152 sim = NULL; in ahc_attach() 190 sim = cam_sim_alloc(ahc_action, ahc_poll, "ahc", ahc, in ahc_attach() 193 if (sim == NULL) { in ahc_attach() 198 if (xpt_bus_register(sim, ah in ahc_attach() 146 struct cam_sim *sim; ahc_attach() local 435 ahc_action(struct cam_sim * sim,union ccb * ccb) ahc_action() argument 885 struct cam_sim *sim; ahc_async() local 1115 ahc_poll(struct cam_sim * sim) ahc_poll() argument 1124 ahc_setup_data(struct ahc_softc * ahc,struct cam_sim * sim,struct ccb_scsiio * csio,struct scb * scb) ahc_setup_data() argument 1189 ahc_abort_ccb(struct ahc_softc * ahc,struct cam_sim * sim,union ccb * ccb) ahc_abort_ccb() argument [all...] |
H A D | aic79xx_osm.c | 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); in ahd_create_path() 215 struct cam_sim *sim; in ahd_attach() 221 sim = NULL; in ahd_attach() 244 sim = cam_sim_alloc(ahd_action, ahd_poll, "ahd", ahd, in ahd_attach() 247 if (sim == NULL) { in ahd_attach() 252 if (xpt_bus_register(sim, ah in ahd_attach() 216 struct cam_sim *sim; ahd_attach() local 450 ahd_action(struct cam_sim * sim,union ccb * ccb) ahd_action() argument 904 struct cam_sim *sim; ahd_async() local 1055 ahd_poll(struct cam_sim * sim) ahd_poll() argument 1061 ahd_setup_data(struct ahd_softc * ahd,struct cam_sim * sim,struct ccb_scsiio * csio,struct scb * scb) ahd_setup_data() argument 1129 ahd_abort_ccb(struct ahd_softc * ahd,struct cam_sim * sim,union ccb * ccb) ahd_abort_ccb() argument [all...] |
H A D | aic79xx_osm.h | 73 #define SIM_IS_SCSIBUS_B(ahd, sim) \ argument 75 #define SIM_CHANNEL(ahd, sim) \ argument 77 #define SIM_SCSI_ID(ahd, sim) \ argument 79 #define SIM_PATH(ahd, sim) \ argument 81 #define BUILD_SCSIID(ahd, sim, target_id, our_id) \ argument 86 ((ahd)->platform_data->sim) 119 struct cam_sim *sim; member 219 xpt_freeze_simq(aic->platform_data->sim, /*count*/1); in aic_freeze_simq() 225 xpt_release_simq(aic->platform_data->sim, /*run queue*/TRUE); in aic_release_simq()
|
/freebsd/sys/dev/mmcnull/ |
H A D | mmcnull.c | 51 struct cam_sim *sim; member 116 sc->sim = cam_sim_alloc(action_func, mmcnull_poll, "mmcnull", sc, in mmcnull_attach() 120 if (sc->sim == NULL) { in mmcnull_attach() 127 if (xpt_bus_register(sc->sim, dev, 0) != 0) { in mmcnull_attach() 130 cam_sim_free(sc->sim, FALSE); in mmcnull_attach() 154 if (sc->sim != NULL) { in mmcnull_detach() 156 xpt_bus_deregister(cam_sim_path(sc->sim)); in mmcnull_detach() 157 cam_sim_free(sc->sim, FALSE); in mmcnull_detach() 246 if (xpt_create_path(&dpath, NULL, cam_sim_path(sc->sim), 0, 0) != CAM_REQ_CMP) { in mmcnull_intr_sdio_newintr() 320 mmcnull_handle_mmcio(struct cam_sim *sim, union ccb *ccb) in mmcnull_handle_mmcio() argument [all …]
|
/freebsd/sys/cam/mmc/ |
H A D | mmc_sim.c | 42 mmc_cam_default_poll(struct cam_sim *sim) in mmc_cam_default_poll() argument 46 mmc_sim = cam_sim_softc(sim); in mmc_cam_default_poll() 89 mmc_cam_sim_default_action(struct cam_sim *sim, union ccb *ccb) in mmc_cam_sim_default_action() argument 95 mmc_sim = cam_sim_softc(sim); in mmc_cam_sim_default_action() 112 sim, mmc.host_max_data); in mmc_cam_sim_default_action() 200 mmc_sim->sim = cam_sim_alloc(mmc_cam_sim_default_action, in mmc_cam_sim_alloc() 205 if (mmc_sim->sim == NULL) { in mmc_cam_sim_alloc() 212 if (xpt_bus_register(mmc_sim->sim, dev, 0) != 0) { in mmc_cam_sim_alloc() 214 cam_sim_free(mmc_sim->sim, FALSE); in mmc_cam_sim_alloc() 234 if (mmc_sim->sim != NULL) { in mmc_cam_sim_free() [all …]
|
/freebsd/sys/dev/mfi/ |
H A D | mfi_cam.c | 77 struct cam_sim *sim; member 142 sc->sim = cam_sim_alloc(mfip_cam_action, mfip_cam_poll, "mfi", sc, in mfip_attach() 145 if (sc->sim == NULL) { in mfip_attach() 155 if (xpt_bus_register(sc->sim, dev, 0) != 0) { in mfip_attach() 157 cam_sim_free(sc->sim, FALSE); in mfip_attach() 158 sc->sim = NULL; in mfip_attach() 188 if (sc->sim != NULL) { in mfip_detach() 190 xpt_bus_deregister(cam_sim_path(sc->sim)); in mfip_detach() 191 cam_sim_free(sc->sim, FALSE); in mfip_detach() 192 sc->sim = NULL; in mfip_detach() [all …]
|
/freebsd/sys/dev/nvme/ |
H A D | nvme_sim.c | 49 static void nvme_sim_action(struct cam_sim *sim, union ccb *ccb); 50 static void nvme_sim_poll(struct cam_sim *sim); 52 #define sim2softc(sim) ((struct nvme_sim_softc *)cam_sim_softc(sim)) argument 53 #define sim2ctrlr(sim) (sim2softc(sim)->s_ctrlr) argument 85 nvme_sim_nvmeio(struct cam_sim *sim, union ccb *ccb) in nvme_sim_nvmeio() argument 93 ctrlr = sim2ctrlr(sim); in nvme_sim_nvmeio() 143 nvme_sim_action(struct cam_sim *sim, union ccb *ccb) in nvme_sim_action() argument 151 ctrlr = sim2ctrlr(sim); in nvme_sim_action() 191 cpi->bus_id = cam_sim_bus(sim); in nvme_sim_action() 195 strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in nvme_sim_action() [all …]
|
/freebsd/sys/dev/isci/ |
H A D | isci_controller.c | 56 void isci_action(struct cam_sim *sim, union ccb *ccb); 57 void isci_poll(struct cam_sim *sim); 247 controller->sim = NULL; in isci_controller_construct() 385 xpt_freeze_simq(controller->sim, 1); in isci_controller_initialize() 584 xpt_release_simq(isci_controller->sim, TRUE); in isci_controller_domain_discovery_complete() 619 controller->sim = cam_sim_alloc(isci_action, isci_poll, "isci", in isci_controller_attach_to_cam() 623 if(controller->sim == NULL) { in isci_controller_attach_to_cam() 629 if(xpt_bus_register(controller->sim, parent, controller->index) in isci_controller_attach_to_cam() 632 cam_sim_free(controller->sim, TRUE); in isci_controller_attach_to_cam() 638 cam_sim_path(controller->sim), CAM_TARGET_WILDCARD, in isci_controller_attach_to_cam() [all …]
|
/freebsd/sys/dev/aacraid/ |
H A D | aacraid_cam.c | 95 struct cam_sim *sim; member 168 struct aac_sim *sim; in aac_cam_rescan() local 174 TAILQ_FOREACH(sim, &sc->aac_sim_tqh, sim_link) { in aac_cam_rescan() 175 camsc = sim->aac_cam; in aac_cam_rescan() 188 cam_sim_path(camsc->sim), in aac_cam_rescan() 211 xpt_release_simq(camsc->sim, 1); in aac_cam_event() 253 xpt_bus_deregister(cam_sim_path(camsc->sim)); in aac_cam_detach() 254 cam_sim_free(camsc->sim, /*free_devq*/TRUE); in aac_cam_detach() 270 struct cam_sim *sim; in aac_cam_attach() local 287 sim = aac_sim_alloc(aac_cam_action, aac_cam_poll, "aacraidp", camsc, in aac_cam_attach() [all …]
|
/freebsd/sys/dev/smartpqi/ |
H A D | smartpqi_cam.c | 36 update_sim_properties(struct cam_sim *sim, struct ccb_pathinq *cpi) in update_sim_properties() argument 40 cam_sim_softc(sim); in update_sim_properties() 59 strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN-1); in update_sim_properties() 61 cpi->unit_number = cam_sim_unit(sim); in update_sim_properties() 62 cpi->bus_id = cam_sim_bus(sim); in update_sim_properties() 124 cam_sim_path(softs->os_specific.sim), in os_add_device() 150 cam_sim_path(softs->os_specific.sim), in os_remove_device() 709 cam_sim_path(softs->os_specific.sim), target, lun); in smartpqi_lun_rescan() 805 pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) in pqisrc_io_start() argument 810 cam_sim_softc(sim); in pqisrc_io_start() [all …]
|
/freebsd/tools/tools/vhba/ |
H A D | vhba.c | 48 …vhba->sim = cam_sim_alloc(vhba_action, vhba_poll, VHBA_MOD, vhba, 0, &vhba->lock, VHBA_MAXCMDS, VH… in vhba_attach() 49 if (vhba->sim == NULL) { in vhba_attach() 55 if (xpt_bus_register(vhba->sim, 0, 0) != CAM_SUCCESS) { in vhba_attach() 56 cam_sim_free(vhba->sim, TRUE); in vhba_attach() 71 xpt_bus_deregister(cam_sim_path(vhba->sim)); in vhba_detach() 72 cam_sim_free(vhba->sim, TRUE); in vhba_detach() 76 vhba_poll(struct cam_sim *sim) in vhba_poll() argument 78 vhba_softc_t *vhba = cam_sim_softc(sim); in vhba_poll() 83 vhba_action(struct cam_sim *sim, union ccb *ccb) in vhba_action() argument 88 vhba = cam_sim_softc(sim); in vhba_action() [all …]
|
/freebsd/sys/dev/tws/ |
H A D | tws_cam.c | 47 static void tws_action(struct cam_sim *sim, union ccb *ccb); 48 static void tws_poll(struct cam_sim *sim); 153 sc->sim = cam_sim_alloc(tws_action, tws_poll, "tws", sc, in tws_cam_attach() 158 if (sc->sim == NULL) { in tws_cam_attach() 164 if (xpt_bus_register(sc->sim, in tws_cam_attach() 167 cam_sim_free(sc->sim, TRUE); /* passing true will free the devq */ in tws_cam_attach() 168 sc->sim = NULL; /* so cam_detach will not try to free it */ in tws_cam_attach() 173 if (xpt_create_path(&sc->path, NULL, cam_sim_path(sc->sim), in tws_cam_attach() 176 xpt_bus_deregister(cam_sim_path(sc->sim)); in tws_cam_attach() 178 cam_sim_free(sc->sim, TRUE); in tws_cam_attach() [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/arm/freescale/ |
H A D | fsl,imx7ulp-sim.txt | 9 - compatible: Should be "fsl,imx7ulp-sim". 13 sim: sim@410a3000 { 14 compatible = "fsl,imx7ulp-sim", "syscon";
|
/freebsd/sys/cam/ctl/ |
H A D | ctl_frontend_cam_sim.c | 74 struct cam_sim *sim; member 93 static void cfcs_poll(struct cam_sim *sim); 98 void cfcs_action(struct cam_sim *sim, union ccb *ccb); 177 softc->sim = cam_sim_alloc(cfcs_action, cfcs_poll, softc->port_name, in cfcs_init() 180 if (softc->sim == NULL) { in cfcs_init() 186 if (xpt_bus_register(softc->sim, NULL, 0) != CAM_SUCCESS) { in cfcs_init() 193 cam_sim_path(softc->sim), in cfcs_init() 197 xpt_bus_deregister(cam_sim_path(softc->sim)); in cfcs_init() 205 if (softc->sim) in cfcs_init() 206 cam_sim_free(softc->sim, /*free_devq*/ TRUE); in cfcs_init() [all …]
|
/freebsd/sys/contrib/device-tree/src/powerpc/ |
H A D | iss4xx.dts | 34 model = "PowerPC,4xx"; // real CPU changed in sim 38 i-cache-line-size = <32>; // may need fixup in sim 39 d-cache-line-size = <32>; // may need fixup in sim 40 i-cache-size = <32768>; /* may need fixup in sim */ 41 d-cache-size = <32768>; /* may need fixup in sim */ 109 compatible = "ibm,iss-sim-block-device";
|
/freebsd/sys/dev/ata/ |
H A D | ata-all.c | 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() [all …]
|
/freebsd/sys/dev/mrsas/ |
H A D | mrsas_cam.c | 58 int mrsas_find_io_type(struct cam_sim *sim, union ccb *ccb); 60 int mrsas_bus_scan_sim(struct mrsas_softc *sc, struct cam_sim *sim); 72 union ccb *ccb, struct cam_sim *sim, u_int8_t fp_possible); 91 static void mrsas_freeze_simq(struct mrsas_mpt_cmd *cmd, struct cam_sim *sim); 92 static void mrsas_cam_poll(struct cam_sim *sim); 93 static void mrsas_action(struct cam_sim *sim, union ccb *ccb); 104 mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, 262 mrsas_action(struct cam_sim *sim, union ccb *ccb) in mrsas_action() argument 264 struct mrsas_softc *sc = (struct mrsas_softc *)cam_sim_softc(sim); in mrsas_action() 287 if (cam_sim_bus(sim) == 1 && in mrsas_action() [all …]
|
/freebsd/sys/contrib/device-tree/src/arm64/qcom/ |
H A D | msm8916-thwc-ufi001c.dts | 44 sim_ctrl_default: sim-ctrl-default-state { 52 sim-en-pins { 59 sim-sel-pins {
|