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 bnx2fc_priv(sc_cmd)->io_req = NULL;
208 scsi_done(sc_cmd);
659 static int bnx2fc_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags)
671 struct Scsi_Host *host = sc_cmd->device->host;
681 rport = starget_to_rport(scsi_target(sc_cmd->device));
692 rc = fc_block_scsi_eh(sc_cmd);
721 io_req->sc_cmd = sc_cmd;
743 memset(fcp_cmnd->fc_cdb, 0, sc_cmd->cmd_len);
766 bnx2fc_priv(sc_cmd)->io_req = io_req;
871 abts_io_req->sc_cmd = NULL;
964 seq_clnp_req->sc_cmd = NULL;
1022 cleanup_io_req->sc_cmd = NULL;
1058 * @sc_cmd: SCSI command
1063 int bnx2fc_eh_target_reset(struct scsi_cmnd *sc_cmd)
1065 return bnx2fc_initiate_tmf(sc_cmd, FCP_TMF_TGT_RESET);
1071 * @sc_cmd: SCSI command
1076 int bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd)
1078 return bnx2fc_initiate_tmf(sc_cmd, FCP_TMF_LUN_RESET);
1119 * @sc_cmd: SCSI_ML command pointer
1123 int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
1125 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
1133 rc = fc_block_scsi_eh(sc_cmd);
1137 lport = shost_priv(sc_cmd->device->host);
1148 io_req = bnx2fc_priv(sc_cmd)->io_req;
1453 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1456 u64 tm_lun = sc_cmd->device->lun;
1468 lun = cmd->sc_cmd->device->lun;
1526 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1573 if (!bnx2fc_priv(sc_cmd)->io_req) {
1581 sc_cmd->result = DID_OK << 16;
1584 sc_cmd->result = (DID_OK << 16) | io_req->cdb_status;
1587 scsi_set_resid(sc_cmd, io_req->fcp_resid);
1596 sc_cmd = io_req->sc_cmd;
1597 io_req->sc_cmd = NULL;
1610 bnx2fc_priv(sc_cmd)->io_req = NULL;
1611 scsi_done(sc_cmd);
1649 struct scsi_cmnd *sc = io_req->sc_cmd;
1693 struct scsi_cmnd *sc = io_req->sc_cmd;
1723 struct scsi_cmnd *sc = io_req->sc_cmd;
1741 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1745 int_to_scsilun(sc_cmd->device->lun, &fcp_cmnd->fc_lun);
1748 memcpy(fcp_cmnd->fc_cdb, sc_cmd->cmnd, sc_cmd->cmd_len);
1761 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1824 memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
1826 memcpy(sc_cmd->sense_buffer, rq_data, fcp_sns_len);
1835 * @sc_cmd: struct scsi_cmnd to be executed
1840 struct scsi_cmnd *sc_cmd)
1843 struct fc_rport *rport = starget_to_rport(scsi_target(sc_cmd->device));
1852 sc_cmd->result = rval;
1853 scsi_done(sc_cmd);
1890 io_req->sc_cmd = sc_cmd;
1910 struct scsi_cmnd *sc_cmd;
1933 sc_cmd = io_req->sc_cmd;
1934 if (sc_cmd == NULL) {
1935 printk(KERN_ERR PFX "scsi_cmd_compl - sc_cmd is NULL\n");
1946 if (!bnx2fc_priv(sc_cmd)->io_req) {
1969 io_req->sc_cmd = NULL;
1975 sc_cmd->result = DID_OK << 16;
1981 sc_cmd->result = (DID_OK << 16) | io_req->cdb_status;
2011 scsi_set_resid(sc_cmd, io_req->fcp_resid);
2018 bnx2fc_priv(sc_cmd)->io_req = NULL;
2019 scsi_done(sc_cmd);
2028 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
2042 io_req->data_xfer_len = scsi_bufflen(sc_cmd);
2043 bnx2fc_priv(sc_cmd)->io_req = io_req;
2045 if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) {
2049 } else if (sc_cmd->sc_data_direction == DMA_TO_DEVICE) {