| /NextBSD/usr.sbin/mptutil/ |
| HD | 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 …]
|
| /NextBSD/sys/dev/isci/ |
| HD | isci_io_request.c | 87 union ccb *ccb; in isci_io_request_complete() local 95 ccb = isci_request->ccb; in isci_io_request_complete() 97 ccb->ccb_h.status &= ~CAM_STATUS_MASK; in isci_io_request_complete() 103 if (ccb->ccb_h.func_code == XPT_SMP_IO) { in isci_io_request_complete() 108 memcpy(ccb->smpio.smp_response, smp_response, in isci_io_request_complete() 109 ccb->smpio.smp_response_len); in isci_io_request_complete() 112 ccb->ccb_h.status |= CAM_REQ_CMP; in isci_io_request_complete() 116 ccb->ccb_h.status |= CAM_REQ_CMP; in isci_io_request_complete() 117 ccb->csio.resid = ccb->csio.dxfer_len - in isci_io_request_complete() 127 struct ccb_scsiio *csio = &ccb->csio; in isci_io_request_complete() [all …]
|
| /NextBSD/sys/dev/aacraid/ |
| HD | 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 …]
|
| /NextBSD/lib/libcam/ |
| HD | 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 …]
|
| /NextBSD/sys/dev/aac/ |
| HD | 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 …]
|
| /NextBSD/sbin/camcontrol/ |
| HD | camcontrol.c | 368 union ccb *ccb; in getdevlist() local 372 ccb = cam_getccb(device); in getdevlist() 374 ccb->ccb_h.func_code = XPT_GDEVLIST; in getdevlist() 375 ccb->ccb_h.flags = CAM_DIR_NONE; in getdevlist() 376 ccb->ccb_h.retry_count = 1; in getdevlist() 377 ccb->cgdl.index = 0; in getdevlist() 378 ccb->cgdl.status = CAM_GDEVLIST_MORE_DEVS; in getdevlist() 379 while (ccb->cgdl.status == CAM_GDEVLIST_MORE_DEVS) { in getdevlist() 380 if (cam_send_ccb(device, ccb) < 0) { in getdevlist() 382 cam_freeccb(ccb); in getdevlist() [all …]
|
| /NextBSD/sys/cam/ctl/ |
| HD | ctl_frontend_cam_sim.c | 72 union ccb *ccb; member 103 void cfcs_action(struct cam_sim *sim, union ccb *ccb); 222 xpt_action((union ccb *)&csa); in cfcs_init() 249 union ccb *ccb; in cfcs_onoffline() local 256 ccb = xpt_alloc_ccb_nowait(); in cfcs_onoffline() 257 if (ccb == NULL) { in cfcs_onoffline() 262 if (xpt_create_path(&ccb->ccb_h.path, NULL, in cfcs_onoffline() 266 xpt_free_ccb(ccb); in cfcs_onoffline() 269 xpt_rescan(ccb); in cfcs_onoffline() 298 union ccb *ccb; in cfcs_datamove() local [all …]
|
| /NextBSD/sys/cam/ |
| HD | 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, 683 union ccb ccb; in camperiphfree() local 688 ccb.ccb_h.func_code = XPT_GDEV_TYPE; in camperiphfree() 689 xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL); in camperiphfree() 690 xpt_action(&ccb); in camperiphfree() 691 arg = &ccb; in camperiphfree() [all …]
|
| HD | cam.c | 279 cam_error_string(union ccb *ccb, char *str, int str_len, in cam_error_string() argument 284 cam_error_string(struct cam_device *device, union ccb *ccb, char *str, in cam_error_string() 292 if ((ccb == NULL) in cam_error_string() 300 switch (ccb->ccb_h.func_code) { in cam_error_string() 350 xpt_path_string(ccb->csio.ccb_h.path, path_str, sizeof(path_str)); in cam_error_string() 359 switch (ccb->ccb_h.func_code) { in cam_error_string() 361 ata_command_sbuf(&ccb->ataio, &sb); in cam_error_string() 366 scsi_command_string(&ccb->csio, &sb); in cam_error_string() 368 scsi_command_string(device, &ccb->csio, &sb); in cam_error_string() 373 smp_command_sbuf(&ccb->smpio, &sb, path_str, 79 - in cam_error_string() [all …]
|
| /NextBSD/sys/dev/ata/ |
| HD | 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); 263 union ccb *ccb; in ata_conn_event() local 271 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in ata_conn_event() 273 if (xpt_create_path(&ccb->ccb_h.path, NULL, in ata_conn_event() 276 xpt_free_ccb(ccb); in ata_conn_event() 279 xpt_rescan(ccb); in ata_conn_event() 443 request->u.atapi.saved_cmd : request->u.atapi.ccb[0]) { in ata_cmd2str() 645 ata_cam_begin_transaction(device_t dev, union ccb *ccb) in ata_cam_begin_transaction() argument [all …]
|
| /NextBSD/sys/dev/dpt/ |
| HD | 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 …]
|
| /NextBSD/usr.bin/iscsictl/ |
| HD | periphs.c | 67 union ccb ccb; in print_periphs() local 82 bzero(&ccb, sizeof(union ccb)); in print_periphs() 84 ccb.ccb_h.path_id = CAM_XPT_PATH_ID; in print_periphs() 85 ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; in print_periphs() 86 ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; in print_periphs() 88 ccb.ccb_h.func_code = XPT_DEV_MATCH; in print_periphs() 90 ccb.cdm.match_buf_len = bufsize; in print_periphs() 91 ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); in print_periphs() 92 if (ccb.cdm.matches == NULL) { in print_periphs() 97 ccb.cdm.num_matches = 0; in print_periphs() [all …]
|
| /NextBSD/sys/dev/twa/ |
| HD | 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() 214 xpt_done(ccb); in tw_osli_execute_scsi() 222 xpt_done(ccb); in tw_osli_execute_scsi() 233 xpt_done(ccb); in tw_osli_execute_scsi() 275 xpt_done(ccb); in tw_osli_execute_scsi() 296 xpt_done(ccb); in tw_osli_execute_scsi() [all …]
|
| /NextBSD/sys/dev/ahb/ |
| HD | ahb.c | 82 struct ecb *ecb, union ccb *ccb); 88 static void ahbaction(struct cam_sim *sim, union ccb *ccb); 596 union ccb *ccb; in ahbhandleimmed() local 599 ccb = pending_ecb->ccb; in ahbhandleimmed() 601 if (ccb->ccb_h.target_id == target_id in ahbhandleimmed() 604 LIST_REMOVE(&ccb->ccb_h, sim_links.le); in ahbhandleimmed() 605 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) in ahbhandleimmed() 609 ccb->ccb_h.status = in ahbhandleimmed() 612 ccb->ccb_h.status = CAM_SCSI_BUS_RESET; in ahbhandleimmed() 614 ccb->ccb_h.status = CAM_BDR_SENT; in ahbhandleimmed() [all …]
|
| /NextBSD/sys/dev/mvs/ |
| HD | 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); 439 slot->ccb = NULL; in mvs_slotsalloc() 602 union ccb *ccb; in mvs_phy_check_events() local 613 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in mvs_phy_check_events() [all …]
|
| /NextBSD/sys/powerpc/ps3/ |
| HD | 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 …]
|
| /NextBSD/sys/dev/mrsas/ |
| HD | 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, struct cam_sim *sim); 75 union ccb *ccb, u_int32_t device_id, 88 u_int8_t cdb_len, struct IO_REQUEST_INFO *io_info, union ccb *ccb, 93 static void mrsas_action(struct cam_sim *sim, union ccb *ccb); 100 union ccb *ccb); 253 mrsas_action(struct cam_sim *sim, union ccb *ccb) in mrsas_action() argument 256 struct ccb_hdr *ccb_h = &(ccb->ccb_h); in mrsas_action() [all …]
|
| /NextBSD/sys/dev/advansys/ |
| HD | 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 …]
|
| HD | 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 …]
|
| /NextBSD/sys/dev/iscsi_initiator/ |
| HD | 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=%jx", sp->sid, ccb->ccb_h.target_id, (uintmax_t)ccb->ccb_h.target_l… 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 …]
|
| /NextBSD/sys/dev/siis/ |
| HD | 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); 746 slot->ccb = NULL; in siis_slotsalloc() 812 union ccb *ccb; in siis_phy_check_events() local 823 if ((ccb = xpt_alloc_ccb_nowait()) == NULL) in siis_phy_check_events() 825 if (xpt_create_path(&ccb->ccb_h.path, NULL, in siis_phy_check_events() 828 xpt_free_ccb(ccb); in siis_phy_check_events() [all …]
|
| /NextBSD/sys/dev/ahci/ |
| HD | 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 …]
|
| /NextBSD/sys/dev/mpt/ |
| HD | 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 *, 1230 union ccb *ccb; in mpt_timeout() local 1234 ccb = (union ccb *)arg; in mpt_timeout() 1235 mpt = ccb->ccb_h.ccb_mpt_ptr; in mpt_timeout() 1238 req = ccb->ccb_h.ccb_req_ptr; in mpt_timeout() 1240 req->serno, ccb, req->ccb); in mpt_timeout() 1263 union ccb *ccb; in mpt_execute_req_a64() local [all …]
|
| /NextBSD/sys/dev/aic7xxx/ |
| HD | 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 …]
|
| HD | aic7xxx_osm.c | 56 static void ahc_action(struct cam_sim *sim, union ccb *ccb); 68 union ccb *ccb); 225 xpt_action((union ccb *)&csa); in ahc_attach() 266 xpt_action((union ccb *)&csa); in ahc_attach() 318 union ccb *ccb; in ahc_done() local 323 ccb = scb->io_ctx; in ahc_done() 340 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { in ahc_done() 343 if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) in ahc_done() 351 if (ccb->ccb_h.func_code == XPT_CONT_TARGET_IO) { in ahc_done() 360 ccb_path = ccb->ccb_h.path; in ahc_done() [all …]
|