Lines Matching refs:ctio
1892 struct ctio7_to_24xx *ctio; in qlt_24xx_retry_term_exchange() local
1896 ctio = (struct ctio7_to_24xx *)qla2x00_alloc_iocbs_ready(qpair, NULL); in qlt_24xx_retry_term_exchange()
1897 if (ctio == NULL) { in qlt_24xx_retry_term_exchange()
1916 ctio->entry_type = CTIO_TYPE7; in qlt_24xx_retry_term_exchange()
1917 ctio->entry_count = 1; in qlt_24xx_retry_term_exchange()
1918 ctio->nport_handle = entry->nport_handle; in qlt_24xx_retry_term_exchange()
1919 ctio->handle = QLA_TGT_SKIP_HANDLE | CTIO_COMPLETION_HANDLE_MARK; in qlt_24xx_retry_term_exchange()
1920 ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_24xx_retry_term_exchange()
1921 ctio->vp_index = vha->vp_idx; in qlt_24xx_retry_term_exchange()
1922 ctio->exchange_addr = entry->exchange_addr_to_abort; in qlt_24xx_retry_term_exchange()
1926 ctio->initiator_id = entry->fcp_hdr_le.s_id; in qlt_24xx_retry_term_exchange()
1933 ctio->initiator_id = entry->fcp_hdr_le.d_id; in qlt_24xx_retry_term_exchange()
1938 ctio->u.status1.flags = cpu_to_le16(tmp); in qlt_24xx_retry_term_exchange()
1939 ctio->u.status1.ox_id = entry->fcp_hdr_le.ox_id; in qlt_24xx_retry_term_exchange()
1943 le16_to_cpu(ctio->u.status1.flags), in qlt_24xx_retry_term_exchange()
1944 le16_to_cpu(ctio->u.status1.ox_id), in qlt_24xx_retry_term_exchange()
2213 struct ctio7_to_24xx *ctio; in qlt_24xx_send_task_mgmt_ctio() local
2221 ctio = (struct ctio7_to_24xx *)__qla2x00_alloc_iocbs(qpair, NULL); in qlt_24xx_send_task_mgmt_ctio()
2222 if (ctio == NULL) { in qlt_24xx_send_task_mgmt_ctio()
2229 ctio->entry_type = CTIO_TYPE7; in qlt_24xx_send_task_mgmt_ctio()
2230 ctio->entry_count = 1; in qlt_24xx_send_task_mgmt_ctio()
2231 ctio->handle = QLA_TGT_SKIP_HANDLE | CTIO_COMPLETION_HANDLE_MARK; in qlt_24xx_send_task_mgmt_ctio()
2232 ctio->nport_handle = cpu_to_le16(mcmd->sess->loop_id); in qlt_24xx_send_task_mgmt_ctio()
2233 ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_24xx_send_task_mgmt_ctio()
2234 ctio->vp_index = ha->vp_idx; in qlt_24xx_send_task_mgmt_ctio()
2235 ctio->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id); in qlt_24xx_send_task_mgmt_ctio()
2236 ctio->exchange_addr = atio->u.isp24.exchange_addr; in qlt_24xx_send_task_mgmt_ctio()
2239 ctio->u.status1.flags = cpu_to_le16(temp); in qlt_24xx_send_task_mgmt_ctio()
2241 ctio->u.status1.ox_id = cpu_to_le16(temp); in qlt_24xx_send_task_mgmt_ctio()
2242 ctio->u.status1.scsi_status = in qlt_24xx_send_task_mgmt_ctio()
2244 ctio->u.status1.response_len = cpu_to_le16(8); in qlt_24xx_send_task_mgmt_ctio()
2245 ctio->u.status1.sense_data[0] = resp_code; in qlt_24xx_send_task_mgmt_ctio()
2269 struct ctio7_to_24xx *ctio; in qlt_send_resp_ctio() local
2278 ctio = (struct ctio7_to_24xx *)qla2x00_alloc_iocbs(vha, NULL); in qlt_send_resp_ctio()
2279 if (!ctio) { in qlt_send_resp_ctio()
2286 ctio->entry_type = CTIO_TYPE7; in qlt_send_resp_ctio()
2287 ctio->entry_count = 1; in qlt_send_resp_ctio()
2288 ctio->handle = QLA_TGT_SKIP_HANDLE; in qlt_send_resp_ctio()
2289 ctio->nport_handle = cpu_to_le16(cmd->sess->loop_id); in qlt_send_resp_ctio()
2290 ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_send_resp_ctio()
2291 ctio->vp_index = vha->vp_idx; in qlt_send_resp_ctio()
2292 ctio->initiator_id = be_id_to_le(atio->u.isp24.fcp_hdr.s_id); in qlt_send_resp_ctio()
2293 ctio->exchange_addr = atio->u.isp24.exchange_addr; in qlt_send_resp_ctio()
2296 ctio->u.status1.flags = cpu_to_le16(temp); in qlt_send_resp_ctio()
2298 ctio->u.status1.ox_id = cpu_to_le16(temp); in qlt_send_resp_ctio()
2299 ctio->u.status1.scsi_status = in qlt_send_resp_ctio()
2301 ctio->u.status1.response_len = cpu_to_le16(18); in qlt_send_resp_ctio()
2302 ctio->u.status1.residual = cpu_to_le32(get_datalen_for_atio(atio)); in qlt_send_resp_ctio()
2304 if (ctio->u.status1.residual != 0) in qlt_send_resp_ctio()
2305 ctio->u.status1.scsi_status |= in qlt_send_resp_ctio()
2309 ctio->u.status1.sense_data[0] = 0x70; in qlt_send_resp_ctio()
2310 ctio->u.status1.sense_data[2] = sense_key; in qlt_send_resp_ctio()
2312 ctio->u.status1.sense_data[7] = 0xa; in qlt_send_resp_ctio()
2314 ctio->u.status1.sense_data[12] = asc; in qlt_send_resp_ctio()
2315 ctio->u.status1.sense_data[13] = ascq; in qlt_send_resp_ctio()
2812 static void qlt_24xx_init_ctio_to_isp(struct ctio7_to_24xx *ctio, in qlt_24xx_init_ctio_to_isp() argument
2816 (uint32_t)sizeof(ctio->u.status1.sense_data)); in qlt_24xx_init_ctio_to_isp()
2817 ctio->u.status0.flags |= cpu_to_le16(CTIO7_FLAGS_SEND_STATUS); in qlt_24xx_init_ctio_to_isp()
2819 ctio->u.status0.flags |= cpu_to_le16( in qlt_24xx_init_ctio_to_isp()
2823 ctio->u.status0.residual = cpu_to_le32(prm->residual); in qlt_24xx_init_ctio_to_isp()
2824 ctio->u.status0.scsi_status = cpu_to_le16(prm->rq_result); in qlt_24xx_init_ctio_to_isp()
2836 ctio->u.status1.flags |= cpu_to_le16( in qlt_24xx_init_ctio_to_isp()
2841 ctio->u.status1.flags &= in qlt_24xx_init_ctio_to_isp()
2843 ctio->u.status1.flags |= in qlt_24xx_init_ctio_to_isp()
2845 ctio->u.status1.scsi_status |= in qlt_24xx_init_ctio_to_isp()
2847 ctio->u.status1.sense_length = in qlt_24xx_init_ctio_to_isp()
2855 &((uint32_t *)ctio->u.status1.sense_data)[i]); in qlt_24xx_init_ctio_to_isp()
2860 ctio->u.status1.flags &= in qlt_24xx_init_ctio_to_isp()
2862 ctio->u.status1.flags |= in qlt_24xx_init_ctio_to_isp()
2864 ctio->u.status1.sense_length = 0; in qlt_24xx_init_ctio_to_isp()
2865 memset(ctio->u.status1.sense_data, 0, in qlt_24xx_init_ctio_to_isp()
2866 sizeof(ctio->u.status1.sense_data)); in qlt_24xx_init_ctio_to_isp()
3309 struct ctio7_to_24xx *ctio = in qlt_xmit_response() local
3315 ctio); in qlt_xmit_response()
3321 memcpy(ctio, pkt, sizeof(*ctio)); in qlt_xmit_response()
3323 ctio->entry_count = 1; in qlt_xmit_response()
3324 ctio->entry_type = CTIO_TYPE7; in qlt_xmit_response()
3325 ctio->dseg_count = 0; in qlt_xmit_response()
3326 ctio->u.status1.flags &= ~cpu_to_le16( in qlt_xmit_response()
3338 qlt_24xx_init_ctio_to_isp((struct ctio7_to_24xx *)ctio, in qlt_xmit_response()
3831 static int qlt_term_ctio_exchange(struct qla_qpair *qpair, void *ctio, in qlt_term_ctio_exchange() argument
3847 if (ctio != NULL) { in qlt_term_ctio_exchange()
3848 struct ctio7_from_24xx *c = (struct ctio7_from_24xx *)ctio; in qlt_term_ctio_exchange()
3864 struct rsp_que *rsp, uint32_t handle, void *ctio) in qlt_ctio_to_cmd() argument
3903 } else if (ctio != NULL) { in qlt_ctio_to_cmd()
3918 struct rsp_que *rsp, uint32_t handle, uint32_t status, void *ctio) in qlt_do_ctio_completion() argument
3935 cmd = qlt_ctio_to_cmd(vha, rsp, handle, ctio); in qlt_do_ctio_completion()
3997 (struct ctio_crc_from_fw *)ctio; in qlt_do_ctio_completion()
4006 qlt_handle_dif_error(qpair, cmd, ctio); in qlt_do_ctio_completion()
4026 if (qlt_term_ctio_exchange(qpair, ctio, cmd, status)) in qlt_do_ctio_completion()