Lines Matching refs:ctio
1922 struct ctio7_to_24xx *ctio; in qlt_24xx_retry_term_exchange() local
1926 ctio = (struct ctio7_to_24xx *)qla2x00_alloc_iocbs_ready(qpair, NULL); in qlt_24xx_retry_term_exchange()
1927 if (ctio == NULL) { in qlt_24xx_retry_term_exchange()
1946 ctio->entry_type = CTIO_TYPE7; in qlt_24xx_retry_term_exchange()
1947 ctio->entry_count = 1; in qlt_24xx_retry_term_exchange()
1948 ctio->nport_handle = entry->nport_handle; in qlt_24xx_retry_term_exchange()
1949 ctio->handle = QLA_TGT_SKIP_HANDLE | CTIO_COMPLETION_HANDLE_MARK; in qlt_24xx_retry_term_exchange()
1950 ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_24xx_retry_term_exchange()
1951 ctio->vp_index = vha->vp_idx; in qlt_24xx_retry_term_exchange()
1952 ctio->exchange_addr = entry->exchange_addr_to_abort; in qlt_24xx_retry_term_exchange()
1956 ctio->initiator_id = entry->fcp_hdr_le.s_id; in qlt_24xx_retry_term_exchange()
1963 ctio->initiator_id = entry->fcp_hdr_le.d_id; in qlt_24xx_retry_term_exchange()
1968 ctio->u.status1.flags = cpu_to_le16(tmp); in qlt_24xx_retry_term_exchange()
1969 ctio->u.status1.ox_id = entry->fcp_hdr_le.ox_id; in qlt_24xx_retry_term_exchange()
1973 le16_to_cpu(ctio->u.status1.flags), in qlt_24xx_retry_term_exchange()
1974 le16_to_cpu(ctio->u.status1.ox_id), in qlt_24xx_retry_term_exchange()
2235 struct ctio7_to_24xx *ctio; in qlt_24xx_send_task_mgmt_ctio() local
2243 ctio = (struct ctio7_to_24xx *)__qla2x00_alloc_iocbs(qpair, NULL); in qlt_24xx_send_task_mgmt_ctio()
2244 if (ctio == NULL) { in qlt_24xx_send_task_mgmt_ctio()
2251 ctio->entry_type = CTIO_TYPE7; in qlt_24xx_send_task_mgmt_ctio()
2252 ctio->entry_count = 1; in qlt_24xx_send_task_mgmt_ctio()
2253 ctio->handle = QLA_TGT_SKIP_HANDLE | CTIO_COMPLETION_HANDLE_MARK; in qlt_24xx_send_task_mgmt_ctio()
2254 ctio->nport_handle = cpu_to_le16(mcmd->sess->loop_id); in qlt_24xx_send_task_mgmt_ctio()
2255 ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_24xx_send_task_mgmt_ctio()
2256 ctio->vp_index = ha->vp_idx; in qlt_24xx_send_task_mgmt_ctio()
2257 ctio->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id); in qlt_24xx_send_task_mgmt_ctio()
2258 ctio->exchange_addr = atio->u.isp24.exchange_addr; in qlt_24xx_send_task_mgmt_ctio()
2261 ctio->u.status1.flags = cpu_to_le16(temp); in qlt_24xx_send_task_mgmt_ctio()
2263 ctio->u.status1.ox_id = cpu_to_le16(temp); in qlt_24xx_send_task_mgmt_ctio()
2264 ctio->u.status1.scsi_status = in qlt_24xx_send_task_mgmt_ctio()
2266 ctio->u.status1.response_len = cpu_to_le16(8); in qlt_24xx_send_task_mgmt_ctio()
2267 ctio->u.status1.sense_data[0] = resp_code; in qlt_24xx_send_task_mgmt_ctio()
2291 struct ctio7_to_24xx *ctio; in qlt_send_resp_ctio() local
2300 ctio = (struct ctio7_to_24xx *)qla2x00_alloc_iocbs(vha, NULL); in qlt_send_resp_ctio()
2301 if (!ctio) { in qlt_send_resp_ctio()
2308 ctio->entry_type = CTIO_TYPE7; in qlt_send_resp_ctio()
2309 ctio->entry_count = 1; in qlt_send_resp_ctio()
2310 ctio->handle = QLA_TGT_SKIP_HANDLE; in qlt_send_resp_ctio()
2311 ctio->nport_handle = cpu_to_le16(cmd->sess->loop_id); in qlt_send_resp_ctio()
2312 ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_send_resp_ctio()
2313 ctio->vp_index = vha->vp_idx; in qlt_send_resp_ctio()
2314 ctio->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id); in qlt_send_resp_ctio()
2315 ctio->exchange_addr = atio->u.isp24.exchange_addr; in qlt_send_resp_ctio()
2318 ctio->u.status1.flags = cpu_to_le16(temp); in qlt_send_resp_ctio()
2320 ctio->u.status1.ox_id = cpu_to_le16(temp); in qlt_send_resp_ctio()
2321 ctio->u.status1.scsi_status = in qlt_send_resp_ctio()
2323 ctio->u.status1.response_len = cpu_to_le16(18); in qlt_send_resp_ctio()
2324 ctio->u.status1.residual = cpu_to_le32(get_datalen_for_atio(atio)); in qlt_send_resp_ctio()
2326 if (ctio->u.status1.residual != 0) in qlt_send_resp_ctio()
2327 ctio->u.status1.scsi_status |= in qlt_send_resp_ctio()
2331 ctio->u.status1.sense_data[0] = 0x70; in qlt_send_resp_ctio()
2332 ctio->u.status1.sense_data[2] = sense_key; in qlt_send_resp_ctio()
2334 ctio->u.status1.sense_data[7] = 0xa; in qlt_send_resp_ctio()
2336 ctio->u.status1.sense_data[12] = asc; in qlt_send_resp_ctio()
2337 ctio->u.status1.sense_data[13] = ascq; in qlt_send_resp_ctio()
2844 static void qlt_24xx_init_ctio_to_isp(struct ctio7_to_24xx *ctio, in qlt_24xx_init_ctio_to_isp() argument
2848 (uint32_t)sizeof(ctio->u.status1.sense_data)); in qlt_24xx_init_ctio_to_isp()
2849 ctio->u.status0.flags |= cpu_to_le16(CTIO7_FLAGS_SEND_STATUS); in qlt_24xx_init_ctio_to_isp()
2851 ctio->u.status0.flags |= cpu_to_le16( in qlt_24xx_init_ctio_to_isp()
2855 ctio->u.status0.residual = cpu_to_le32(prm->residual); in qlt_24xx_init_ctio_to_isp()
2856 ctio->u.status0.scsi_status = cpu_to_le16(prm->rq_result); in qlt_24xx_init_ctio_to_isp()
2868 ctio->u.status1.flags |= cpu_to_le16( in qlt_24xx_init_ctio_to_isp()
2873 ctio->u.status1.flags &= in qlt_24xx_init_ctio_to_isp()
2875 ctio->u.status1.flags |= in qlt_24xx_init_ctio_to_isp()
2877 ctio->u.status1.scsi_status |= in qlt_24xx_init_ctio_to_isp()
2879 ctio->u.status1.sense_length = in qlt_24xx_init_ctio_to_isp()
2887 &((uint32_t *)ctio->u.status1.sense_data)[i]); in qlt_24xx_init_ctio_to_isp()
2892 ctio->u.status1.flags &= in qlt_24xx_init_ctio_to_isp()
2894 ctio->u.status1.flags |= in qlt_24xx_init_ctio_to_isp()
2896 ctio->u.status1.sense_length = 0; in qlt_24xx_init_ctio_to_isp()
2897 memset(ctio->u.status1.sense_data, 0, in qlt_24xx_init_ctio_to_isp()
2898 sizeof(ctio->u.status1.sense_data)); in qlt_24xx_init_ctio_to_isp()
3343 struct ctio7_to_24xx *ctio = in qlt_xmit_response() local
3349 ctio); in qlt_xmit_response()
3355 memcpy(ctio, pkt, sizeof(*ctio)); in qlt_xmit_response()
3357 ctio->entry_count = 1; in qlt_xmit_response()
3358 ctio->entry_type = CTIO_TYPE7; in qlt_xmit_response()
3359 ctio->dseg_count = 0; in qlt_xmit_response()
3360 ctio->u.status1.flags &= ~cpu_to_le16( in qlt_xmit_response()
3372 qlt_24xx_init_ctio_to_isp((struct ctio7_to_24xx *)ctio, in qlt_xmit_response()
3863 static int qlt_term_ctio_exchange(struct qla_qpair *qpair, void *ctio, in qlt_term_ctio_exchange() argument
3879 if (ctio != NULL) { in qlt_term_ctio_exchange()
3880 struct ctio7_from_24xx *c = (struct ctio7_from_24xx *)ctio; in qlt_term_ctio_exchange()
3896 struct rsp_que *rsp, uint32_t handle, void *ctio) in qlt_ctio_to_cmd() argument
3935 } else if (ctio != NULL) { in qlt_ctio_to_cmd()
3950 struct rsp_que *rsp, uint32_t handle, uint32_t status, void *ctio) in qlt_do_ctio_completion() argument
3967 cmd = qlt_ctio_to_cmd(vha, rsp, handle, ctio); in qlt_do_ctio_completion()
3971 if ((le16_to_cpu(((struct ctio7_from_24xx *)ctio)->flags) & CTIO7_FLAGS_DATA_OUT) && in qlt_do_ctio_completion()
3974 (struct ctio7_from_24xx *)ctio); in qlt_do_ctio_completion()
4035 (struct ctio_crc_from_fw *)ctio; in qlt_do_ctio_completion()
4044 qlt_handle_dif_error(qpair, cmd, ctio); in qlt_do_ctio_completion()
4074 if (qlt_term_ctio_exchange(qpair, ctio, cmd, status)) in qlt_do_ctio_completion()