Lines Matching refs:ccb

56 static void	ahc_action(struct cam_sim *sim, union ccb *ccb);
68 union ccb *ccb);
225 xpt_action((union ccb *)&csa);
266 xpt_action((union ccb *)&csa);
318 union ccb *ccb;
323 ccb = scb->io_ctx;
340 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
343 if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
351 if (ccb->ccb_h.func_code == XPT_CONT_TARGET_IO) {
360 ccb_path = ccb->ccb_h.path;
364 if ((ccb->ccb_h.flags & CAM_SEND_STATUS) != 0) {
368 xpt_print_path(ccb->ccb_h.path);
371 aic_freeze_ccb(ccb);
376 ccb->ccb_h.status |= CAM_REQ_CMP;
377 ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
379 xpt_done(ccb);
411 ccb->ccb_h.status);
417 ccb->ccb_h.status |= CAM_REQ_CMP;
429 memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
430 memcpy(&ccb->csio.sense_data,
433 - ccb->csio.sense_resid);
436 ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
438 xpt_done(ccb);
442 ahc_action(struct cam_sim *sim, union ccb *ccb)
449 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ahc_action\n"));
453 target_id = ccb->ccb_h.target_id;
456 switch (ccb->ccb_h.func_code) {
464 status = ahc_find_tmode_devs(ahc, sim, ccb, &tstate,
468 if (ccb->ccb_h.func_code == XPT_CONT_TARGET_IO) {
473 ccb->ccb_h.status = status;
474 xpt_done(ccb);
478 if (ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) {
480 SLIST_INSERT_HEAD(&lstate->accept_tios, &ccb->ccb_h,
482 ccb->ccb_h.status = CAM_REQ_INPROG;
494 target_id = ccb->csio.init_id;
504 && (ccb->ccb_h.func_code == XPT_SCSI_IO
505 || ccb->ccb_h.func_code == XPT_RESET_DEV)) {
506 ccb->ccb_h.status = CAM_PROVIDE_FAIL;
507 xpt_done(ccb);
518 ccb->ccb_h.status = CAM_REQUEUE_REQ;
519 xpt_done(ccb);
525 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_SUBTRACE,
527 scb->io_ctx = ccb;
531 ccb->ccb_h.ccb_scb_ptr = scb;
538 hscb->lun = ccb->ccb_h.target_lun;
539 if (ccb->ccb_h.func_code == XPT_RESET_DEV) {
545 if (ccb->ccb_h.func_code == XPT_CONT_TARGET_IO) {
554 if ((ccb->ccb_h.flags & CAM_SEND_STATUS) != 0) {
557 ccb->csio.scsi_status;
559 if (ccb->ccb_h.flags & CAM_DIS_DISCONNECT)
562 tdata->initiator_tag = ccb->csio.tag_id;
564 if (ccb->ccb_h.flags & CAM_TAG_ACTION_VALID)
565 hscb->control |= ccb->csio.tag_action;
567 ahc_setup_data(ahc, sim, &ccb->csio, scb);
578 status = ahc_find_tmode_devs(ahc, sim, ccb, &tstate,
582 ccb->ccb_h.status = status;
583 xpt_done(ccb);
586 SLIST_INSERT_HEAD(&lstate->immed_notifies, &ccb->ccb_h,
588 ccb->ccb_h.status = CAM_REQ_INPROG;
593 ahc_handle_en_lun(ahc, sim, ccb);
594 xpt_done(ccb);
598 ahc_abort_ccb(ahc, sim, ccb);
613 cts = &ccb->cts;
646 ccb->ccb_h.status = CAM_REQ_INVALID;
647 xpt_done(ccb);
726 ccb->ccb_h.status = CAM_REQ_CMP;
727 xpt_done(ccb);
735 SIM_CHANNEL(ahc, sim), &ccb->cts);
736 xpt_done(ccb);
746 aic_calc_geometry(&ccb->ccg, extended);
747 xpt_done(ccb);
761 ccb->ccb_h.status = CAM_REQ_CMP;
762 xpt_done(ccb);
767 ccb->ccb_h.status = CAM_REQ_INVALID;
768 xpt_done(ccb);
772 struct ccb_pathinq *cpi = &ccb->cpi;
815 xpt_done(ccb);
819 ccb->ccb_h.status = CAM_PROVIDE_FAIL;
820 xpt_done(ccb);
932 union ccb *ccb;
939 ccb = scb->io_ctx;
950 xpt_done(ccb);
981 if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
988 if (ccb->ccb_h.func_code == XPT_CONT_TARGET_IO) {
996 if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT)
1012 && (ccb->csio.dxfer_len & 0x1) != 0
1013 && (ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) {
1023 xpt_done(ccb);
1053 xpt_done(ccb);
1069 && (ccb->ccb_h.flags & CAM_DIS_DISCONNECT) == 0)
1072 if ((ccb->ccb_h.flags & CAM_NEGOTIATE) != 0
1085 ccb->ccb_h.status |= CAM_SIM_QUEUED;
1157 xpt_done((union ccb *)csio);
1185 (union ccb *)csio,
1202 ahc_abort_ccb(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
1204 union ccb *abort_ccb;
1206 abort_ccb = ccb->cab.abort_ccb;
1221 ccb->ccb_h.status = status;
1263 ccb->ccb_h.status = CAM_REQ_CMP;
1267 ccb->ccb_h.status = CAM_PATH_INVALID;
1275 ccb->ccb_h.status = CAM_UA_ABORT;
1278 ccb->ccb_h.status = CAM_REQ_INVALID;
1281 xpt_done(ccb);