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 = 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 = cpu_to_le16(CTIO7_FLAGS_STATUS_MODE_1 | in qlt_24xx_retry_term_exchange()
1285 ctio->u.status1.ox_id = cpu_to_le16(entry->fcp_hdr_le.ox_id); in qlt_24xx_retry_term_exchange()
1501 struct ctio7_to_24xx *ctio; in qlt_24xx_send_task_mgmt_ctio() local
1512 ctio = (struct ctio7_to_24xx *)qla2x00_alloc_iocbs(ha, NULL); in qlt_24xx_send_task_mgmt_ctio()
1513 if (ctio == NULL) { in qlt_24xx_send_task_mgmt_ctio()
1520 ctio->entry_type = CTIO_TYPE7; in qlt_24xx_send_task_mgmt_ctio()
1521 ctio->entry_count = 1; in qlt_24xx_send_task_mgmt_ctio()
1522 ctio->handle = QLA_TGT_SKIP_HANDLE | CTIO_COMPLETION_HANDLE_MARK; in qlt_24xx_send_task_mgmt_ctio()
1523 ctio->nport_handle = mcmd->sess->loop_id; in qlt_24xx_send_task_mgmt_ctio()
1524 ctio->timeout = cpu_to_le16(QLA_TGT_TIMEOUT); in qlt_24xx_send_task_mgmt_ctio()
1525 ctio->vp_index = ha->vp_idx; in qlt_24xx_send_task_mgmt_ctio()
1526 ctio->initiator_id[0] = atio->u.isp24.fcp_hdr.s_id[2]; in qlt_24xx_send_task_mgmt_ctio()
1527 ctio->initiator_id[1] = atio->u.isp24.fcp_hdr.s_id[1]; in qlt_24xx_send_task_mgmt_ctio()
1528 ctio->initiator_id[2] = atio->u.isp24.fcp_hdr.s_id[0]; in qlt_24xx_send_task_mgmt_ctio()
1529 ctio->exchange_addr = atio->u.isp24.exchange_addr; in qlt_24xx_send_task_mgmt_ctio()
1530 ctio->u.status1.flags = (atio->u.isp24.attr << 9) | in qlt_24xx_send_task_mgmt_ctio()
1533 ctio->u.status1.ox_id = cpu_to_le16(temp); in qlt_24xx_send_task_mgmt_ctio()
1534 ctio->u.status1.scsi_status = in qlt_24xx_send_task_mgmt_ctio()
1536 ctio->u.status1.response_len = cpu_to_le16(8); in qlt_24xx_send_task_mgmt_ctio()
1537 ctio->u.status1.sense_data[0] = resp_code; in qlt_24xx_send_task_mgmt_ctio()
2083 static void qlt_24xx_init_ctio_to_isp(struct ctio7_to_24xx *ctio, in qlt_24xx_init_ctio_to_isp() argument
2087 (uint32_t)sizeof(ctio->u.status1.sense_data)); in qlt_24xx_init_ctio_to_isp()
2088 ctio->u.status0.flags |= cpu_to_le16(CTIO7_FLAGS_SEND_STATUS); in qlt_24xx_init_ctio_to_isp()
2090 ctio->u.status0.flags |= cpu_to_le16( in qlt_24xx_init_ctio_to_isp()
2094 ctio->u.status0.residual = cpu_to_le32(prm->residual); in qlt_24xx_init_ctio_to_isp()
2095 ctio->u.status0.scsi_status = cpu_to_le16(prm->rq_result); in qlt_24xx_init_ctio_to_isp()
2107 ctio->u.status1.flags |= cpu_to_le16( in qlt_24xx_init_ctio_to_isp()
2112 ctio->u.status1.flags &= in qlt_24xx_init_ctio_to_isp()
2114 ctio->u.status1.flags |= in qlt_24xx_init_ctio_to_isp()
2116 ctio->u.status1.scsi_status |= in qlt_24xx_init_ctio_to_isp()
2118 ctio->u.status1.sense_length = in qlt_24xx_init_ctio_to_isp()
2121 ((uint32_t *)ctio->u.status1.sense_data)[i] = in qlt_24xx_init_ctio_to_isp()
2136 ctio->u.status1.flags &= in qlt_24xx_init_ctio_to_isp()
2138 ctio->u.status1.flags |= in qlt_24xx_init_ctio_to_isp()
2140 ctio->u.status1.sense_length = 0; in qlt_24xx_init_ctio_to_isp()
2141 memset(ctio->u.status1.sense_data, 0, in qlt_24xx_init_ctio_to_isp()
2142 sizeof(ctio->u.status1.sense_data)); in qlt_24xx_init_ctio_to_isp()
2574 struct ctio7_to_24xx *ctio = in qlt_xmit_response() local
2579 ctio); in qlt_xmit_response()
2585 memcpy(ctio, pkt, sizeof(*ctio)); in qlt_xmit_response()
2587 ctio->entry_count = 1; in qlt_xmit_response()
2588 ctio->entry_type = CTIO_TYPE7; in qlt_xmit_response()
2589 ctio->dseg_count = 0; in qlt_xmit_response()
2590 ctio->u.status1.flags &= ~cpu_to_le16( in qlt_xmit_response()
2602 qlt_24xx_init_ctio_to_isp((struct ctio7_to_24xx *)ctio, in qlt_xmit_response()
2604 pr_debug("Status CTIO7: %p\n", ctio); in qlt_xmit_response()
3120 struct qla_tgt_cmd *cmd, void *ctio) in qlt_prepare_srr_ctio() argument
3132 if (!ctio) { in qlt_prepare_srr_ctio()
3205 static int qlt_term_ctio_exchange(struct scsi_qla_host *vha, void *ctio, in qlt_term_ctio_exchange() argument
3210 if (ctio != NULL) { in qlt_term_ctio_exchange()
3211 struct ctio7_from_24xx *c = (struct ctio7_from_24xx *)ctio; in qlt_term_ctio_exchange()
3240 uint32_t handle, void *ctio) in qlt_ctio_to_cmd() argument
3267 } else if (ctio != NULL) { in qlt_ctio_to_cmd()
3357 uint32_t status, void *ctio) in qlt_do_ctio_completion() argument
3373 cmd = qlt_ctio_to_cmd(vha, handle, ctio); in qlt_do_ctio_completion()
3413 if (qlt_prepare_srr_ctio(vha, cmd, ctio) != 0) in qlt_do_ctio_completion()
3420 (struct ctio_crc_from_fw *)ctio; in qlt_do_ctio_completion()
3427 if (qlt_handle_dif_error(vha, cmd, ctio)) { in qlt_do_ctio_completion()
3466 if (qlt_term_ctio_exchange(vha, ctio, cmd, status)) in qlt_do_ctio_completion()