Lines Matching refs:cmd
20 void qedi_iscsi_unmap_sg_list(struct qedi_cmd *cmd) in qedi_iscsi_unmap_sg_list() argument
22 struct scsi_cmnd *sc = cmd->scsi_cmd; in qedi_iscsi_unmap_sg_list()
24 if (cmd->io_tbl.sge_valid && sc) { in qedi_iscsi_unmap_sg_list()
25 cmd->io_tbl.sge_valid = 0; in qedi_iscsi_unmap_sg_list()
39 struct qedi_cmd *cmd; in qedi_process_logout_resp() local
41 cmd = (struct qedi_cmd *)task->dd_data; in qedi_process_logout_resp()
60 cmd->task_id, qedi_conn->iscsi_conn_id); in qedi_process_logout_resp()
63 if (likely(cmd->io_cmd_in_list)) { in qedi_process_logout_resp()
64 cmd->io_cmd_in_list = false; in qedi_process_logout_resp()
65 list_del_init(&cmd->io_cmd); in qedi_process_logout_resp()
70 cmd->task_id, qedi_conn->iscsi_conn_id, in qedi_process_logout_resp()
71 &cmd->io_cmd); in qedi_process_logout_resp()
75 cmd->state = RESPONSE_RECEIVED; in qedi_process_logout_resp()
91 struct qedi_cmd *cmd; in qedi_process_text_resp() local
94 cmd = (struct qedi_cmd *)task->dd_data; in qedi_process_text_resp()
95 task_ctx = qedi_get_task_mem(&qedi->tasks, cmd->task_id); in qedi_process_text_resp()
124 cmd->task_id, qedi_conn->iscsi_conn_id); in qedi_process_text_resp()
127 if (likely(cmd->io_cmd_in_list)) { in qedi_process_text_resp()
128 cmd->io_cmd_in_list = false; in qedi_process_text_resp()
129 list_del_init(&cmd->io_cmd); in qedi_process_text_resp()
134 cmd->task_id, qedi_conn->iscsi_conn_id, in qedi_process_text_resp()
135 &cmd->io_cmd); in qedi_process_text_resp()
139 cmd->state = RESPONSE_RECEIVED; in qedi_process_text_resp()
267 struct qedi_cmd *cmd; in qedi_process_login_resp() local
270 cmd = (struct qedi_cmd *)task->dd_data; in qedi_process_login_resp()
273 task_ctx = qedi_get_task_mem(&qedi->tasks, cmd->task_id); in qedi_process_login_resp()
298 if (likely(cmd->io_cmd_in_list)) { in qedi_process_login_resp()
299 cmd->io_cmd_in_list = false; in qedi_process_login_resp()
300 list_del_init(&cmd->io_cmd); in qedi_process_login_resp()
315 cmd->task_id, qedi_conn->iscsi_conn_id); in qedi_process_login_resp()
316 cmd->state = RESPONSE_RECEIVED; in qedi_process_login_resp()
417 struct qedi_cmd *cmd; in qedi_process_nopin_mesg() local
451 cmd = task->dd_data; in qedi_process_nopin_mesg()
460 cmd->task_id, qedi_conn->iscsi_conn_id); in qedi_process_nopin_mesg()
461 cmd->state = RESPONSE_RECEIVED; in qedi_process_nopin_mesg()
463 if (likely(cmd->io_cmd_in_list)) { in qedi_process_nopin_mesg()
464 cmd->io_cmd_in_list = false; in qedi_process_nopin_mesg()
465 list_del_init(&cmd->io_cmd); in qedi_process_nopin_mesg()
581 struct qedi_cmd *cmd = task->dd_data; in qedi_scsi_completion() local
599 sc_cmd = cmd->scsi_cmd; in qedi_scsi_completion()
619 qedi_iscsi_unmap_sg_list(cmd); in qedi_scsi_completion()
634 memcpy((char *)conn->data, (char *)cmd->sense_buffer, datalen); in qedi_scsi_completion()
644 hdr->itt, cqe_data_in->flags, cmd->task_id, in qedi_scsi_completion()
653 if (likely(cmd->io_cmd_in_list)) { in qedi_scsi_completion()
654 cmd->io_cmd_in_list = false; in qedi_scsi_completion()
655 list_del_init(&cmd->io_cmd); in qedi_scsi_completion()
662 cmd->task_id, qedi_conn->iscsi_conn_id); in qedi_scsi_completion()
663 cmd->state = RESPONSE_RECEIVED; in qedi_scsi_completion()
665 qedi_trace_io(qedi, task, cmd->task_id, QEDI_IO_TRACE_RSP); in qedi_scsi_completion()
716 struct qedi_cmd *cmd = task->dd_data; in qedi_process_nopin_local_cmpl() local
720 cqe->itid, cmd->task_id); in qedi_process_nopin_local_cmpl()
722 cmd->state = RESPONSE_RECEIVED; in qedi_process_nopin_local_cmpl()
1140 struct qedi_cmd *cmd, *cmd_tmp; in qedi_cleanup_all_io() local
1171 list_for_each_entry_safe(cmd, cmd_tmp, &qedi_conn->active_cmd_list, in qedi_cleanup_all_io()
1173 ctask = cmd->task; in qedi_cleanup_all_io()
1178 if (cmd->scsi_cmd && cmd->scsi_cmd->device) { in qedi_cleanup_all_io()
1181 cmd->task_id, get_itt(ctask->itt), in qedi_cleanup_all_io()
1182 cmd->scsi_cmd, cmd->scsi_cmd->device, in qedi_cleanup_all_io()
1183 ctask->state, cmd->state, in qedi_cleanup_all_io()
1185 if (cmd->scsi_cmd->device->lun != lun) in qedi_cleanup_all_io()
1192 cmd->io_cmd_in_list = false; in qedi_cleanup_all_io()
1193 list_del_init(&cmd->io_cmd); in qedi_cleanup_all_io()
1197 &cmd->io_cmd, qedi_conn->iscsi_conn_id); in qedi_cleanup_all_io()
1290 struct qedi_cmd *cmd = (struct qedi_cmd *)task->dd_data; in qedi_wait_for_cleanup_request() local
1297 (cmd->state == in qedi_wait_for_cleanup_request()
1305 cmd->task_id, qedi_conn->iscsi_conn_id); in qedi_wait_for_cleanup_request()
1321 struct qedi_cmd *cmd; in qedi_abort_work() local
1349 cmd = (struct qedi_cmd *)ctask->dd_data; in qedi_abort_work()
1352 get_itt(tmf_hdr->rtt), get_itt(ctask->itt), cmd->task_id, in qedi_abort_work()
1370 list_work->rtid = cmd->task_id; in qedi_abort_work()
1409 if (likely(cmd->io_cmd_in_list)) { in qedi_abort_work()
1410 cmd->io_cmd_in_list = false; in qedi_abort_work()
1411 list_del_init(&cmd->io_cmd); in qedi_abort_work()
1431 struct qedi_cmd *cmd; in send_iscsi_tmf() local
1468 cmd = (struct qedi_cmd *)ctask->dd_data; in send_iscsi_tmf()
1470 qedi_set_itt(cmd->task_id, in send_iscsi_tmf()
1745 static int qedi_split_bd(struct qedi_cmd *cmd, u64 addr, int sg_len, in qedi_split_bd() argument
1748 struct scsi_sge *bd = cmd->io_tbl.sge_tbl; in qedi_split_bd()
1767 QEDI_INFO(&cmd->conn->qedi->dbg_ctx, QEDI_LOG_IO, in qedi_split_bd()
1778 static int qedi_map_scsi_sg(struct qedi_ctx *qedi, struct qedi_cmd *cmd) in qedi_map_scsi_sg() argument
1780 struct scsi_cmnd *sc = cmd->scsi_cmd; in qedi_map_scsi_sg()
1781 struct scsi_sge *bd = cmd->io_tbl.sge_tbl; in qedi_map_scsi_sg()
1826 cmd->use_slowpath = true; in qedi_map_scsi_sg()
1834 cmd->use_slowpath = true; in qedi_map_scsi_sg()
1843 cmd->use_slowpath = true; in qedi_map_scsi_sg()
1849 sg_frags = qedi_split_bd(cmd, addr, sg_len, bd_count); in qedi_map_scsi_sg()
1873 static void qedi_iscsi_map_sg_list(struct qedi_cmd *cmd) in qedi_iscsi_map_sg_list() argument
1876 struct scsi_cmnd *sc = cmd->scsi_cmd; in qedi_iscsi_map_sg_list()
1879 bd_count = qedi_map_scsi_sg(cmd->conn->qedi, cmd); in qedi_iscsi_map_sg_list()
1883 struct scsi_sge *bd = cmd->io_tbl.sge_tbl; in qedi_iscsi_map_sg_list()
1890 cmd->io_tbl.sge_valid = bd_count; in qedi_iscsi_map_sg_list()
1975 struct qedi_cmd *cmd = task->dd_data; in qedi_iscsi_send_ioreq() local
2000 qedi_iscsi_map_sg_list(cmd); in qedi_iscsi_send_ioreq()
2012 cmd->task_id = tid; in qedi_iscsi_send_ioreq()
2040 qedi_update_itt_map(qedi, tid, task->itt, cmd); in qedi_iscsi_send_ioreq()
2050 tx_sgl_task_params.sgl = cmd->io_tbl.sge_tbl; in qedi_iscsi_send_ioreq()
2052 (u32)(cmd->io_tbl.sge_tbl_dma); in qedi_iscsi_send_ioreq()
2054 (u32)((u64)cmd->io_tbl.sge_tbl_dma >> 32); in qedi_iscsi_send_ioreq()
2056 tx_sgl_task_params.num_sges = cmd->io_tbl.sge_valid; in qedi_iscsi_send_ioreq()
2057 if (cmd->use_slowpath) in qedi_iscsi_send_ioreq()
2060 rx_sgl_task_params.sgl = cmd->io_tbl.sge_tbl; in qedi_iscsi_send_ioreq()
2062 (u32)(cmd->io_tbl.sge_tbl_dma); in qedi_iscsi_send_ioreq()
2064 (u32)((u64)cmd->io_tbl.sge_tbl_dma >> 32); in qedi_iscsi_send_ioreq()
2066 rx_sgl_task_params.num_sges = cmd->io_tbl.sge_valid; in qedi_iscsi_send_ioreq()
2079 cmd_params.sense_data_buffer_phys_addr.lo = (u32)cmd->sense_buffer_dma; in qedi_iscsi_send_ioreq()
2081 (u32)((u64)cmd->sense_buffer_dma >> 32); in qedi_iscsi_send_ioreq()
2098 "Write " : "Read ", (cmd->io_tbl.sge_valid == 1) ? in qedi_iscsi_send_ioreq()
2099 "Single" : (cmd->use_slowpath ? "SLOW" : "FAST"), in qedi_iscsi_send_ioreq()
2100 (u16)cmd->io_tbl.sge_valid, scsi_bufflen(sc), in qedi_iscsi_send_ioreq()
2101 (u32)(cmd->io_tbl.sge_tbl_dma), in qedi_iscsi_send_ioreq()
2102 (u32)((u64)cmd->io_tbl.sge_tbl_dma >> 32)); in qedi_iscsi_send_ioreq()
2119 list_add_tail(&cmd->io_cmd, &qedi_conn->active_cmd_list); in qedi_iscsi_send_ioreq()
2120 cmd->io_cmd_in_list = true; in qedi_iscsi_send_ioreq()
2134 struct qedi_cmd *cmd = task->dd_data; in qedi_iscsi_cleanup_task() local
2140 cmd->task_id, get_itt(task->itt), task->state, in qedi_iscsi_cleanup_task()
2141 cmd->state, qedi_conn->iscsi_conn_id); in qedi_iscsi_cleanup_task()
2150 task_params.itid = cmd->task_id; in qedi_iscsi_cleanup_task()