Lines Matching refs:cmd

291 		container_of(se_cmd, struct efct_scsi_tgt_io, cmd);  in efct_lio_check_stop_free()
311 container_of(se_cmd, struct efct_scsi_tgt_io, cmd); in efct_lio_aborted_task()
329 container_of(se_cmd, struct efct_scsi_tgt_io, cmd); in efct_lio_release_cmd()
353 static int efct_lio_get_cmd_state(struct se_cmd *cmd) in efct_lio_get_cmd_state() argument
356 container_of(cmd, struct efct_scsi_tgt_io, cmd); in efct_lio_get_cmd_state()
366 struct se_cmd *cmd = &ocp->cmd; in efct_lio_sg_map() local
368 ocp->seg_map_cnt = dma_map_sg(&io->efct->pci->dev, cmd->t_data_sg, in efct_lio_sg_map()
369 cmd->t_data_nents, cmd->data_direction); in efct_lio_sg_map()
379 struct se_cmd *cmd = &ocp->cmd; in efct_lio_sg_unmap() local
381 if (WARN_ON(!ocp->seg_map_cnt || !cmd->t_data_sg)) in efct_lio_sg_unmap()
384 dma_unmap_sg(&io->efct->pci->dev, cmd->t_data_sg, in efct_lio_sg_unmap()
385 ocp->seg_map_cnt, cmd->data_direction); in efct_lio_sg_unmap()
409 transport_generic_free_cmd(&io->tgt_io.cmd, 0); in efct_lio_status_done()
418 efct_lio_write_pending(struct se_cmd *cmd) in efct_lio_write_pending() argument
421 container_of(cmd, struct efct_scsi_tgt_io, cmd); in efct_lio_write_pending()
430 cmd->transport_state, cmd->se_cmd_flags); in efct_lio_write_pending()
433 ocp->seg_cnt = cmd->t_data_nents; in efct_lio_write_pending()
443 for (cnt = 0, sg = cmd->t_data_sg; cnt < ocp->cur_seg; cnt++, in efct_lio_write_pending()
463 efct_lio_queue_data_in(struct se_cmd *cmd) in efct_lio_queue_data_in() argument
466 container_of(cmd, struct efct_scsi_tgt_io, cmd); in efct_lio_queue_data_in()
476 if (cmd->data_length) { in efct_lio_queue_data_in()
477 ocp->seg_cnt = cmd->t_data_nents; in efct_lio_queue_data_in()
491 cmd); in efct_lio_queue_data_in()
499 sg = &cmd->t_data_sg[ocp->cur_seg]; in efct_lio_queue_data_in()
502 if (ocp->transferred_len + sg_dma_len(sg) >= cmd->data_length) in efct_lio_queue_data_in()
503 sgl[cnt].len = cmd->data_length - ocp->transferred_len; in efct_lio_queue_data_in()
511 if (ocp->transferred_len == cmd->data_length) in efct_lio_queue_data_in()
515 if (ocp->transferred_len == cmd->data_length) { in efct_lio_queue_data_in()
521 if (cmd->residual_count) in efct_lio_queue_data_in()
536 struct se_cmd *cmd = &io->tgt_io.cmd; in efct_lio_send_resp() local
542 transport_generic_free_cmd(&io->tgt_io.cmd, 0); in efct_lio_send_resp()
548 rsp.scsi_status = cmd->scsi_status; in efct_lio_send_resp()
550 rsp.sense_data_length = cmd->scsi_sense_length; in efct_lio_send_resp()
553 if (cmd->se_cmd_flags & SCF_OVERFLOW_BIT) in efct_lio_send_resp()
554 rsp.residual = -cmd->residual_count; in efct_lio_send_resp()
555 else if (cmd->se_cmd_flags & SCF_UNDERFLOW_BIT) in efct_lio_send_resp()
556 rsp.residual = cmd->residual_count; in efct_lio_send_resp()
563 transport_generic_free_cmd(&io->tgt_io.cmd, 0); in efct_lio_send_resp()
590 rc = efct_lio_write_pending(&ocp->cmd); in efct_lio_datamove_done()
592 rc = efct_lio_queue_data_in(&ocp->cmd); in efct_lio_datamove_done()
609 io->tgt_io.cmd.transport_state); in efct_lio_datamove_done()
611 transport_generic_request_failure(&io->tgt_io.cmd, in efct_lio_datamove_done()
618 target_execute_cmd(&io->tgt_io.cmd); in efct_lio_datamove_done()
631 &io->tgt_io.cmd, scsi_status, flags); in efct_lio_tmf_done()
634 transport_generic_free_cmd(&io->tgt_io.cmd, 0); in efct_lio_tmf_done()
644 &tmfio->tgt_io.cmd, scsi_status, flags); in efct_lio_null_tmf_done()
652 efct_lio_queue_status(struct se_cmd *cmd) in efct_lio_queue_status() argument
656 container_of(cmd, struct efct_scsi_tgt_io, cmd); in efct_lio_queue_status()
663 cmd->scsi_status, cmd->transport_state, cmd->se_cmd_flags, in efct_lio_queue_status()
664 cmd->scsi_sense_length); in efct_lio_queue_status()
667 rsp.scsi_status = cmd->scsi_status; in efct_lio_queue_status()
669 rsp.sense_data_length = cmd->scsi_sense_length; in efct_lio_queue_status()
674 if (cmd->se_cmd_flags & SCF_OVERFLOW_BIT) in efct_lio_queue_status()
675 rsp.residual = -cmd->residual_count; in efct_lio_queue_status()
676 else if (cmd->se_cmd_flags & SCF_UNDERFLOW_BIT) in efct_lio_queue_status()
677 rsp.residual = cmd->residual_count; in efct_lio_queue_status()
686 static void efct_lio_queue_tm_rsp(struct se_cmd *cmd) in efct_lio_queue_tm_rsp() argument
689 container_of(cmd, struct efct_scsi_tgt_io, cmd); in efct_lio_queue_tm_rsp()
691 struct se_tmr_req *se_tmr = cmd->se_tmr_req; in efct_lio_queue_tm_rsp()
695 cmd, se_tmr->function, se_tmr->response); in efct_lio_queue_tm_rsp()
1324 struct se_cmd *se_cmd = &io->tgt_io.cmd; in efct_scsi_recv_cmd()
1374 &ocp->cmd); in efct_scsi_recv_cmd()
1397 efct_scsi_recv_tmf(struct efct_io *tmfio, u32 lun, enum efct_scsi_tmf_cmd cmd, in efct_scsi_recv_tmf() argument
1411 tmfio->display_name, cmd, lun); in efct_scsi_recv_tmf()
1413 switch (cmd) { in efct_scsi_recv_tmf()
1448 rc = target_submit_tmr(&ocp->cmd, se_sess, NULL, lun, ocp, tmr_func, in efct_scsi_recv_tmf()