| /freebsd-10-stable/usr.sbin/mptutil/ |
| D | mpt_cam.c | 64 union ccb ccb; in fetch_path_id() local 72 bzero(&ccb, sizeof(ccb)); in fetch_path_id() 74 ccb.ccb_h.func_code = XPT_DEV_MATCH; in fetch_path_id() 77 ccb.cdm.num_matches = 0; in fetch_path_id() 78 ccb.cdm.match_buf_len = bufsize; in fetch_path_id() 79 ccb.cdm.matches = calloc(1, bufsize); in fetch_path_id() 82 ccb.cdm.num_patterns = 1; in fetch_path_id() 83 ccb.cdm.pattern_buf_len = bufsize; in fetch_path_id() 84 ccb.cdm.patterns = calloc(1, bufsize); in fetch_path_id() 87 ccb.cdm.patterns[0].type = DEV_MATCH_BUS; in fetch_path_id() [all …]
|
| /freebsd-10-stable/lib/libcam/ |
| D | camlib.c | 66 cam_send_ccb(struct cam_device *device, union ccb *ccb) in cam_send_ccb() argument 68 return(ioctl(device->fd, CAMIOCOMMAND, ccb)); in cam_send_ccb() 74 union ccb * 77 union ccb *ccb; in cam_getccb() local 79 ccb = (union ccb *)malloc(sizeof(union ccb)); in cam_getccb() 80 if (ccb != NULL) { in cam_getccb() 81 bzero(&ccb->ccb_h, sizeof(struct ccb_hdr)); in cam_getccb() 82 ccb->ccb_h.path_id = dev->path_id; in cam_getccb() 83 ccb->ccb_h.target_id = dev->target_id; in cam_getccb() 84 ccb->ccb_h.target_lun = dev->target_lun; in cam_getccb() [all …]
|
| /freebsd-10-stable/sys/dev/aacraid/ |
| D | aacraid_cam.c | 110 static void aac_cam_action(struct cam_sim *, union ccb *); 118 static void aac_set_scsi_error(struct aac_softc *sc, union ccb *ccb, 122 static void aac_container_rw_command(struct cam_sim *, union ccb *, u_int8_t *); 123 static void aac_container_special_command(struct cam_sim *, union ccb *, 125 static void aac_passthrough_command(struct cam_sim *, union ccb *); 127 static u_int32_t aac_cam_reset_bus(struct cam_sim *, union ccb *); 128 static u_int32_t aac_cam_abort_ccb(struct cam_sim *, union ccb *); 129 static u_int32_t aac_cam_term_io(struct cam_sim *, union ccb *); 152 aac_set_scsi_error(struct aac_softc *sc, union ccb *ccb, u_int8_t status, in aac_set_scsi_error() argument 157 (struct scsi_sense_data_fixed *)&ccb->csio.sense_data; in aac_set_scsi_error() [all …]
|
| /freebsd-10-stable/sys/dev/isci/ |
| D | isci_io_request.c | 87 union ccb *ccb; in isci_io_request_complete() local 96 ccb = isci_request->ccb; in isci_io_request_complete() 97 csio = &ccb->csio; in isci_io_request_complete() 98 ccb->ccb_h.status &= ~CAM_STATUS_MASK; in isci_io_request_complete() 104 if (ccb->ccb_h.func_code == XPT_SMP_IO) { in isci_io_request_complete() 109 memcpy(ccb->smpio.smp_response, smp_response, in isci_io_request_complete() 110 ccb->smpio.smp_response_len); in isci_io_request_complete() 113 ccb->ccb_h.status |= CAM_REQ_CMP; in isci_io_request_complete() 117 ccb->ccb_h.status |= CAM_REQ_CMP; in isci_io_request_complete() 118 ccb->csio.resid = ccb->csio.dxfer_len - in isci_io_request_complete() [all …]
|
| /freebsd-10-stable/sys/dev/aac/ |
| D | aac_cam.c | 79 static void aac_cam_action(struct cam_sim *, union ccb *); 85 static u_int32_t aac_cam_reset_bus(struct cam_sim *, union ccb *); 86 static u_int32_t aac_cam_abort_ccb(struct cam_sim *, union ccb *); 87 static u_int32_t aac_cam_term_io(struct cam_sim *, union ccb *); 112 union ccb *ccb; in aac_cam_rescan() local 125 ccb = xpt_alloc_ccb_nowait(); in aac_cam_rescan() 126 if (ccb == NULL) { in aac_cam_rescan() 132 if (xpt_create_path(&ccb->ccb_h.path, NULL, in aac_cam_rescan() 135 xpt_free_ccb(ccb); in aac_cam_rescan() 140 xpt_rescan(ccb); in aac_cam_rescan() [all …]
|
| /freebsd-10-stable/sys/cam/ctl/ |
| D | ctl_frontend_cam_sim.c | 72 union ccb *ccb; member 104 void cfcs_action(struct cam_sim *sim, union ccb *ccb); 262 union ccb *ccb; in cfcs_onoffline() local 269 ccb = xpt_alloc_ccb_nowait(); in cfcs_onoffline() 270 if (ccb == NULL) { in cfcs_onoffline() 275 if (xpt_create_path(&ccb->ccb_h.path, NULL, in cfcs_onoffline() 279 xpt_free_ccb(ccb); in cfcs_onoffline() 282 xpt_rescan(ccb); in cfcs_onoffline() 311 union ccb *ccb; in cfcs_datamove() local 320 ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr; in cfcs_datamove() [all …]
|
| /freebsd-10-stable/sys/cam/ |
| D | cam_periph.c | 69 union ccb *done_ccb); 71 static int camperiphscsistatuserror(union ccb *ccb, 72 union ccb **orig_ccb, 80 static int camperiphscsisenseerror(union ccb *ccb, 81 union ccb **orig_ccb, 89 static void cam_periph_devctl_notify(union ccb *ccb); 694 union ccb ccb; in camperiphfree() local 699 ccb.ccb_h.func_code = XPT_GDEV_TYPE; in camperiphfree() 700 xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); in camperiphfree() 701 xpt_action(&ccb); in camperiphfree() [all …]
|
| /freebsd-10-stable/sbin/camcontrol/ |
| D | camcontrol.c | 386 union ccb *ccb; in getdevlist() local 390 ccb = cam_getccb(device); in getdevlist() 392 ccb->ccb_h.func_code = XPT_GDEVLIST; in getdevlist() 393 ccb->ccb_h.flags = CAM_DIR_NONE; in getdevlist() 394 ccb->ccb_h.retry_count = 1; in getdevlist() 395 ccb->cgdl.index = 0; in getdevlist() 396 ccb->cgdl.status = CAM_GDEVLIST_MORE_DEVS; in getdevlist() 397 while (ccb->cgdl.status == CAM_GDEVLIST_MORE_DEVS) { in getdevlist() 398 if (cam_send_ccb(device, ccb) < 0) { in getdevlist() 400 cam_freeccb(ccb); in getdevlist() [all …]
|
| /freebsd-10-stable/usr.bin/iscsictl/ |
| D | periphs.c | 67 union ccb ccb; in print_periphs() local 81 bzero(&ccb, sizeof(union ccb)); in print_periphs() 83 ccb.ccb_h.path_id = CAM_XPT_PATH_ID; in print_periphs() 84 ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; in print_periphs() 85 ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; in print_periphs() 87 ccb.ccb_h.func_code = XPT_DEV_MATCH; in print_periphs() 89 ccb.cdm.match_buf_len = bufsize; in print_periphs() 90 ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); in print_periphs() 91 if (ccb.cdm.matches == NULL) { in print_periphs() 96 ccb.cdm.num_matches = 0; in print_periphs() [all …]
|
| /freebsd-10-stable/sys/dev/ata/ |
| D | ata-all.c | 60 static void ataaction(struct cam_sim *sim, union ccb *ccb); 62 static void ata_cam_begin_transaction(device_t dev, union ccb *ccb); 65 static int ata_check_ids(device_t dev, union ccb *ccb); 264 union ccb *ccb; in ata_conn_event() local 272 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in ata_conn_event() 274 if (xpt_create_path(&ccb->ccb_h.path, NULL, in ata_conn_event() 277 xpt_free_ccb(ccb); in ata_conn_event() 280 xpt_rescan(ccb); in ata_conn_event() 444 request->u.atapi.saved_cmd : request->u.atapi.ccb[0]) { in ata_cmd2str() 730 ata_cam_begin_transaction(device_t dev, union ccb *ccb) in ata_cam_begin_transaction() argument [all …]
|
| /freebsd-10-stable/sys/dev/dpt/ |
| D | dpt_scsi.c | 150 static void dpt_action(struct cam_sim *sim, union ccb *ccb); 158 union ccb *ccb, u_int hba_stat, 253 LIST_REMOVE(&dccb->ccb->ccb_h, sim_links.le); in dptfreeccb() 255 dccb->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in dptfreeccb() 257 && (dccb->ccb->ccb_h.status & CAM_RELEASE_SIMQ) == 0) { in dptfreeccb() 258 dccb->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in dptfreeccb() 720 union ccb *ccb; in dptexecuteccb() local 724 ccb = dccb->ccb; in dptexecuteccb() 725 dpt = (struct dpt_softc *)ccb->ccb_h.ccb_dpt_ptr; in dptexecuteccb() 734 if (ccb->ccb_h.status == CAM_REQ_INPROG) { in dptexecuteccb() [all …]
|
| /freebsd-10-stable/sys/dev/twa/ |
| D | tw_osl_cam.c | 56 static TW_VOID twa_action(struct cam_sim *sim, union ccb *ccb); 60 union ccb *ccb); 197 tw_osli_execute_scsi(struct tw_osli_req_context *req, union ccb *ccb) in tw_osli_execute_scsi() argument 202 struct ccb_hdr *ccb_h = &(ccb->ccb_h); in tw_osli_execute_scsi() 203 struct ccb_scsiio *csio = &(ccb->csio); in tw_osli_execute_scsi() 213 xpt_done(ccb); in tw_osli_execute_scsi() 220 xpt_done(ccb); in tw_osli_execute_scsi() 231 xpt_done(ccb); in tw_osli_execute_scsi() 273 xpt_done(ccb); in tw_osli_execute_scsi() 294 xpt_done(ccb); in tw_osli_execute_scsi() [all …]
|
| /freebsd-10-stable/sys/dev/ahb/ |
| D | ahb.c | 82 struct ecb *ecb, union ccb *ccb); 88 static void ahbaction(struct cam_sim *sim, union ccb *ccb); 597 union ccb *ccb; in ahbhandleimmed() local 600 ccb = pending_ecb->ccb; in ahbhandleimmed() 602 if (ccb->ccb_h.target_id == target_id in ahbhandleimmed() 605 LIST_REMOVE(&ccb->ccb_h, sim_links.le); in ahbhandleimmed() 606 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) in ahbhandleimmed() 610 ccb->ccb_h.status = in ahbhandleimmed() 613 ccb->ccb_h.status = CAM_SCSI_BUS_RESET; in ahbhandleimmed() 615 ccb->ccb_h.status = CAM_BDR_SENT; in ahbhandleimmed() [all …]
|
| /freebsd-10-stable/sys/dev/mvs/ |
| D | mvs.c | 72 static void mvs_softreset(device_t dev, union ccb *ccb); 77 static void mvs_tfd_read(device_t dev, union ccb *ccb); 78 static void mvs_tfd_write(device_t dev, union ccb *ccb); 81 static void mvs_begin_transaction(device_t dev, union ccb *ccb); 91 static void mvs_process_read_log(device_t dev, union ccb *ccb); 92 static void mvs_process_request_sense(device_t dev, union ccb *ccb); 94 static void mvsaction(struct cam_sim *sim, union ccb *ccb); 440 slot->ccb = NULL; in mvs_slotsalloc() 603 union ccb *ccb; in mvs_phy_check_events() local 614 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in mvs_phy_check_events() [all …]
|
| /freebsd-10-stable/sys/powerpc/ps3/ |
| D | ps3cdrom.c | 82 union ccb *x_ccb; 134 static void ps3cdrom_action(struct cam_sim *sim, union ccb *ccb); 269 xpt_action((union ccb *) &csa); in ps3cdrom_attach() 337 ps3cdrom_action(struct cam_sim *sim, union ccb *ccb) in ps3cdrom_action() argument 346 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, in ps3cdrom_action() 347 ("function code 0x%02x\n", ccb->ccb_h.func_code)); in ps3cdrom_action() 349 switch (ccb->ccb_h.func_code) { in ps3cdrom_action() 351 if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG) in ps3cdrom_action() 354 if(ccb->ccb_h.target_id > 0) { in ps3cdrom_action() 355 ccb->ccb_h.status = CAM_TID_INVALID; in ps3cdrom_action() [all …]
|
| /freebsd-10-stable/sys/dev/advansys/ |
| D | adwcam.c | 90 static void adw_action(struct cam_sim *sim, union ccb *ccb); 131 LIST_REMOVE(&acb->ccb->ccb_h, sim_links.le); in adwfreeacb() 133 acb->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in adwfreeacb() 135 && (acb->ccb->ccb_h.status & CAM_RELEASE_SIMQ) == 0) { in adwfreeacb() 136 acb->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in adwfreeacb() 229 union ccb *ccb; in adwexecuteacb() local 233 ccb = acb->ccb; in adwexecuteacb() 234 adw = (struct adw_softc *)ccb->ccb_h.ccb_adw_ptr; in adwexecuteacb() 242 if (ccb->ccb_h.status == CAM_REQ_INPROG) { in adwexecuteacb() 243 xpt_freeze_devq(ccb->ccb_h.path, /*count*/1); in adwexecuteacb() [all …]
|
| D | advansys.c | 80 static void adv_action(struct cam_sim *sim, union ccb *ccb); 95 static __inline void adv_clear_state(struct adv_softc *adv, union ccb* ccb); 96 static void adv_clear_state_really(struct adv_softc *adv, union ccb* ccb); 133 adv_clear_state(struct adv_softc *adv, union ccb* ccb) in adv_clear_state() argument 136 adv_clear_state_really(adv, ccb); in adv_clear_state() 140 adv_clear_state_really(struct adv_softc *adv, union ccb* ccb) in adv_clear_state_really() argument 160 cinfo = (struct adv_ccb_info *)ccb->ccb_h.ccb_cinfo_ptr; in adv_clear_state_really() 181 ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in adv_clear_state_really() 194 adv_action(struct cam_sim *sim, union ccb *ccb) in adv_action() argument 198 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("adv_action\n")); in adv_action() [all …]
|
| /freebsd-10-stable/sys/dev/iscsi_initiator/ |
| D | isc_cam.c | 60 _inq(struct cam_sim *sim, union ccb *ccb) in _inq() argument 62 struct ccb_pathinq *cpi = &ccb->cpi; in _inq() 66 debug(3, "sid=%d target=%d lun=%d", sp->sid, ccb->ccb_h.target_id, ccb->ccb_h.target_lun); in _inq() 90 _scsi_encap(struct cam_sim *sim, union ccb *ccb) in _scsi_encap() argument 95 ret = scsi_encap(sim, ccb); in _scsi_encap() 100 ret = scsi_encap(sim, ccb); in _scsi_encap() 122 scan_callback(struct cam_periph *periph, union ccb *ccb) in scan_callback() argument 124 isc_session_t *sp = (isc_session_t *)ccb->ccb_h.spriv_ptr0; in scan_callback() 128 xpt_free_ccb(ccb); in scan_callback() 139 union ccb *ccb; in ic_scan() local [all …]
|
| /freebsd-10-stable/sys/dev/siis/ |
| D | siis.c | 70 static void siis_begin_transaction(device_t dev, union ccb *ccb); 75 static int siis_setup_fis(device_t dev, struct siis_cmd *ctp, union ccb *ccb, int tag); 88 static void siis_process_read_log(device_t dev, union ccb *ccb); 89 static void siis_process_request_sense(device_t dev, union ccb *ccb); 91 static void siisaction(struct cam_sim *sim, union ccb *ccb); 745 slot->ccb = NULL; in siis_slotsalloc() 811 union ccb *ccb; in siis_phy_check_events() local 822 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in siis_phy_check_events() 824 if (xpt_create_path(&ccb->ccb_h.path, NULL, in siis_phy_check_events() 827 xpt_free_ccb(ccb); in siis_phy_check_events() [all …]
|
| /freebsd-10-stable/sys/dev/ahci/ |
| D | ahciem.c | 57 static void ahciemaction(struct cam_sim *sim, union ccb *ccb); 347 ahci_check_ids(union ccb *ccb) in ahci_check_ids() argument 350 if (ccb->ccb_h.target_id != 0) { in ahci_check_ids() 351 ccb->ccb_h.status = CAM_TID_INVALID; in ahci_check_ids() 352 xpt_done(ccb); in ahci_check_ids() 355 if (ccb->ccb_h.target_lun != 0) { in ahci_check_ids() 356 ccb->ccb_h.status = CAM_LUN_INVALID; in ahci_check_ids() 357 xpt_done(ccb); in ahci_check_ids() 364 ahci_em_emulate_ses_on_led(device_t dev, union ccb *ccb) in ahci_em_emulate_ses_on_led() argument 374 buf = ccb->ataio.data_ptr; in ahci_em_emulate_ses_on_led() [all …]
|
| /freebsd-10-stable/sys/dev/mpt/ |
| D | mpt_cam.c | 115 static void mpt_action(struct cam_sim *, union ccb *); 144 static void mpt_target_start_io(struct mpt_softc *, union ccb *); 145 static cam_status mpt_abort_target_ccb(struct mpt_softc *, union ccb *); 147 static void mpt_scsi_tgt_status(struct mpt_softc *, union ccb *, request_t *, 1241 union ccb *ccb; in mpt_timeout() local 1245 ccb = (union ccb *)arg; in mpt_timeout() 1246 mpt = ccb->ccb_h.ccb_mpt_ptr; in mpt_timeout() 1249 req = ccb->ccb_h.ccb_req_ptr; in mpt_timeout() 1251 req->serno, ccb, req->ccb); in mpt_timeout() 1274 union ccb *ccb; in mpt_execute_req_a64() local [all …]
|
| /freebsd-10-stable/sys/dev/mrsas/ |
| D | mrsas_cam.c | 61 int mrsas_find_io_type(struct cam_sim *sim, union ccb *ccb); 66 struct mrsas_mpt_cmd *cmd, union ccb *ccb); 69 union ccb *ccb); 72 union ccb *ccb); 75 union ccb *ccb, struct cam_sim *sim, u_int8_t fp_possible); 78 union ccb *ccb, u_int32_t device_id, 91 u_int8_t cdb_len, struct IO_REQUEST_INFO *io_info, union ccb *ccb, 96 static void mrsas_action(struct cam_sim *sim, union ccb *ccb); 108 union ccb *ccb); 269 mrsas_action(struct cam_sim *sim, union ccb *ccb) in mrsas_action() argument [all …]
|
| /freebsd-10-stable/sys/dev/aic7xxx/ |
| D | aic79xx_osm.c | 60 static void ahd_action(struct cam_sim *sim, union ccb *ccb); 75 union ccb *ccb); 275 xpt_action((union ccb *)&csa); in ahd_attach() 316 union ccb *ccb; in ahd_done() local 321 ccb = scb->io_ctx; in ahd_done() 328 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { in ahd_done() 331 if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) in ahd_done() 340 if (ccb->ccb_h.func_code == XPT_CONT_TARGET_IO) { in ahd_done() 349 ccb_path = ccb->ccb_h.path; in ahd_done() 353 if ((ccb->ccb_h.flags & CAM_SEND_STATUS) != 0) { in ahd_done() [all …]
|
| /freebsd-10-stable/sys/cam/scsi/ |
| D | scsi_pass.c | 105 union ccb ccb; member 106 union ccb *alloced_ccb; 107 union ccb *user_ccb_ptr; 132 union ccb saved_ccb; 172 union ccb *done_ccb); 183 static int passerror(union ccb *ccb, u_int32_t cam_flags, 185 static int passsendccb(struct cam_periph *periph, union ccb *ccb, 186 union ccb *inccb); 595 xpt_action((union ccb *)&cpi); in passregister() 845 passstart(struct cam_periph *periph, union ccb *start_ccb) in passstart() [all …]
|
| /freebsd-10-stable/sys/dev/isp/ |
| D | isp_freebsd.c | 61 static void isp_action(struct cam_sim *, union ccb *); 142 xpt_action((union ccb *)&csa); in isp_attach_chan() 259 xpt_action((union ccb *)&csa); in isp_detach_chan() 714 static ISP_INLINE int isp_get_pcmd(ispsoftc_t *, union ccb *); 715 static ISP_INLINE void isp_free_pcmd(ispsoftc_t *, union ccb *); 718 isp_get_pcmd(ispsoftc_t *isp, union ccb *ccb) in isp_get_pcmd() argument 720 ISP_PCMD(ccb) = isp->isp_osinfo.pcmd_free; in isp_get_pcmd() 721 if (ISP_PCMD(ccb) == NULL) { in isp_get_pcmd() 724 isp->isp_osinfo.pcmd_free = ((struct isp_pcmd *)ISP_PCMD(ccb))->next; in isp_get_pcmd() 729 isp_free_pcmd(ispsoftc_t *isp, union ccb *ccb) in isp_free_pcmd() argument [all …]
|