Lines Matching defs:cto
244 ct7_entry_t _ctio7, *cto = &_ctio7;
261 ISP_MEMZERO(cto, sizeof(*cto));
262 cto->ct_header.rqs_entry_type = RQSTYPE_CTIO7;
263 cto->ct_header.rqs_entry_count = 1;
264 cto->ct_nphdl = nphdl;
265 cto->ct_rxid = aep->at_rxid;
266 cto->ct_iid_lo = (aep->at_hdr.s_id[1] << 8) | aep->at_hdr.s_id[2];
267 cto->ct_iid_hi = aep->at_hdr.s_id[0];
268 cto->ct_oxid = aep->at_hdr.ox_id;
269 cto->ct_scsi_status = sts;
270 cto->ct_vpidx = vpidx;
271 cto->ct_flags = CT7_NOACK;
273 cto->ct_flags |= CT7_TERMINATE;
275 cto->ct_flags |= CT7_FLAG_MODE1 | CT7_SENDSTATUS;
276 cto->ct_scsi_status |= (FCP_SNSLEN_VALID << 8);
277 cto->ct_senselen = min(16, MAXRESPLEN_24XX);
278 ISP_MEMZERO(cto->rsp.m1.ct_resp, sizeof (cto->rsp.m1.ct_resp));
279 cto->rsp.m1.ct_resp[0] = 0xf0;
280 cto->rsp.m1.ct_resp[2] = (code >> 12) & 0xf;
281 cto->rsp.m1.ct_resp[7] = 8;
282 cto->rsp.m1.ct_resp[12] = (code >> 16) & 0xff;
283 cto->rsp.m1.ct_resp[13] = (code >> 24) & 0xff;
285 cto->ct_flags |= CT7_FLAG_MODE1 | CT7_SENDSTATUS;
286 cto->ct_scsi_status |= (FCP_RSPLEN_VALID << 8);
287 cto->rsp.m1.ct_resplen = 4;
288 ISP_MEMZERO(cto->rsp.m1.ct_resp, sizeof (cto->rsp.m1.ct_resp));
289 cto->rsp.m1.ct_resp[0] = (code >> 12) & 0xf;
290 cto->rsp.m1.ct_resp[1] = (code >> 16) & 0xff;
291 cto->rsp.m1.ct_resp[2] = (code >> 24) & 0xff;
292 cto->rsp.m1.ct_resp[3] = 0;
294 cto->ct_flags |= CT7_FLAG_MODE1 | CT7_SENDSTATUS;
297 cto->ct_resid = aep->at_cmnd.cdb_dl.sf.fcp_cmnd_dl;
298 cto->ct_scsi_status |= (FCP_RESID_UNDERFLOW << 8);
300 cto->ct_syshandle = hdl;
301 return (isp_send_entry(isp, cto));