| /dragonfly/usr.sbin/mptutil/ |
| HD | mpt_cam.c | 63 union ccb ccb; in fetch_path_id() local 71 bzero(&ccb, sizeof(ccb)); in fetch_path_id() 73 ccb.ccb_h.func_code = XPT_DEV_MATCH; in fetch_path_id() 76 ccb.cdm.num_matches = 0; in fetch_path_id() 77 ccb.cdm.match_buf_len = bufsize; in fetch_path_id() 78 ccb.cdm.matches = calloc(1, bufsize); in fetch_path_id() 81 ccb.cdm.num_patterns = 1; in fetch_path_id() 82 ccb.cdm.pattern_buf_len = bufsize; in fetch_path_id() 83 ccb.cdm.patterns = calloc(1, bufsize); in fetch_path_id() 86 ccb.cdm.patterns[0].type = DEV_MATCH_BUS; in fetch_path_id() [all …]
|
| /dragonfly/sys/dev/raid/aac/ |
| HD | aac_cam.c | 76 static void aac_cam_action(struct cam_sim *, union ccb *); 81 static void aac_bus_scan_cb(struct cam_periph *periph, union ccb *ccb); 83 static u_int32_t aac_cam_reset_bus(struct cam_sim *, union ccb *); 84 static u_int32_t aac_cam_abort_ccb(struct cam_sim *, union ccb *); 85 static u_int32_t aac_cam_term_io(struct cam_sim *, union ccb *); 110 union ccb *ccb; in aac_cam_rescan() local 123 ccb = xpt_alloc_ccb(); in aac_cam_rescan() 124 if (ccb == NULL) { in aac_cam_rescan() 130 if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, in aac_cam_rescan() 133 xpt_free_ccb(&ccb->ccb_h); in aac_cam_rescan() [all …]
|
| /dragonfly/sys/dev/disk/sili/ |
| HD | sili.c | 74 static int sili_core_timeout(struct sili_ccb *ccb, int really_error); 77 void sili_issue_pending_commands(struct sili_port *ap, struct sili_ccb *ccb); 86 static void sili_empty_done(struct sili_ccb *ccb); 87 static void sili_ata_cmd_done(struct sili_ccb *ccb); 122 struct sili_ccb *ccb; in sili_port_alloc() local 219 ccb = &ap->ap_ccbs[i]; in sili_port_alloc() 222 &ccb->ccb_dmamap); in sili_port_alloc() 238 callout_init(&ccb->ccb_timeout); in sili_port_alloc() 239 ccb->ccb_slot = i; in sili_port_alloc() 240 ccb->ccb_port = ap; in sili_port_alloc() [all …]
|
| HD | sili_cam.c | 64 static void sili_xpt_action(struct cam_sim *sim, union ccb *ccb); 67 struct ata_port *at, union ccb *ccb); 69 struct ata_port *at, union ccb *ccb); 71 struct ata_port *at, union ccb *ccb); 710 sili_cam_rescan_callback(struct cam_periph *periph, union ccb *ccb) in sili_cam_rescan_callback() argument 712 struct sili_port *ap = ccb->ccb_h.sim_priv.entries[0].ptr; in sili_cam_rescan_callback() 714 if (ccb->ccb_h.func_code == XPT_SCAN_BUS) { in sili_cam_rescan_callback() 723 xpt_free_ccb(&ccb->ccb_h); in sili_cam_rescan_callback() 730 union ccb *ccb; in sili_cam_rescan() local 748 ccb = xpt_alloc_ccb(); in sili_cam_rescan() [all …]
|
| /dragonfly/lib/libcam/ |
| HD | camlib.c | 69 cam_send_ccb(struct cam_device *device, union ccb *ccb) in cam_send_ccb() argument 71 return(ioctl(device->fd, CAMIOCOMMAND, ccb)); in cam_send_ccb() 77 union ccb * 80 union ccb *ccb; in cam_getccb() local 82 ccb = (union ccb *)malloc(sizeof(union ccb)); in cam_getccb() 83 if (ccb != NULL) { in cam_getccb() 84 bzero(&ccb->ccb_h, sizeof(struct ccb_hdr)); in cam_getccb() 85 ccb->ccb_h.path_id = dev->path_id; in cam_getccb() 86 ccb->ccb_h.target_id = dev->target_id; in cam_getccb() 87 ccb->ccb_h.target_lun = dev->target_lun; in cam_getccb() [all …]
|
| /dragonfly/sbin/camcontrol/ |
| HD | camcontrol.c | 280 union ccb *ccb; in getdevlist() local 284 ccb = cam_getccb(device); in getdevlist() 286 ccb->ccb_h.func_code = XPT_GDEVLIST; in getdevlist() 287 ccb->ccb_h.flags = CAM_DIR_NONE; in getdevlist() 288 ccb->ccb_h.retry_count = 1; in getdevlist() 289 ccb->cgdl.index = 0; in getdevlist() 290 ccb->cgdl.status = CAM_GDEVLIST_MORE_DEVS; in getdevlist() 291 while (ccb->cgdl.status == CAM_GDEVLIST_MORE_DEVS) { in getdevlist() 292 if (cam_send_ccb(device, ccb) < 0) { in getdevlist() 294 cam_freeccb(ccb); in getdevlist() [all …]
|
| /dragonfly/sys/dev/raid/dpt/ |
| HD | dpt_scsi.c | 144 static void dpt_action(struct cam_sim *sim, union ccb *ccb); 152 union ccb *ccb, u_int hba_stat, 243 LIST_REMOVE(&dccb->ccb->ccb_h, sim_links.le); in dptfreeccb() 245 dccb->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in dptfreeccb() 247 && (dccb->ccb->ccb_h.status & CAM_RELEASE_SIMQ) == 0) { in dptfreeccb() 248 dccb->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in dptfreeccb() 702 union ccb *ccb; in dptexecuteccb() local 706 ccb = dccb->ccb; in dptexecuteccb() 707 dpt = (struct dpt_softc *)ccb->ccb_h.ccb_dpt_ptr; in dptexecuteccb() 713 if (ccb->ccb_h.status == CAM_REQ_INPROG) { in dptexecuteccb() [all …]
|
| /dragonfly/sys/dev/raid/twa/ |
| HD | tw_osl_cam.c | 57 static TW_VOID twa_action(struct cam_sim *sim, union ccb *ccb); 59 static TW_VOID twa_bus_scan_cb(struct cam_periph *periph, union ccb *ccb); 62 union ccb *ccb); 213 tw_osli_execute_scsi(struct tw_osli_req_context *req, union ccb *ccb) in tw_osli_execute_scsi() argument 218 struct ccb_hdr *ccb_h = &(ccb->ccb_h); in tw_osli_execute_scsi() 219 struct ccb_scsiio *csio = &(ccb->csio); in tw_osli_execute_scsi() 230 xpt_done(ccb); in tw_osli_execute_scsi() 238 xpt_done(ccb); in tw_osli_execute_scsi() 249 xpt_done(ccb); in tw_osli_execute_scsi() 296 xpt_done(ccb); in tw_osli_execute_scsi() [all …]
|
| /dragonfly/sys/bus/cam/ |
| HD | cam_periph.c | 64 union ccb *done_ccb); 66 static int camperiphscsistatuserror(union ccb *ccb, 69 union ccb *save_ccb, 73 static int camperiphscsisenseerror(union ccb *ccb, 76 union ccb *save_ccb, 115 bcopy(saved + 1, ccb_h + 1, sizeof(union ccb) - sizeof(*saved)); in restore_ccb() 605 union ccb *ccb = xpt_alloc_ccb(); in camperiphfree() local 610 ccb->ccb_h.func_code = XPT_GDEV_TYPE; in camperiphfree() 611 xpt_setup_ccb(&ccb->ccb_h, periph->path, /*priority*/1); in camperiphfree() 612 xpt_action(ccb); in camperiphfree() [all …]
|
| /dragonfly/sys/dev/disk/ahci/ |
| HD | ahci.c | 72 void ahci_issue_pending_commands(struct ahci_port *ap, struct ahci_ccb *ccb); 82 static void ahci_empty_done(struct ahci_ccb *ccb); 83 static void ahci_ata_cmd_done(struct ahci_ccb *ccb); 245 struct ahci_ccb *ccb; in ahci_port_alloc() local 407 ccb = &ap->ap_ccbs[i]; in ahci_port_alloc() 410 &ccb->ccb_dmamap); in ahci_port_alloc() 418 callout_init_mp(&ccb->ccb_timeout); in ahci_port_alloc() 419 ccb->ccb_slot = i; in ahci_port_alloc() 420 ccb->ccb_port = ap; in ahci_port_alloc() 421 ccb->ccb_cmd_hdr = &hdr[i]; in ahci_port_alloc() [all …]
|
| HD | ahci_cam.c | 75 static void ahci_xpt_action(struct cam_sim *sim, union ccb *ccb); 78 struct ata_port *at, union ccb *ccb); 80 struct ata_port *at, union ccb *ccb); 82 struct ata_port *at, union ccb *ccb); 716 ahci_cam_rescan_callback(struct cam_periph *periph, union ccb *ccb) in ahci_cam_rescan_callback() argument 718 struct ahci_port *ap = ccb->ccb_h.sim_priv.entries[0].ptr; in ahci_cam_rescan_callback() 720 if (ccb->ccb_h.func_code == XPT_SCAN_BUS) { in ahci_cam_rescan_callback() 729 xpt_free_ccb(&ccb->ccb_h); in ahci_cam_rescan_callback() 736 union ccb *ccb; in ahci_cam_rescan() local 754 ccb = xpt_alloc_ccb(); in ahci_cam_rescan() [all …]
|
| /dragonfly/sys/dev/disk/advansys/ |
| HD | adwcam.c | 76 static __inline cam_status adwccbstatus(union ccb*); 89 static void adw_action(struct cam_sim *sim, union ccb *ccb); 101 adwccbstatus(union ccb* ccb) in adwccbstatus() argument 103 return (ccb->ccb_h.status & CAM_STATUS_MASK); in adwccbstatus() 133 LIST_REMOVE(&acb->ccb->ccb_h, sim_links.le); in adwfreeacb() 135 acb->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in adwfreeacb() 137 && (acb->ccb->ccb_h.status & CAM_RELEASE_SIMQ) == 0) { in adwfreeacb() 138 acb->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in adwfreeacb() 229 union ccb *ccb; in adwexecuteacb() local 233 ccb = acb->ccb; in adwexecuteacb() [all …]
|
| HD | advansys.c | 72 static void adv_action(struct cam_sim *sim, union ccb *ccb); 86 static __inline void adv_clear_state(struct adv_softc *adv, union ccb* ccb); 87 static void adv_clear_state_really(struct adv_softc *adv, union ccb* ccb); 123 adv_clear_state(struct adv_softc *adv, union ccb* ccb) in adv_clear_state() argument 126 adv_clear_state_really(adv, ccb); in adv_clear_state() 130 adv_clear_state_really(struct adv_softc *adv, union ccb* ccb) in adv_clear_state_really() argument 147 cinfo = (struct adv_ccb_info *)ccb->ccb_h.ccb_cinfo_ptr; in adv_clear_state_really() 167 ccb->ccb_h.status |= CAM_RELEASE_SIMQ; in adv_clear_state_really() 189 adv_action(struct cam_sim *sim, union ccb *ccb) in adv_action() argument 193 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("adv_action\n")); in adv_action() [all …]
|
| /dragonfly/sys/dev/disk/nata/ |
| HD | atapi-cam.c | 84 union ccb *ccb; member 102 static void atapi_action(struct cam_sim *, union ccb *); 113 static void cam_rescan_callback(struct cam_periph *, union ccb *); 116 static struct atapi_hcb *allocate_hcb(struct atapi_xpt_softc *, int, int, union ccb *); 338 xpt_action((union ccb *)csa); in setup_async_cb() 345 atapi_action(struct cam_sim *sim, union ccb *ccb) in atapi_action() argument 348 struct ccb_hdr *ccb_h = &ccb->ccb_h; in atapi_action() 358 struct ccb_pathinq *cpi = &ccb->cpi; in atapi_action() 386 ccb->ccb_h.status = CAM_DEV_NOT_THERE; in atapi_action() 387 xpt_done(ccb); in atapi_action() [all …]
|
| /dragonfly/sys/dev/raid/mrsas/ |
| HD | mrsas_cam.c | 57 int mrsas_ldio_inq(struct cam_sim *sim, union ccb *ccb); 62 union ccb *ccb); 64 union ccb *ccb, struct cam_sim *sim); 66 union ccb *ccb, u_int32_t device_id, 77 struct IO_REQUEST_INFO *io_info, union ccb *ccb, 82 static void mrsas_action(struct cam_sim *sim, union ccb *ccb); 87 union ccb *ccb); 88 static void mrsas_rescan_callback(struct cam_periph *, union ccb *); 239 static void mrsas_action(struct cam_sim *sim, union ccb *ccb) in mrsas_action() argument 242 struct ccb_hdr *ccb_h = &(ccb->ccb_h); in mrsas_action() [all …]
|
| /dragonfly/sys/dev/disk/mpt/ |
| HD | mpt_cam.c | 119 static void mpt_action(struct cam_sim *, union ccb *); 148 static void mpt_target_start_io(struct mpt_softc *, union ccb *); 149 static cam_status mpt_abort_target_ccb(struct mpt_softc *, union ccb *); 151 static void mpt_scsi_tgt_status(struct mpt_softc *, union ccb *, request_t *, 1236 union ccb *ccb; in mpt_timeout() local 1240 ccb = (union ccb *)arg; in mpt_timeout() 1241 mpt = ccb->ccb_h.ccb_mpt_ptr; in mpt_timeout() 1244 req = ccb->ccb_h.ccb_req_ptr; in mpt_timeout() 1246 req->serno, ccb, req->ccb); in mpt_timeout() 1269 union ccb *ccb; in mpt_execute_req_a64() local [all …]
|
| /dragonfly/sys/dev/disk/iscsi/initiator/ |
| HD | isc_cam.c | 98 _scan_callback(struct cam_periph *periph, union ccb *ccb) in _scan_callback() argument 100 isc_session_t *sp = (isc_session_t *)ccb->ccb_h.spriv_ptr0; in _scan_callback() 104 xpt_free_ccb(&ccb->ccb_h); in _scan_callback() 114 union ccb *ccb; in _scan_target() local 119 ccb = xpt_alloc_ccb(); in _scan_target() 122 xpt_setup_ccb(&ccb->ccb_h, sp->cam_path, 5/*priority (low)*/); in _scan_target() 123 ccb->ccb_h.func_code = XPT_SCAN_BUS; in _scan_target() 124 ccb->ccb_h.cbfcnp = _scan_callback; in _scan_target() 125 ccb->crcn.flags = CAM_FLAG_NONE; in _scan_target() 126 ccb->ccb_h.spriv_ptr0 = sp; in _scan_target() [all …]
|
| /dragonfly/sys/bus/u4b/storage/ |
| HD | umass.c | 304 typedef void (umass_callback_t)(struct umass_softc *sc, union ccb *ccb, 384 union ccb *ccb; member 469 uint32_t, uint32_t, umass_callback_t *, union ccb *); 477 static void umass_cam_action(struct cam_sim *, union ccb *); 479 static void umass_cam_cb(struct umass_softc *, union ccb *, uint32_t, 481 static void umass_cam_sense_cb(struct umass_softc *, union ccb *, uint32_t, 483 static void umass_cam_quirk_cb(struct umass_softc *, union ccb *, uint32_t, 491 static uint8_t umass_std_transform(struct umass_softc *, union ccb *, uint8_t 1147 union ccb *ccb; in umass_cancel_ccb() local 1153 ccb = sc->sc_transfer.ccb; in umass_cancel_ccb() [all …]
|
| /dragonfly/sys/bus/cam/scsi/ |
| HD | scsi_pass.c | 81 union ccb saved_ccb; 97 union ccb *done_ccb); 98 static int passerror(union ccb *ccb, u_int32_t cam_flags, 100 static int passsendccb(struct cam_periph *periph, union ccb *ccb, 101 union ccb *inccb); 400 passstart(struct cam_periph *periph, union ccb *start_ccb) in passstart() 418 passdone(struct cam_periph *periph, union ccb *done_ccb) in passdone() 464 union ccb *inccb; in passioctl() 465 union ccb *ccb; in passioctl() local 468 inccb = (union ccb *)addr; in passioctl() [all …]
|
| /dragonfly/sys/dev/disk/isp/ |
| HD | isp_freebsd.h | 140 #define ISP_PCMD(ccb) (ccb)->ccb_h.spriv_ptr1 argument 141 #define PISP_PCMD(ccb) ((struct isp_pcmd *)ISP_PCMD(ccb)) argument 416 #define XS_ISP(ccb) cam_sim_softc(xpt_path_sim((ccb)->ccb_h.path)) argument 417 #define XS_CHANNEL(ccb) cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path)) argument 418 #define XS_TGT(ccb) (ccb)->ccb_h.target_id argument 419 #define XS_LUN(ccb) (ccb)->ccb_h.target_lun argument 421 #define XS_CDBP(ccb) \ argument 422 (((ccb)->ccb_h.flags & CAM_CDB_POINTER)? \ 423 (ccb)->cdb_io.cdb_ptr : (ccb)->cdb_io.cdb_bytes) 425 #define XS_CDBLEN(ccb) (ccb)->cdb_len argument [all …]
|
| HD | isp_freebsd.c | 72 static void isp_action(struct cam_sim *, union ccb *); 121 xpt_action((union ccb *)csa); in isp_attach_chan() 304 xpt_action((union ccb *)csa); in isp_detach() 761 static ISP_INLINE int isp_get_pcmd(ispsoftc_t *, union ccb *); 762 static ISP_INLINE void isp_free_pcmd(ispsoftc_t *, union ccb *); 765 isp_get_pcmd(ispsoftc_t *isp, union ccb *ccb) in isp_get_pcmd() argument 767 ISP_PCMD(ccb) = isp->isp_osinfo.pcmd_free; in isp_get_pcmd() 768 if (ISP_PCMD(ccb) == NULL) { in isp_get_pcmd() 771 isp->isp_osinfo.pcmd_free = ((struct isp_pcmd *)ISP_PCMD(ccb))->next; in isp_get_pcmd() 776 isp_free_pcmd(ispsoftc_t *isp, union ccb *ccb) in isp_free_pcmd() argument [all …]
|
| /dragonfly/sys/dev/raid/hpt27xx/ |
| HD | hpt27xx_osm_bsd.c | 392 static void hpt_action(struct cam_sim *sim, union ccb *ccb); 424 union ccb *ccb = ext->ccb; in os_cmddone() local 428 callout_stop(ccb->ccb_h.timeout_ch); in os_cmddone() 432 ccb->ccb_h.status = CAM_REQ_CMP; in os_cmddone() 435 ccb->ccb_h.status = CAM_DEV_NOT_THERE; in os_cmddone() 438 ccb->ccb_h.status = CAM_BUSY; in os_cmddone() 441 ccb->ccb_h.status = CAM_REQ_INVALID; in os_cmddone() 444 ccb->ccb_h.status = CAM_SEL_TIMEOUT; in os_cmddone() 447 ccb->ccb_h.status = CAM_BUSY; in os_cmddone() 450 ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; in os_cmddone() [all …]
|
| /dragonfly/sys/dev/raid/mpr/ |
| HD | mpr_sas.c | 118 static void mprsas_action(struct cam_sim *sim, union ccb *ccb); 122 static void mprsas_action_scsiio(struct mprsas_softc *, union ccb *); 124 static void mprsas_action_resetdev(struct mprsas_softc *, union ccb *); 128 void mprsas_rescan_callback(struct cam_periph *, union ccb *); 136 union ccb *done_ccb); 144 static void mprsas_send_smpcmd(struct mprsas_softc *sassc, union ccb *ccb, 146 static void mprsas_action_smpio(struct mprsas_softc *sassc, union ccb *ccb); 273 mprsas_rescan_callback(struct cam_periph *periph, union ccb *ccb) in mprsas_rescan_callback() argument 275 if (ccb->ccb_h.status != CAM_REQ_CMP) in mprsas_rescan_callback() 277 ccb->ccb_h.status); in mprsas_rescan_callback() [all …]
|
| /dragonfly/sys/dev/raid/mps/ |
| HD | mps_sas.c | 143 static void mpssas_action(struct cam_sim *sim, union ccb *ccb); 148 struct mps_command *cm, union ccb *ccb); 149 static void mpssas_action_scsiio(struct mpssas_softc *, union ccb *); 151 static void mpssas_action_resetdev(struct mpssas_softc *, union ccb *); 154 static void mpssas_send_smpcmd(struct mpssas_softc *sassc, union ccb *ccb, 156 static void mpssas_action_smpio(struct mpssas_softc *sassc, union ccb *ccb); 161 static void mpssas_rescan(struct mpssas_softc *sassc, union ccb *ccb); 162 static void mpssas_rescan_done(struct cam_periph *periph, union ccb *done_ccb); 169 static void mpssas_read_cap_done(struct cam_periph *periph, union ccb *done_ccb); 279 union ccb *ccb; in mpssas_rescan_target() local [all …]
|
| /dragonfly/sys/dev/raid/hptiop/ |
| HD | hptiop.c | 90 static void hptiop_bus_scan_cb(struct cam_periph *periph, union ccb *ccb); 144 static void hptiop_action(struct cam_sim *sim, union ccb *ccb); 331 union ccb *ccb; in hptiop_request_callback_itl() local 382 ccb = (union ccb *)srb->ccb; in hptiop_request_callback_itl() 383 if (ccb->ccb_h.flags & CAM_CDB_POINTER) in hptiop_request_callback_itl() 384 cdb = ccb->csio.cdb_io.cdb_ptr; in hptiop_request_callback_itl() 386 cdb = ccb->csio.cdb_io.cdb_bytes; in hptiop_request_callback_itl() 389 ccb->ccb_h.status = CAM_REQ_CMP; in hptiop_request_callback_itl() 395 switch (ccb->ccb_h.flags & CAM_DIR_MASK) { in hptiop_request_callback_itl() 408 ccb->ccb_h.status = CAM_REQ_CMP; in hptiop_request_callback_itl() [all …]
|