Lines Matching refs:cmnd

174 		memcpy(fcp_cmnd->fc_cdb, scmnd->cmnd, 16);  in csio_scsi_fcp_cmnd()
1564 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); in csio_scsi_err_handler() local
1572 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_scsi_err_handler()
1605 memcpy(cmnd->sense_buffer, in csio_scsi_err_handler()
1610 scsi_set_resid(cmnd, 0); in csio_scsi_err_handler()
1614 scsi_set_resid(cmnd, in csio_scsi_err_handler()
1619 ((scsi_bufflen(cmnd) - scsi_get_resid(cmnd)) in csio_scsi_err_handler()
1620 < cmnd->underflow)) in csio_scsi_err_handler()
1631 " resid:0x%x\n", cmnd->cmnd[0], in csio_scsi_err_handler()
1632 scsi_bufflen(cmnd), scsi_get_resid(cmnd)); in csio_scsi_err_handler()
1641 cmnd->cmnd[0], scsi_bufflen(cmnd), in csio_scsi_err_handler()
1642 scsi_get_resid(cmnd), cmnd->device->lun, in csio_scsi_err_handler()
1651 csio_dbg(hw, "Req %p cmd:%p op:%x %s\n", req, cmnd, in csio_scsi_err_handler()
1652 cmnd->cmnd[0], in csio_scsi_err_handler()
1669 req, cmnd, req->wr_status); in csio_scsi_err_handler()
1711 req->wr_status, req, cmnd); in csio_scsi_err_handler()
1721 scsi_dma_unmap(cmnd); in csio_scsi_err_handler()
1726 cmnd->result = (((host_status) << 16) | scsi_status); in csio_scsi_err_handler()
1727 scsi_done(cmnd); in csio_scsi_err_handler()
1743 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); in csio_scsi_cbfn() local
1749 scsi_dma_unmap(cmnd); in csio_scsi_cbfn()
1754 cmnd->result = (((host_status) << 16) | scsi_status); in csio_scsi_cbfn()
1755 scsi_done(cmnd); in csio_scsi_cbfn()
1779 csio_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmnd) in csio_queuecommand() argument
1784 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_queuecommand()
1791 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); in csio_queuecommand()
1793 sqset = &hw->sqset[ln->portid][blk_mq_rq_cpu(scsi_cmd_to_rq(cmnd))]; in csio_queuecommand()
1797 cmnd->result = nr; in csio_queuecommand()
1803 cmnd->result = (DID_REQUEUE << 16); in csio_queuecommand()
1809 nsge = scsi_dma_map(cmnd); in csio_queuecommand()
1840 csio_scsi_cmnd(ioreq) = (void *)cmnd; in csio_queuecommand()
1842 ioreq->datadir = cmnd->sc_data_direction; in csio_queuecommand()
1844 if (cmnd->sc_data_direction == DMA_TO_DEVICE) { in csio_queuecommand()
1846 ln->stats.n_output_bytes += scsi_bufflen(cmnd); in csio_queuecommand()
1847 } else if (cmnd->sc_data_direction == DMA_FROM_DEVICE) { in csio_queuecommand()
1849 ln->stats.n_input_bytes += scsi_bufflen(cmnd); in csio_queuecommand()
1857 cmnd->host_scribble = (unsigned char *)ioreq; in csio_queuecommand()
1858 csio_priv(cmnd)->fc_tm_flags = 0; in csio_queuecommand()
1878 scsi_dma_unmap(cmnd); in csio_queuecommand()
1883 scsi_done(cmnd); in csio_queuecommand()
1913 csio_eh_abort_handler(struct scsi_cmnd *cmnd) in csio_eh_abort_handler() argument
1916 struct csio_lnode *ln = shost_priv(cmnd->device->host); in csio_eh_abort_handler()
1922 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_eh_abort_handler()
1924 ret = fc_block_scsi_eh(cmnd); in csio_eh_abort_handler()
1928 ioreq = (struct csio_ioreq *)cmnd->host_scribble; in csio_eh_abort_handler()
1938 ioreq, cmnd, *((uint64_t *)cmnd->cmnd), rn->flowid, in csio_eh_abort_handler()
1939 cmnd->device->lun, csio_q_physiqid(hw, ioreq->iq_idx)); in csio_eh_abort_handler()
1941 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) != cmnd) { in csio_eh_abort_handler()
1972 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) { in csio_eh_abort_handler()
1979 scsi_dma_unmap(cmnd); in csio_eh_abort_handler()
1985 cmnd->result = (DID_ERROR << 16); in csio_eh_abort_handler()
1986 scsi_done(cmnd); in csio_eh_abort_handler()
1992 if (host_byte(cmnd->result) == DID_REQUEUE) { in csio_eh_abort_handler()
1995 cmnd->device->id, cmnd->device->lun, in csio_eh_abort_handler()
1996 scsi_cmd_to_rq(cmnd)->tag); in csio_eh_abort_handler()
2001 cmnd->device->id, cmnd->device->lun, in csio_eh_abort_handler()
2002 scsi_cmd_to_rq(cmnd)->tag); in csio_eh_abort_handler()
2019 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); in csio_tm_cbfn() local
2029 csio_priv(cmnd)->wr_status = req->wr_status; in csio_tm_cbfn()
2052 csio_priv(cmnd)->wr_status = FW_SUCCESS; in csio_tm_cbfn()
2062 csio_eh_lun_reset_handler(struct scsi_cmnd *cmnd) in csio_eh_lun_reset_handler() argument
2064 struct csio_lnode *ln = shost_priv(cmnd->device->host); in csio_eh_lun_reset_handler()
2067 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_eh_lun_reset_handler()
2080 cmnd->device->lun, rn->flowid, rn->scsi_id); in csio_eh_lun_reset_handler()
2086 ln->vnp_flowid, cmnd->device->lun); in csio_eh_lun_reset_handler()
2091 ret = fc_block_scsi_eh(cmnd); in csio_eh_lun_reset_handler()
2106 rn->flowid, cmnd->device->lun); in csio_eh_lun_reset_handler()
2126 csio_scsi_cmnd(ioreq) = cmnd; in csio_eh_lun_reset_handler()
2127 cmnd->host_scribble = (unsigned char *)ioreq; in csio_eh_lun_reset_handler()
2128 csio_priv(cmnd)->wr_status = 0; in csio_eh_lun_reset_handler()
2130 csio_priv(cmnd)->fc_tm_flags = FCP_TMF_LUN_RESET; in csio_eh_lun_reset_handler()
2147 sld.oslun = cmnd->device->lun; in csio_eh_lun_reset_handler()
2163 while ((((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) in csio_eh_lun_reset_handler()
2168 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) { in csio_eh_lun_reset_handler()
2170 cmnd->device->id, cmnd->device->lun); in csio_eh_lun_reset_handler()
2181 if (csio_priv(cmnd)->wr_status != FW_SUCCESS) { in csio_eh_lun_reset_handler()
2183 cmnd->device->id, cmnd->device->lun, in csio_eh_lun_reset_handler()
2184 csio_priv(cmnd)->wr_status); in csio_eh_lun_reset_handler()
2204 " returned %d\n", cmnd->device->lun, retval); in csio_eh_lun_reset_handler()
2215 cmnd->device->id, cmnd->device->lun); in csio_eh_lun_reset_handler()