Lines Matching defs:sc_cmd
165 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
182 io_req->sc_cmd = NULL;
185 if (!sc_cmd) {
186 printk(KERN_ERR PFX "scsi_done - sc_cmd NULL. "
191 if (!sc_cmd->device) {
192 pr_err(PFX "0x%x: sc_cmd->device is NULL.\n", io_req->xid);
195 if (!sc_cmd->device->host) {
196 pr_err(PFX "0x%x: sc_cmd->device->host is NULL.\n",
201 sc_cmd->result = err_code << 16;
204 sc_cmd, host_byte(sc_cmd->result), sc_cmd->retries,
205 sc_cmd->allowed);
206 scsi_set_resid(sc_cmd, scsi_bufflen(sc_cmd));
207 sc_cmd->SCp.ptr = NULL;
208 sc_cmd->scsi_done(sc_cmd);
661 static int bnx2fc_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags)
673 struct Scsi_Host *host = sc_cmd->device->host;
683 rport = starget_to_rport(scsi_target(sc_cmd->device));
694 rc = fc_block_scsi_eh(sc_cmd);
723 io_req->sc_cmd = sc_cmd;
745 memset(fcp_cmnd->fc_cdb, 0, sc_cmd->cmd_len);
768 sc_cmd->SCp.ptr = (char *)io_req;
873 abts_io_req->sc_cmd = NULL;
966 seq_clnp_req->sc_cmd = NULL;
1024 cleanup_io_req->sc_cmd = NULL;
1060 * @sc_cmd: SCSI command
1065 int bnx2fc_eh_target_reset(struct scsi_cmnd *sc_cmd)
1067 return bnx2fc_initiate_tmf(sc_cmd, FCP_TMF_TGT_RESET);
1073 * @sc_cmd: SCSI command
1078 int bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd)
1080 return bnx2fc_initiate_tmf(sc_cmd, FCP_TMF_LUN_RESET);
1121 * @sc_cmd: SCSI_ML command pointer
1125 int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
1127 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
1135 rc = fc_block_scsi_eh(sc_cmd);
1139 lport = shost_priv(sc_cmd->device->host);
1150 io_req = (struct bnx2fc_cmd *)sc_cmd->SCp.ptr;
1455 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1458 u64 tm_lun = sc_cmd->device->lun;
1470 lun = cmd->sc_cmd->device->lun;
1528 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1575 if (!sc_cmd->SCp.ptr) {
1583 sc_cmd->result = DID_OK << 16;
1586 sc_cmd->result = (DID_OK << 16) | io_req->cdb_status;
1589 scsi_set_resid(sc_cmd, io_req->fcp_resid);
1598 sc_cmd = io_req->sc_cmd;
1599 io_req->sc_cmd = NULL;
1612 sc_cmd->SCp.ptr = NULL;
1613 sc_cmd->scsi_done(sc_cmd);
1651 struct scsi_cmnd *sc = io_req->sc_cmd;
1695 struct scsi_cmnd *sc = io_req->sc_cmd;
1725 struct scsi_cmnd *sc = io_req->sc_cmd;
1743 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1747 int_to_scsilun(sc_cmd->device->lun, &fcp_cmnd->fc_lun);
1750 memcpy(fcp_cmnd->fc_cdb, sc_cmd->cmnd, sc_cmd->cmd_len);
1763 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1776 CMD_SCSI_STATUS(sc_cmd) = io_req->cdb_status =
1827 memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
1829 memcpy(sc_cmd->sense_buffer, rq_data, fcp_sns_len);
1838 * @sc_cmd: struct scsi_cmnd to be executed
1843 struct scsi_cmnd *sc_cmd)
1846 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
1855 sc_cmd->result = rval;
1856 sc_cmd->scsi_done(sc_cmd);
1893 io_req->sc_cmd = sc_cmd;
1913 struct scsi_cmnd *sc_cmd;
1936 sc_cmd = io_req->sc_cmd;
1937 if (sc_cmd == NULL) {
1938 printk(KERN_ERR PFX "scsi_cmd_compl - sc_cmd is NULL\n");
1949 if (!sc_cmd->SCp.ptr) {
1972 io_req->sc_cmd = NULL;
1978 sc_cmd->result = DID_OK << 16;
1984 sc_cmd->result = (DID_OK << 16) | io_req->cdb_status;
2014 scsi_set_resid(sc_cmd, io_req->fcp_resid);
2021 sc_cmd->SCp.ptr = NULL;
2022 sc_cmd->scsi_done(sc_cmd);
2031 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
2046 io_req->data_xfer_len = scsi_bufflen(sc_cmd);
2047 sc_cmd->SCp.ptr = (char *)io_req;
2050 if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) {
2054 } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) {