Lines Matching refs:ccb

82 	union ccb *x_ccb;
134 static void ps3cdrom_action(struct cam_sim *sim, union ccb *ccb);
269 xpt_action((union ccb *) &csa);
337 ps3cdrom_action(struct cam_sim *sim, union ccb *ccb)
346 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
347 ("function code 0x%02x\n", ccb->ccb_h.func_code));
349 switch (ccb->ccb_h.func_code) {
351 if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG)
354 if(ccb->ccb_h.target_id > 0) {
355 ccb->ccb_h.status = CAM_TID_INVALID;
359 if(ccb->ccb_h.target_lun > 0) {
360 ccb->ccb_h.status = CAM_LUN_INVALID;
368 xp->x_ccb = ccb;
373 ccb, ps3cdrom_transfer, xp, 0);
380 ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;
385 ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
389 struct ccb_trans_settings *cts = &ccb->cts;
397 ccb->ccb_h.status = CAM_REQ_CMP;
402 ccb->ccb_h.status = CAM_REQ_CMP;
405 cam_calc_geometry(&ccb->ccg, 1);
409 struct ccb_pathinq *cpi = &ccb->cpi;
436 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
438 ccb->ccb_h.func_code));
439 ccb->ccb_h.status = CAM_REQ_INVALID;
443 xpt_done(ccb);
472 union ccb *ccb;
489 ccb = xp->x_ccb;
490 cdb = (ccb->ccb_h.flags & CAM_CDB_POINTER) ?
491 ccb->csio.cdb_io.cdb_ptr :
492 ccb->csio.cdb_io.cdb_bytes;
494 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
499 ccb->csio.scsi_status = SCSI_STATUS_OK;
500 ccb->csio.resid = 0;
501 ccb->ccb_h.status = CAM_REQ_CMP;
503 ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
504 ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;
509 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
513 scsi_set_sense_data(&ccb->csio.sense_data,
520 ccb->csio.sense_len = SSD_FULL_SIZE;
521 ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR |
525 if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE)
526 ccb->csio.resid = ccb->csio.dxfer_len;
529 if (ccb->ccb_h.flags & CAM_DIR_IN)
539 xpt_done(ccb);
555 union ccb *ccb = xp->x_ccb;
569 ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;
570 xpt_done(ccb);
574 cdb = (ccb->ccb_h.flags & CAM_CDB_POINTER) ?
575 ccb->csio.cdb_io.cdb_ptr :
576 ccb->csio.cdb_io.cdb_bytes;
578 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
580 ccb->csio.cdb_len, ccb->csio.dxfer_len));
611 bcopy(cdb, atapi_cmd.pkt, ccb->csio.cdb_len);
613 if (ccb->ccb_h.flags & CAM_DIR_IN) {
615 atapi_cmd.proto = (ccb->csio.dxfer_len >= 2048) ?
617 } else if (ccb->ccb_h.flags & CAM_DIR_OUT) {
619 atapi_cmd.proto = (ccb->csio.dxfer_len >= 2048) ?
629 if (ccb->ccb_h.flags & CAM_DIR_OUT)
651 bzero(&ccb->csio.sense_data, sizeof(ccb->csio.sense_data));
653 scsi_set_sense_data(&ccb->csio.sense_data,
661 ccb->csio.sense_len = SSD_FULL_SIZE;
662 ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
663 ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID;
664 xpt_done(ccb);
666 CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE,
671 ccb->ccb_h.status |= CAM_SIM_QUEUED;