Lines Matching refs:start_ccb
2511 xpt_action(union ccb *start_ccb) in xpt_action() argument
2514 CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, in xpt_action()
2515 ("xpt_action: func %#x %s\n", start_ccb->ccb_h.func_code, in xpt_action()
2516 xpt_action_name(start_ccb->ccb_h.func_code))); in xpt_action()
2523 KASSERT((start_ccb->ccb_h.func_code & XPT_FC_QUEUED) == 0 || in xpt_action()
2524 start_ccb->ccb_h.pinfo.priority != CAM_PRIORITY_NONE, in xpt_action()
2527 start_ccb->ccb_h.status = CAM_REQ_INPROG; in xpt_action()
2528 (*(start_ccb->ccb_h.path->bus->xport->ops->action))(start_ccb); in xpt_action()
2532 xpt_action_default(union ccb *start_ccb) in xpt_action_default() argument
2538 path = start_ccb->ccb_h.path; in xpt_action_default()
2540 ("xpt_action_default: func %#x %s\n", start_ccb->ccb_h.func_code, in xpt_action_default()
2541 xpt_action_name(start_ccb->ccb_h.func_code))); in xpt_action_default()
2543 switch (start_ccb->ccb_h.func_code) { in xpt_action_default()
2566 && start_ccb->ccb_h.target_lun < 8 in xpt_action_default()
2567 && (start_ccb->ccb_h.flags & CAM_CDB_POINTER) == 0) { in xpt_action_default()
2568 start_ccb->csio.cdb_io.cdb_bytes[1] |= in xpt_action_default()
2569 start_ccb->ccb_h.target_lun << 5; in xpt_action_default()
2571 start_ccb->csio.scsi_status = SCSI_STATUS_OK; in xpt_action_default()
2576 start_ccb->csio.sense_resid = 0; in xpt_action_default()
2577 start_ccb->csio.resid = 0; in xpt_action_default()
2580 if (start_ccb->ccb_h.func_code == XPT_ATA_IO) in xpt_action_default()
2581 start_ccb->ataio.resid = 0; in xpt_action_default()
2596 cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb); in xpt_action_default()
2604 if (start_ccb->ccg.block_size == 0 in xpt_action_default()
2605 || start_ccb->ccg.volume_size == 0) { in xpt_action_default()
2606 start_ccb->ccg.cylinders = 0; in xpt_action_default()
2607 start_ccb->ccg.heads = 0; in xpt_action_default()
2608 start_ccb->ccg.secs_per_track = 0; in xpt_action_default()
2609 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
2617 abort_ccb = start_ccb->cab.abort_ccb; in xpt_action_default()
2633 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
2649 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
2659 start_ccb->ccb_h.status = CAM_UA_ABORT; in xpt_action_default()
2690 ("Calling sim->sim_action(): func=%#x\n", start_ccb->ccb_h.func_code)); in xpt_action_default()
2691 (*(sim->sim_action))(sim, start_ccb); in xpt_action_default()
2693 ("sim->sim_action returned: status=%#x\n", start_ccb->ccb_h.status)); in xpt_action_default()
2698 start_ccb->cpis.last_reset = path->bus->last_reset; in xpt_action_default()
2699 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
2707 start_ccb->ccb_h.status = CAM_DEV_NOT_THERE; in xpt_action_default()
2711 cgd = &start_ccb->cgd; in xpt_action_default()
2727 struct ccb_getdevstats *cgds = &start_ccb->cgds; in xpt_action_default()
2764 cgdl = &start_ccb->cgdl; in xpt_action_default()
2814 cdm = &start_ccb->cdm; in xpt_action_default()
2864 start_ccb->ccb_h.status = CAM_REQ_CMP_ERR; in xpt_action_default()
2866 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
2877 csa = &start_ccb->csa; in xpt_action_default()
2923 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
2931 crs = &start_ccb->crs; in xpt_action_default()
2958 start_ccb->ccb_h.flags &= ~CAM_DEV_QFREEZE; in xpt_action_default()
2961 start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; in xpt_action_default()
2978 start_ccb->ccb_h.flags &= ~CAM_DEV_QFREEZE; in xpt_action_default()
2981 start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; in xpt_action_default()
2988 start_ccb->ccb_h.flags &= ~CAM_DEV_QFREEZE; in xpt_action_default()
2991 start_ccb->ccb_h.flags |= CAM_DEV_QFREEZE; in xpt_action_default()
2996 if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) == 0) in xpt_action_default()
2998 start_ccb->crs.qfrozen_cnt = dev->ccbq.queue.qfrozen_cnt; in xpt_action_default()
2999 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
3006 if (start_ccb->cdbg.flags & ~(CAM_DEBUG_COMPILE)) { in xpt_action_default()
3007 start_ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; in xpt_action_default()
3017 if (start_ccb->cdbg.flags != CAM_DEBUG_NONE) { in xpt_action_default()
3019 start_ccb->ccb_h.path_id, in xpt_action_default()
3020 start_ccb->ccb_h.target_id, in xpt_action_default()
3021 start_ccb->ccb_h.target_lun) != in xpt_action_default()
3023 start_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; in xpt_action_default()
3025 cam_dflags = start_ccb->cdbg.flags; in xpt_action_default()
3026 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
3031 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
3035 if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) != 0) in xpt_action_default()
3037 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
3041 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
3042 xpt_done(start_ccb); in xpt_action_default()
3049 start_ccb->ccb_h.status = CAM_REQ_CMP; in xpt_action_default()
3051 STAILQ_INSERT_TAIL(&cam_async.cam_doneq, &start_ccb->ccb_h, sim_links.stqe); in xpt_action_default()
3052 start_ccb->ccb_h.pinfo.index = CAM_ASYNC_INDEX; in xpt_action_default()
3061 xpt_print(start_ccb->ccb_h.path, in xpt_action_default()
3063 start_ccb->ccb_h.func_code, in xpt_action_default()
3064 xpt_action_name(start_ccb->ccb_h.func_code)); in xpt_action_default()
3065 start_ccb->ccb_h.status = CAM_PROVIDE_FAIL; in xpt_action_default()
3066 if (start_ccb->ccb_h.func_code & XPT_FC_DEV_QUEUED) { in xpt_action_default()
3067 xpt_done(start_ccb); in xpt_action_default()
3073 start_ccb->ccb_h.func_code, in xpt_action_default()
3074 xpt_action_name(start_ccb->ccb_h.func_code), in xpt_action_default()
3075 start_ccb->ccb_h.status)); in xpt_action_default()
3099 xpt_poll_setup(union ccb *start_ccb) in xpt_poll_setup() argument
3106 timeout = start_ccb->ccb_h.timeout * 10; in xpt_poll_setup()
3107 sim = start_ccb->ccb_h.path->bus->sim; in xpt_poll_setup()
3109 dev = start_ccb->ccb_h.path->device; in xpt_poll_setup()
3133 xpt_pollwait(union ccb *start_ccb, uint32_t timeout) in xpt_pollwait() argument
3136 KASSERT(cam_sim_pollable(start_ccb->ccb_h.path->bus->sim), in xpt_pollwait()
3139 xpt_sim_poll(start_ccb->ccb_h.path->bus->sim); in xpt_pollwait()
3140 if ((start_ccb->ccb_h.status & CAM_STATUS_MASK) in xpt_pollwait()
3153 start_ccb->ccb_h.status = CAM_CMD_TIMEOUT; in xpt_pollwait()