Lines Matching refs:ccb
173 #define ISP_PCMD(ccb) (ccb)->ccb_h.spriv_ptr1 argument
174 #define PISP_PCMD(ccb) ((struct isp_pcmd *)ISP_PCMD(ccb)) argument
444 #define XS_ISP(ccb) cam_sim_softc(xpt_path_sim((ccb)->ccb_h.path)) argument
445 #define XS_CHANNEL(ccb) cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path)) argument
446 #define XS_TGT(ccb) (ccb)->ccb_h.target_id argument
447 #define XS_LUN(ccb) (ccb)->ccb_h.target_lun argument
449 #define XS_CDBP(ccb) \ argument
450 (((ccb)->ccb_h.flags & CAM_CDB_POINTER)? \
451 (ccb)->cdb_io.cdb_ptr : (ccb)->cdb_io.cdb_bytes)
453 #define XS_CDBLEN(ccb) (ccb)->cdb_len argument
454 #define XS_XFRLEN(ccb) (ccb)->dxfer_len argument
455 #define XS_XFRIN(ccb) (((ccb)->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) argument
456 #define XS_XFROUT(ccb) (((ccb)->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_OUT) argument
457 #define XS_TIME(ccb) \ argument
458 (((ccb)->ccb_h.timeout > 0xffff * 1000 - 999) ? 0 : \
459 (((ccb)->ccb_h.timeout + 999) / 1000))
460 #define XS_GET_RESID(ccb) (ccb)->resid argument
461 #define XS_SET_RESID(ccb, r) (ccb)->resid = r argument
462 #define XS_STSP(ccb) (&(ccb)->scsi_status) argument
463 #define XS_SNSP(ccb) (&(ccb)->sense_data) argument
465 #define XS_TOT_SNSLEN(ccb) ccb->sense_len argument
466 #define XS_CUR_SNSLEN(ccb) (ccb->sense_len - ccb->sense_resid) argument
468 #define XS_SNSKEY(ccb) (scsi_get_sense_key(&(ccb)->sense_data, \ argument
469 ccb->sense_len - ccb->sense_resid, 1))
471 #define XS_SNSASC(ccb) (scsi_get_asc(&(ccb)->sense_data, \ argument
472 ccb->sense_len - ccb->sense_resid, 1))
474 #define XS_SNSASCQ(ccb) (scsi_get_ascq(&(ccb)->sense_data, \ argument
475 ccb->sense_len - ccb->sense_resid, 1))
476 #define XS_TAG_P(ccb) \ argument
477 (((ccb)->ccb_h.flags & CAM_TAG_ACTION_VALID) && \
478 (ccb)->tag_action != CAM_TAG_ACTION_NONE)
480 #define XS_TAG_TYPE(ccb) \ argument
481 ((ccb->tag_action == MSG_HEAD_OF_QUEUE_TASK)? FCP_CMND_TASK_ATTR_HEAD:\
482 ((ccb->tag_action == MSG_ORDERED_TASK) ? FCP_CMND_TASK_ATTR_ORDERED :\
483 ((ccb->tag_action == MSG_ACA_TASK) ? FCP_CMND_TASK_ATTR_ACA : \
486 #define XS_PRIORITY(ccb) (ccb)->priority argument
488 #define XS_SETERR(ccb, v) (ccb)->ccb_h.status &= ~CAM_STATUS_MASK, \ argument
489 (ccb)->ccb_h.status |= v
503 #define XS_ERR(ccb) ((ccb)->ccb_h.status & CAM_STATUS_MASK) argument
505 #define XS_NOERR(ccb) (((ccb)->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG) argument
507 #define XS_INITERR(ccb) XS_SETERR(ccb, CAM_REQ_INPROG), ccb->sense_resid = ccb->sense_len argument