Lines Matching refs:cmd
627 long esas2r_proc_ioctl(struct file *fp, unsigned int cmd, unsigned long arg) in esas2r_proc_ioctl() argument
630 cmd, (void __user *)arg); in esas2r_proc_ioctl()
821 int esas2r_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) in esas2r_queuecommand() argument
824 (struct esas2r_adapter *)cmd->device->host->hostdata; in esas2r_queuecommand()
830 cmd->result = DID_OK << 16; in esas2r_queuecommand()
833 cmd->result = DID_NO_CONNECT << 16; in esas2r_queuecommand()
834 scsi_done(cmd); in esas2r_queuecommand()
844 rq->cmd = cmd; in esas2r_queuecommand()
845 bufflen = scsi_bufflen(cmd); in esas2r_queuecommand()
848 if (cmd->sc_data_direction == DMA_TO_DEVICE) in esas2r_queuecommand()
850 else if (cmd->sc_data_direction == DMA_FROM_DEVICE) in esas2r_queuecommand()
854 memcpy(rq->vrq->scsi.cdb, cmd->cmnd, cmd->cmd_len); in esas2r_queuecommand()
856 rq->target_id = cmd->device->id; in esas2r_queuecommand()
857 rq->vrq->scsi.flags |= cpu_to_le32(cmd->device->lun); in esas2r_queuecommand()
858 rq->sense_buf = cmd->sense_buffer; in esas2r_queuecommand()
866 sgc.cur_sgel = scsi_sglist(cmd); in esas2r_queuecommand()
868 sgc.num_sgel = scsi_dma_map(cmd); in esas2r_queuecommand()
879 scsi_dma_unmap(cmd); in esas2r_queuecommand()
884 esas2r_debug("start request %p to %d:%d\n", rq, (int)cmd->device->id, in esas2r_queuecommand()
885 (int)cmd->device->lun); in esas2r_queuecommand()
907 struct scsi_cmnd *cmd, in esas2r_check_active_queue() argument
919 if (rq->cmd == cmd) { in esas2r_check_active_queue()
933 cmd); in esas2r_check_active_queue()
978 int esas2r_eh_abort(struct scsi_cmnd *cmd) in esas2r_eh_abort() argument
981 (struct esas2r_adapter *)cmd->device->host->hostdata; in esas2r_eh_abort()
987 esas2r_log(ESAS2R_LOG_INFO, "eh_abort (%p)", cmd); in esas2r_eh_abort()
990 cmd->result = DID_ABORT << 16; in esas2r_eh_abort()
992 scsi_set_resid(cmd, 0); in esas2r_eh_abort()
994 scsi_done(cmd); in esas2r_eh_abort()
1010 result = esas2r_check_active_queue(a, &abort_request, cmd, queue); in esas2r_eh_abort()
1056 cmd->result = DID_ABORT << 16; in esas2r_eh_abort()
1058 scsi_set_resid(cmd, 0); in esas2r_eh_abort()
1060 scsi_done(cmd); in esas2r_eh_abort()
1065 static int esas2r_host_bus_reset(struct scsi_cmnd *cmd, bool host_reset) in esas2r_host_bus_reset() argument
1068 (struct esas2r_adapter *)cmd->device->host->hostdata; in esas2r_host_bus_reset()
1093 int esas2r_host_reset(struct scsi_cmnd *cmd) in esas2r_host_reset() argument
1095 esas2r_log(ESAS2R_LOG_INFO, "host_reset (%p)", cmd); in esas2r_host_reset()
1097 return esas2r_host_bus_reset(cmd, true); in esas2r_host_reset()
1100 int esas2r_bus_reset(struct scsi_cmnd *cmd) in esas2r_bus_reset() argument
1102 esas2r_log(ESAS2R_LOG_INFO, "bus_reset (%p)", cmd); in esas2r_bus_reset()
1104 return esas2r_host_bus_reset(cmd, false); in esas2r_bus_reset()
1107 static int esas2r_dev_targ_reset(struct scsi_cmnd *cmd, bool target_reset) in esas2r_dev_targ_reset() argument
1110 (struct esas2r_adapter *)cmd->device->host->hostdata; in esas2r_dev_targ_reset()
1125 cmd->device->id); in esas2r_dev_targ_reset()
1130 cmd->device->id, in esas2r_dev_targ_reset()
1131 cmd->device->lun); in esas2r_dev_targ_reset()
1138 rq->target_id = cmd->device->id; in esas2r_dev_targ_reset()
1139 rq->vrq->scsi.flags |= cpu_to_le32(cmd->device->lun); in esas2r_dev_targ_reset()
1147 cmd->device->id); in esas2r_dev_targ_reset()
1151 cmd->device->id, cmd->device->lun); in esas2r_dev_targ_reset()
1183 int esas2r_device_reset(struct scsi_cmnd *cmd) in esas2r_device_reset() argument
1185 esas2r_log(ESAS2R_LOG_INFO, "device_reset (%p)", cmd); in esas2r_device_reset()
1187 return esas2r_dev_targ_reset(cmd, false); in esas2r_device_reset()
1191 int esas2r_target_reset(struct scsi_cmnd *cmd) in esas2r_target_reset() argument
1193 esas2r_log(ESAS2R_LOG_INFO, "target_reset (%p)", cmd); in esas2r_target_reset()
1195 return esas2r_dev_targ_reset(cmd, true); in esas2r_target_reset()
1521 scsi_dma_unmap(rq->cmd); in esas2r_complete_request_cb()
1527 rq->cmd); in esas2r_complete_request_cb()
1529 rq->cmd->result = in esas2r_complete_request_cb()
1534 scsi_set_resid(rq->cmd, in esas2r_complete_request_cb()
1538 scsi_set_resid(rq->cmd, 0); in esas2r_complete_request_cb()
1541 scsi_done(rq->cmd); in esas2r_complete_request_cb()