Lines Matching refs:ctio
1252 struct ctio7_to_24xx *ctio; in qlt_24xx_retry_term_exchange() local
1260 ctio = (struct ctio7_to_24xx *)qla2x00_alloc_iocbs_ready(vha, NULL); in qlt_24xx_retry_term_exchange()
1261 if (ctio == NULL) { in qlt_24xx_retry_term_exchange()
1273 ctio->entry_type = CTIO_TYPE7; in qlt_24xx_retry_term_exchange()
1274 ctio->entry_count = 1; in qlt_24xx_retry_term_exchange()
1275 ctio->nport_handle = entry->nport_handle; in qlt_24xx_retry_term_exchange()
1276 ctio->handle = QLA_TGT_SKIP_HANDLE | CTIO_COMPLETION_HANDLE_MARK; in qlt_24xx_retry_term_exchange()
1277 ctio->timeout = __constant_cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_24xx_retry_term_exchange()
1278 ctio->vp_index = vha->vp_idx; in qlt_24xx_retry_term_exchange()
1279 ctio->initiator_id[0] = entry->fcp_hdr_le.d_id[0]; in qlt_24xx_retry_term_exchange()
1280 ctio->initiator_id[1] = entry->fcp_hdr_le.d_id[1]; in qlt_24xx_retry_term_exchange()
1281 ctio->initiator_id[2] = entry->fcp_hdr_le.d_id[2]; in qlt_24xx_retry_term_exchange()
1282 ctio->exchange_addr = entry->exchange_addr_to_abort; in qlt_24xx_retry_term_exchange()
1283 ctio->u.status1.flags = in qlt_24xx_retry_term_exchange()
1286 ctio->u.status1.ox_id = cpu_to_le16(entry->fcp_hdr_le.ox_id); in qlt_24xx_retry_term_exchange()
1502 struct ctio7_to_24xx *ctio; in qlt_24xx_send_task_mgmt_ctio() local
1513 ctio = (struct ctio7_to_24xx *)qla2x00_alloc_iocbs(ha, NULL); in qlt_24xx_send_task_mgmt_ctio()
1514 if (ctio == NULL) { in qlt_24xx_send_task_mgmt_ctio()
1521 ctio->entry_type = CTIO_TYPE7; in qlt_24xx_send_task_mgmt_ctio()
1522 ctio->entry_count = 1; in qlt_24xx_send_task_mgmt_ctio()
1523 ctio->handle = QLA_TGT_SKIP_HANDLE | CTIO_COMPLETION_HANDLE_MARK; in qlt_24xx_send_task_mgmt_ctio()
1524 ctio->nport_handle = mcmd->sess->loop_id; in qlt_24xx_send_task_mgmt_ctio()
1525 ctio->timeout = __constant_cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_24xx_send_task_mgmt_ctio()
1526 ctio->vp_index = ha->vp_idx; in qlt_24xx_send_task_mgmt_ctio()
1527 ctio->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2]; in qlt_24xx_send_task_mgmt_ctio()
1528 ctio->initiator_id[1] = atio->u.isp24.fcp_hdr.s_id[1]; in qlt_24xx_send_task_mgmt_ctio()
1529 ctio->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0]; in qlt_24xx_send_task_mgmt_ctio()
1530 ctio->exchange_addr = atio->u.isp24.exchange_addr; in qlt_24xx_send_task_mgmt_ctio()
1531 ctio->u.status1.flags = (atio->u.isp24.attr << 9) | in qlt_24xx_send_task_mgmt_ctio()
1535 ctio->u.status1.ox_id = cpu_to_le16(temp); in qlt_24xx_send_task_mgmt_ctio()
1536 ctio->u.status1.scsi_status = in qlt_24xx_send_task_mgmt_ctio()
1538 ctio->u.status1.response_len = __constant_cpu_to_le16(8); in qlt_24xx_send_task_mgmt_ctio()
1539 ctio->u.status1.sense_data[0] = resp_code; in qlt_24xx_send_task_mgmt_ctio()
2086 static void qlt_24xx_init_ctio_to_isp(struct ctio7_to_24xx *ctio, in qlt_24xx_init_ctio_to_isp() argument
2090 (uint32_t)sizeof(ctio->u.status1.sense_data)); in qlt_24xx_init_ctio_to_isp()
2091 ctio->u.status0.flags |= in qlt_24xx_init_ctio_to_isp()
2094 ctio->u.status0.flags |= __constant_cpu_to_le16( in qlt_24xx_init_ctio_to_isp()
2098 ctio->u.status0.residual = cpu_to_le32(prm->residual); in qlt_24xx_init_ctio_to_isp()
2099 ctio->u.status0.scsi_status = cpu_to_le16(prm->rq_result); in qlt_24xx_init_ctio_to_isp()
2111 ctio->u.status1.flags |= __constant_cpu_to_le16( in qlt_24xx_init_ctio_to_isp()
2116 ctio->u.status1.flags &= in qlt_24xx_init_ctio_to_isp()
2118 ctio->u.status1.flags |= in qlt_24xx_init_ctio_to_isp()
2120 ctio->u.status1.scsi_status |= in qlt_24xx_init_ctio_to_isp()
2122 ctio->u.status1.sense_length = in qlt_24xx_init_ctio_to_isp()
2125 ((uint32_t *)ctio->u.status1.sense_data)[i] = in qlt_24xx_init_ctio_to_isp()
2140 ctio->u.status1.flags &= in qlt_24xx_init_ctio_to_isp()
2142 ctio->u.status1.flags |= in qlt_24xx_init_ctio_to_isp()
2144 ctio->u.status1.sense_length = 0; in qlt_24xx_init_ctio_to_isp()
2145 memset(ctio->u.status1.sense_data, 0, in qlt_24xx_init_ctio_to_isp()
2146 sizeof(ctio->u.status1.sense_data)); in qlt_24xx_init_ctio_to_isp()
2580 struct ctio7_to_24xx *ctio = in qlt_xmit_response() local
2585 ctio); in qlt_xmit_response()
2591 memcpy(ctio, pkt, sizeof(*ctio)); in qlt_xmit_response()
2593 ctio->entry_count = 1; in qlt_xmit_response()
2594 ctio->entry_type = CTIO_TYPE7; in qlt_xmit_response()
2595 ctio->dseg_count = 0; in qlt_xmit_response()
2596 ctio->u.status1.flags &= ~__constant_cpu_to_le16( in qlt_xmit_response()
2608 qlt_24xx_init_ctio_to_isp((struct ctio7_to_24xx *)ctio, in qlt_xmit_response()
2610 pr_debug("Status CTIO7: %p\n", ctio); in qlt_xmit_response()
3127 struct qla_tgt_cmd *cmd, void *ctio) in qlt_prepare_srr_ctio() argument
3139 if (!ctio) { in qlt_prepare_srr_ctio()
3212 static int qlt_term_ctio_exchange(struct scsi_qla_host *vha, void *ctio, in qlt_term_ctio_exchange() argument
3217 if (ctio != NULL) { in qlt_term_ctio_exchange()
3218 struct ctio7_from_24xx *c = (struct ctio7_from_24xx *)ctio; in qlt_term_ctio_exchange()
3247 uint32_t handle, void *ctio) in qlt_ctio_to_cmd() argument
3274 } else if (ctio != NULL) { in qlt_ctio_to_cmd()
3364 uint32_t status, void *ctio) in qlt_do_ctio_completion() argument
3381 cmd = qlt_ctio_to_cmd(vha, handle, ctio); in qlt_do_ctio_completion()
3422 if (qlt_prepare_srr_ctio(vha, cmd, ctio) != 0) in qlt_do_ctio_completion()
3429 (struct ctio_crc_from_fw *)ctio; in qlt_do_ctio_completion()
3436 if (qlt_handle_dif_error(vha, cmd, ctio)) { in qlt_do_ctio_completion()
3475 if (qlt_term_ctio_exchange(vha, ctio, cmd, status)) in qlt_do_ctio_completion()