Lines Matching refs:ccb
140 #define ISP_PCMD(ccb) (ccb)->ccb_h.spriv_ptr1 argument
141 #define PISP_PCMD(ccb) ((struct isp_pcmd *)ISP_PCMD(ccb)) argument
416 #define XS_ISP(ccb) cam_sim_softc(xpt_path_sim((ccb)->ccb_h.path)) argument
417 #define XS_CHANNEL(ccb) cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path)) argument
418 #define XS_TGT(ccb) (ccb)->ccb_h.target_id argument
419 #define XS_LUN(ccb) (ccb)->ccb_h.target_lun argument
421 #define XS_CDBP(ccb) \ argument
422 (((ccb)->ccb_h.flags & CAM_CDB_POINTER)? \
423 (ccb)->cdb_io.cdb_ptr : (ccb)->cdb_io.cdb_bytes)
425 #define XS_CDBLEN(ccb) (ccb)->cdb_len argument
426 #define XS_XFRLEN(ccb) (ccb)->dxfer_len argument
427 #define XS_TIME(ccb) (ccb)->ccb_h.timeout argument
428 #define XS_GET_RESID(ccb) (ccb)->resid argument
429 #define XS_SET_RESID(ccb, r) (ccb)->resid = r argument
430 #define XS_STSP(ccb) (&(ccb)->scsi_status) argument
431 #define XS_SNSP(ccb) (&(ccb)->sense_data) argument
433 #define XS_SNSLEN(ccb) \ argument
434 imin((sizeof((ccb)->sense_data)), ccb->sense_len - ccb->sense_resid)
436 #define XS_SNSKEY(ccb) (scsi_get_sense_key(&(ccb)->sense_data, \ argument
437 ccb->sense_len - ccb->sense_resid, \
440 #define XS_SNSASC(ccb) (scsi_get_asc(&(ccb)->sense_data, \ argument
441 ccb->sense_len - ccb->sense_resid, \
444 #define XS_SNSASCQ(ccb) (scsi_get_ascq(&(ccb)->sense_data, \ argument
445 ccb->sense_len - ccb->sense_resid, \
447 #define XS_TAG_P(ccb) \ argument
448 (((ccb)->ccb_h.flags & CAM_TAG_ACTION_VALID) && \
449 (ccb)->tag_action != CAM_TAG_ACTION_NONE)
451 #define XS_TAG_TYPE(ccb) \ argument
452 ((ccb->tag_action == MSG_SIMPLE_Q_TAG)? REQFLAG_STAG : \
453 ((ccb->tag_action == MSG_HEAD_OF_Q_TAG)? REQFLAG_HTAG : REQFLAG_OTAG))
456 #define XS_SETERR(ccb, v) (ccb)->ccb_h.status &= ~CAM_STATUS_MASK, \ argument
457 (ccb)->ccb_h.status |= v, \
458 (ccb)->ccb_h.spriv_field0 |= ISP_SPRIV_ERRSET
471 #define XS_ERR(ccb) ((ccb)->ccb_h.status & CAM_STATUS_MASK) argument
473 #define XS_NOERR(ccb) \ argument
474 (((ccb)->ccb_h.spriv_field0 & ISP_SPRIV_ERRSET) == 0 || \
475 ((ccb)->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG)
477 #define XS_INITERR(ccb) \ argument
478 XS_SETERR(ccb, CAM_REQ_INPROG), (ccb)->ccb_h.spriv_field0 = 0