Lines Matching defs:sc_cmd
1074 struct scsi_cmnd *sc_cmd;
1080 sc_cmd = fsp->cmd;
1081 if (id != -1 && scmd_id(sc_cmd) != id)
1084 if (lun != -1 && sc_cmd->device->lun != lun)
1863 * @sc_cmd: The scsi_cmnd to be executed
1867 int fc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *sc_cmd)
1870 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
1878 sc_cmd->result = rval;
1879 sc_cmd->scsi_done(sc_cmd);
1888 sc_cmd->result = DID_IMM_RETRY << 16;
1889 sc_cmd->scsi_done(sc_cmd);
1914 fsp->cmd = sc_cmd; /* save the cmd */
1920 fsp->data_len = scsi_bufflen(sc_cmd);
1927 if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) {
1931 } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) {
1967 struct scsi_cmnd *sc_cmd;
1991 sc_cmd = fsp->cmd;
1992 CMD_SCSI_STATUS(sc_cmd) = fsp->cdb_status;
1999 sc_cmd->result = DID_OK << 16;
2001 CMD_RESID_LEN(sc_cmd) = fsp->scsi_resid;
2007 sc_cmd->result = (DID_OK << 16) | fsp->cdb_status;
2013 sc_cmd->result = DID_ERROR << 16;
2022 sc_cmd->result = DID_OK << 16;
2026 sc_cmd->result = DID_ERROR << 16;
2034 CMD_RESID_LEN(sc_cmd) = fsp->scsi_resid;
2035 sc_cmd->result = (DID_ERROR << 16) | fsp->cdb_status;
2044 sc_cmd->result = (DID_ERROR << 16) | fsp->cdb_status;
2047 if (host_byte(sc_cmd->result) == DID_TIME_OUT)
2053 set_host_byte(sc_cmd, DID_ERROR);
2055 sc_cmd->result |= fsp->io_status;
2060 sc_cmd->result = (DID_RESET << 16);
2065 sc_cmd->result = (DID_SOFT_ERROR << 16);
2070 sc_cmd->result = (DID_NO_CONNECT << 16);
2075 sc_cmd->result = (DID_PARITY << 16);
2080 sc_cmd->result = (DID_BUS_BUSY << 16) | fsp->io_status;
2085 sc_cmd->result = (DID_ERROR << 16);
2090 sc_cmd->result = (DID_TRANSPORT_DISRUPTED << 16);
2094 sc_cmd->SCp.ptr = NULL;
2096 sc_cmd->scsi_done(sc_cmd);
2104 * @sc_cmd: The SCSI command to abort
2109 int fc_eh_abort(struct scsi_cmnd *sc_cmd)
2118 rval = fc_block_scsi_eh(sc_cmd);
2122 lport = shost_priv(sc_cmd->device->host);
2130 fsp = CMD_SP(sc_cmd);
2136 /* grab a ref so the fsp and sc_cmd cannot be released from under us */
2157 * @sc_cmd: The SCSI command which identifies the device whose
2162 int fc_eh_device_reset(struct scsi_cmnd *sc_cmd)
2166 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
2170 rval = fc_block_scsi_eh(sc_cmd);
2174 lport = shost_priv(sc_cmd->device->host);
2197 rc = fc_lun_reset(lport, fsp, scmd_id(sc_cmd), sc_cmd->device->lun);
2208 * @sc_cmd: The SCSI command that identifies the SCSI host to be reset
2210 int fc_eh_host_reset(struct scsi_cmnd *sc_cmd)
2212 struct Scsi_Host *shost = sc_cmd->device->host;