Lines Matching defs:ccb

56 static TW_VOID	twa_action(struct cam_sim *sim, union ccb *ccb);
60 union ccb *ccb);
181 * Description: Build a fw cmd, based on a CAM style ccb, and
185 * ccb -- ptr to CAM style ccb
191 tw_osli_execute_scsi(struct tw_osli_req_context *req, union ccb *ccb)
196 struct ccb_hdr *ccb_h = &(ccb->ccb_h);
197 struct ccb_scsiio *csio = &(ccb->csio);
208 xpt_done(ccb);
216 xpt_done(ccb);
227 xpt_done(ccb);
269 xpt_done(ccb);
290 xpt_done(ccb);
300 * ccb -- ptr to CAM request
305 twa_action(struct cam_sim *sim, union ccb *ccb)
308 struct ccb_hdr *ccb_h = &(ccb->ccb_h);
319 * Freeze the simq to maintain ccb ordering. The next
320 * ccb that gets completed will unfreeze the simq.
324 xpt_done(ccb);
331 xpt_done(ccb);
338 req->orig_req = ccb;
339 if (tw_osli_execute_scsi(req, ccb))
347 xpt_done(ccb);
359 xpt_done(ccb);
370 xpt_done(ccb);
375 struct ccb_trans_settings *cts = &ccb->cts;
392 xpt_done(ccb);
398 cam_calc_geometry(&ccb->ccg, 1/* extended */);
399 xpt_done(ccb);
404 struct ccb_pathinq *path_inq = &ccb->cpi;
428 xpt_done(ccb);
435 xpt_done(ccb);
471 union ccb *ccb;
478 if ((ccb = xpt_alloc_ccb()) == NULL)
481 if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(sc->sim),
483 xpt_free_ccb(ccb);
488 xpt_rescan(ccb);
510 union ccb *ccb = (union ccb *)(req->orig_req);
513 ccb->ccb_h.status |= CAM_RELEASE_SIMQ;
529 union ccb *ccb = (union ccb *)(req->orig_req);
530 struct ccb_hdr *ccb_h = &(ccb->ccb_h);
590 union ccb *ccb = (union ccb *)(req->orig_req);
619 * When this ccb gets completed will unfreeze the simq.
621 ccb->ccb_h.status |= CAM_REQUEUE_REQ;
624 ccb->ccb_h.status = CAM_REQ_TOO_BIG;
626 ccb->ccb_h.status = CAM_REQ_CMP_ERR;
630 ccb->ccb_h.status = CAM_REQ_CMP;
633 ccb->ccb_h.status |= CAM_SEL_TIMEOUT;
635 ccb->ccb_h.status |= CAM_DEV_NOT_THERE;
637 ccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR;
639 ccb->ccb_h.status |= (CAM_REQUEUE_REQ | CAM_SCSI_BUS_RESET);
644 if (ccb->ccb_h.status == 0)
645 ccb->ccb_h.status = CAM_REQ_CMP_ERR;
648 ccb->csio.sense_len = scsi_req->sense_len;
649 ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
653 ccb->csio.scsi_status = scsi_req->scsi_status;
656 ccb->ccb_h.status &= ~CAM_SIM_QUEUED;
658 xpt_done(ccb);