Lines Matching refs:cto
659 ct7_entry_t *cto = &un._ctio7;
674 cto->ct_header.rqs_entry_type = RQSTYPE_CTIO7;
675 cto->ct_header.rqs_entry_count = 1;
676 cto->ct_nphdl = nphdl;
677 cto->ct_rxid = aep->at_rxid;
678 cto->ct_iid_lo = (aep->at_hdr.s_id[1] << 8) | aep->at_hdr.s_id[2];
679 cto->ct_iid_hi = aep->at_hdr.s_id[0];
680 cto->ct_oxid = aep->at_hdr.ox_id;
681 cto->ct_scsi_status = sts;
682 cto->ct_vpidx = vpidx;
683 cto->ct_flags = CT7_NOACK;
685 cto->ct_flags |= CT7_TERMINATE;
687 cto->ct_flags |= CT7_FLAG_MODE1 | CT7_SENDSTATUS;
688 cto->ct_scsi_status |= (FCP_SNSLEN_VALID << 8);
689 cto->rsp.m1.ct_resplen = cto->ct_senselen = uimin(16, MAXRESPLEN_24XX);
690 ISP_MEMZERO(cto->rsp.m1.ct_resp, sizeof (cto->rsp.m1.ct_resp));
691 cto->rsp.m1.ct_resp[0] = 0xf0;
692 cto->rsp.m1.ct_resp[2] = (code >> 12) & 0xf;
693 cto->rsp.m1.ct_resp[7] = 8;
694 cto->rsp.m1.ct_resp[12] = (code >> 24) & 0xff;
695 cto->rsp.m1.ct_resp[13] = (code >> 16) & 0xff;
697 cto->ct_flags |= CT7_FLAG_MODE1 | CT7_SENDSTATUS;
700 cto->ct_resid = aep->at_cmnd.cdb_dl.sf.fcp_cmnd_dl;
701 if (cto->ct_resid < 0) {
702 cto->ct_scsi_status |= (FCP_RESID_OVERFLOW << 8);
703 } else if (cto->ct_resid > 0) {
704 cto->ct_scsi_status |= (FCP_RESID_UNDERFLOW << 8);
707 cto->ct_syshandle = hdl;
710 ct2_entry_t *cto = &un._ctio2;
721 cto->ct_header.rqs_entry_type = RQSTYPE_CTIO2;
722 cto->ct_header.rqs_entry_count = 1;
724 cto->ct_lun = aep->at_lun;
729 cto->ct_iid = aep->at_iid;
731 cto->ct_rxid = aep->at_rxid;
732 cto->rsp.m1.ct_scsi_status = sts;
733 cto->ct_flags = CT2_SENDSTATUS | CT2_NO_DATA | CT2_FLAG_MODE1;
735 cto->ct_flags |= CT2_CCINCR;
738 cto->ct_resid = aep->at_datalen;
739 cto->rsp.m1.ct_scsi_status |= CT2_DATA_UNDER;
742 cto->rsp.m1.ct_resp[0] = 0xf0;
743 cto->rsp.m1.ct_resp[2] = (code >> 12) & 0xf;
744 cto->rsp.m1.ct_resp[7] = 8;
745 cto->rsp.m1.ct_resp[12] = (code >> 24) & 0xff;
746 cto->rsp.m1.ct_resp[13] = (code >> 16) & 0xff;
747 cto->rsp.m1.ct_senselen = 16;
748 cto->rsp.m1.ct_scsi_status |= CT2_SNSLEN_VALID;
750 cto->ct_syshandle = hdl;
753 ct_entry_t *cto = &un._ctio;
763 cto->ct_header.rqs_entry_type = RQSTYPE_CTIO;
764 cto->ct_header.rqs_entry_count = 1;
765 cto->ct_fwhandle = aep->at_handle;
766 cto->ct_iid = aep->at_iid;
767 cto->ct_tgt = aep->at_tgt;
768 cto->ct_lun = aep->at_lun;
769 cto->ct_tag_type = aep->at_tag_type;
770 cto->ct_tag_val = aep->at_tag_val;
772 cto->ct_flags |= CT_TQAE;
774 cto->ct_flags = CT_SENDSTATUS | CT_NO_DATA;
776 cto->ct_flags |= CT_CCINCR;
778 cto->ct_scsi_status = sts;
779 cto->ct_syshandle = hdl;