Lines Matching refs:sc_cmd

456 	struct scsi_cmnd *sc = io_req->sc_cmd;  in qedf_map_sg()
544 struct scsi_cmnd *sc = io_req->sc_cmd; in qedf_build_bd_list_from_sg()
565 struct scsi_cmnd *sc_cmd = io_req->sc_cmd; in qedf_build_fcp_cmnd() local
571 int_to_scsilun(sc_cmd->device->lun, in qedf_build_fcp_cmnd()
584 if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) in qedf_build_fcp_cmnd()
586 else if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) in qedf_build_fcp_cmnd()
594 memcpy(fcp_cmnd->fc_cdb, sc_cmd->cmnd, sc_cmd->cmd_len); in qedf_build_fcp_cmnd()
605 struct scsi_cmnd *sc_cmd = io_req->sc_cmd; in qedf_init_task() local
627 if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) { in qedf_init_task()
657 scsi_bufflen(io_req->sc_cmd); in qedf_init_task()
818 struct scsi_cmnd *sc_cmd = io_req->sc_cmd; in qedf_trace_io() local
828 io_log->lun = sc_cmd->device->lun; in qedf_trace_io()
829 io_log->op = op = sc_cmd->cmnd[0]; in qedf_trace_io()
830 io_log->lba[0] = sc_cmd->cmnd[2]; in qedf_trace_io()
831 io_log->lba[1] = sc_cmd->cmnd[3]; in qedf_trace_io()
832 io_log->lba[2] = sc_cmd->cmnd[4]; in qedf_trace_io()
833 io_log->lba[3] = sc_cmd->cmnd[5]; in qedf_trace_io()
834 io_log->bufflen = scsi_bufflen(sc_cmd); in qedf_trace_io()
835 io_log->sg_count = scsi_sg_count(sc_cmd); in qedf_trace_io()
836 io_log->result = sc_cmd->result; in qedf_trace_io()
862 struct scsi_cmnd *sc_cmd = io_req->sc_cmd; in qedf_post_io_req() local
863 struct Scsi_Host *host = sc_cmd->device->host; in qedf_post_io_req()
873 io_req->data_xfer_len = scsi_bufflen(sc_cmd); in qedf_post_io_req()
874 sc_cmd->SCp.ptr = (char *)io_req; in qedf_post_io_req()
880 if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) { in qedf_post_io_req()
884 } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) { in qedf_post_io_req()
926 if (qedf_io_tracing && io_req->sc_cmd) in qedf_post_io_req()
933 qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd) in qedf_queuecommand() argument
937 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device)); in qedf_queuecommand()
948 sc_cmd->result = DID_NO_CONNECT << 16; in qedf_queuecommand()
949 sc_cmd->scsi_done(sc_cmd); in qedf_queuecommand()
956 sc_cmd); in qedf_queuecommand()
957 sc_cmd->result = DID_NO_CONNECT << 16; in qedf_queuecommand()
958 sc_cmd->scsi_done(sc_cmd); in qedf_queuecommand()
964 sc_cmd->result = rval; in qedf_queuecommand()
965 sc_cmd->scsi_done(sc_cmd); in qedf_queuecommand()
1008 io_req->sc_cmd = sc_cmd; in qedf_queuecommand()
1027 struct scsi_cmnd *sc_cmd = io_req->sc_cmd; in qedf_parse_fcp_rsp() local
1041 CMD_SCSI_STATUS(sc_cmd) = io_req->cdb_status = in qedf_parse_fcp_rsp()
1073 if (sc_cmd->sense_buffer) { in qedf_parse_fcp_rsp()
1074 memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); in qedf_parse_fcp_rsp()
1076 memcpy(sc_cmd->sense_buffer, sense_data, in qedf_parse_fcp_rsp()
1083 struct scsi_cmnd *sc = io_req->sc_cmd; in qedf_unmap_sg_list()
1097 struct scsi_cmnd *sc_cmd; in qedf_scsi_completion() local
1111 sc_cmd = io_req->sc_cmd; in qedf_scsi_completion()
1114 if (!sc_cmd) { in qedf_scsi_completion()
1119 if (!sc_cmd->SCp.ptr) { in qedf_scsi_completion()
1125 if (!sc_cmd->request) { in qedf_scsi_completion()
1127 "sc_cmd=%p.\n", sc_cmd); in qedf_scsi_completion()
1131 if (!sc_cmd->request->special) { in qedf_scsi_completion()
1133 "request not valid, sc_cmd=%p.\n", sc_cmd); in qedf_scsi_completion()
1137 if (!sc_cmd->request->q) { in qedf_scsi_completion()
1139 "is not valid, sc_cmd=%p.\n", sc_cmd); in qedf_scsi_completion()
1155 sc_cmd->result = DID_BUS_BUSY << 16; in qedf_scsi_completion()
1169 sc_cmd->result = (DID_ERROR << 16) | io_req->cdb_status; in qedf_scsi_completion()
1171 sc_cmd->result = (DID_OK << 16) | io_req->cdb_status; in qedf_scsi_completion()
1178 sc_cmd->result = (DID_ERROR << 16) | io_req->cdb_status; in qedf_scsi_completion()
1185 scsi_set_resid(sc_cmd, scsi_bufflen(sc_cmd)); in qedf_scsi_completion()
1193 sc_cmd->result = DID_OK << 16; in qedf_scsi_completion()
1200 qedf->lport->host->host_no, sc_cmd->device->id, in qedf_scsi_completion()
1201 sc_cmd->device->lun, io_req->xid, in qedf_scsi_completion()
1202 sc_cmd->cmnd[0], sc_cmd->cmnd[2], sc_cmd->cmnd[3], in qedf_scsi_completion()
1203 sc_cmd->cmnd[4], sc_cmd->cmnd[5], in qedf_scsi_completion()
1206 sc_cmd->result = (DID_OK << 16) | io_req->cdb_status; in qedf_scsi_completion()
1240 scsi_set_resid(sc_cmd, io_req->fcp_resid); in qedf_scsi_completion()
1252 io_req->sc_cmd = NULL; in qedf_scsi_completion()
1253 sc_cmd->SCp.ptr = NULL; in qedf_scsi_completion()
1254 sc_cmd->scsi_done(sc_cmd); in qedf_scsi_completion()
1263 struct scsi_cmnd *sc_cmd; in qedf_scsi_done() local
1270 sc_cmd = io_req->sc_cmd; in qedf_scsi_done()
1272 if (!sc_cmd) { in qedf_scsi_done()
1277 if (!sc_cmd->SCp.ptr) { in qedf_scsi_done()
1285 sc_cmd->result = result << 16; in qedf_scsi_done()
1290 qedf->lport->host->host_no, sc_cmd->device->id, in qedf_scsi_done()
1291 sc_cmd->device->lun, sc_cmd, sc_cmd->result, sc_cmd->cmnd[0], in qedf_scsi_done()
1292 sc_cmd->cmnd[2], sc_cmd->cmnd[3], sc_cmd->cmnd[4], in qedf_scsi_done()
1293 sc_cmd->cmnd[5], sc_cmd->allowed, sc_cmd->retries, in qedf_scsi_done()
1300 scsi_set_resid(sc_cmd, scsi_bufflen(sc_cmd)); in qedf_scsi_done()
1305 io_req->sc_cmd = NULL; in qedf_scsi_done()
1306 sc_cmd->SCp.ptr = NULL; in qedf_scsi_done()
1307 sc_cmd->scsi_done(sc_cmd); in qedf_scsi_done()
1498 if (io_req->sc_cmd) { in qedf_flush_active_ios()
1510 if (!io_req->sc_cmd) in qedf_flush_active_ios()
1513 if (io_req->sc_cmd->device->lun != in qedf_flush_active_ios()
1685 if (io_req->sc_cmd) { in qedf_process_abts_compl()
1890 if (io_req->sc_cmd) { in qedf_initiate_cleanup()
1915 static int qedf_execute_tmf(struct qedf_rport *fcport, struct scsi_cmnd *sc_cmd, in qedf_execute_tmf() argument
1929 if (!sc_cmd) { in qedf_execute_tmf()
1956 io_req->sc_cmd = sc_cmd; in qedf_execute_tmf()
2008 qedf_flush_active_ios(fcport, (int)sc_cmd->device->lun); in qedf_execute_tmf()
2025 int qedf_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags) in qedf_initiate_tmf() argument
2027 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device)); in qedf_initiate_tmf()
2064 rc = qedf_execute_tmf(fcport, sc_cmd, tm_flags); in qedf_initiate_tmf()
2078 io_req->sc_cmd = NULL; in qedf_process_tmf_compl()