Lines Matching refs:cmnd
174 memcpy(fcp_cmnd->fc_cdb, scmnd->cmnd, 16); in csio_scsi_fcp_cmnd()
1560 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); in csio_scsi_err_handler() local
1568 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_scsi_err_handler()
1601 memcpy(cmnd->sense_buffer, in csio_scsi_err_handler()
1606 scsi_set_resid(cmnd, 0); in csio_scsi_err_handler()
1610 scsi_set_resid(cmnd, in csio_scsi_err_handler()
1615 ((scsi_bufflen(cmnd) - scsi_get_resid(cmnd)) in csio_scsi_err_handler()
1616 < cmnd->underflow)) in csio_scsi_err_handler()
1627 " resid:0x%x\n", cmnd->cmnd[0], in csio_scsi_err_handler()
1628 scsi_bufflen(cmnd), scsi_get_resid(cmnd)); in csio_scsi_err_handler()
1637 cmnd->cmnd[0], scsi_bufflen(cmnd), in csio_scsi_err_handler()
1638 scsi_get_resid(cmnd), cmnd->device->lun, in csio_scsi_err_handler()
1647 csio_dbg(hw, "Req %p cmd:%p op:%x %s\n", req, cmnd, in csio_scsi_err_handler()
1648 cmnd->cmnd[0], in csio_scsi_err_handler()
1665 req, cmnd, req->wr_status); in csio_scsi_err_handler()
1707 req->wr_status, req, cmnd); in csio_scsi_err_handler()
1717 scsi_dma_unmap(cmnd); in csio_scsi_err_handler()
1722 cmnd->result = (((host_status) << 16) | scsi_status); in csio_scsi_err_handler()
1723 cmnd->scsi_done(cmnd); in csio_scsi_err_handler()
1739 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); in csio_scsi_cbfn() local
1745 scsi_dma_unmap(cmnd); in csio_scsi_cbfn()
1750 cmnd->result = (((host_status) << 16) | scsi_status); in csio_scsi_cbfn()
1751 cmnd->scsi_done(cmnd); in csio_scsi_cbfn()
1775 csio_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmnd) in csio_queuecommand() argument
1780 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_queuecommand()
1787 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); in csio_queuecommand()
1789 sqset = &hw->sqset[ln->portid][blk_mq_rq_cpu(scsi_cmd_to_rq(cmnd))]; in csio_queuecommand()
1793 cmnd->result = nr; in csio_queuecommand()
1799 cmnd->result = (DID_REQUEUE << 16); in csio_queuecommand()
1805 nsge = scsi_dma_map(cmnd); in csio_queuecommand()
1836 csio_scsi_cmnd(ioreq) = (void *)cmnd; in csio_queuecommand()
1838 ioreq->datadir = cmnd->sc_data_direction; in csio_queuecommand()
1840 if (cmnd->sc_data_direction == DMA_TO_DEVICE) { in csio_queuecommand()
1842 ln->stats.n_output_bytes += scsi_bufflen(cmnd); in csio_queuecommand()
1843 } else if (cmnd->sc_data_direction == DMA_FROM_DEVICE) { in csio_queuecommand()
1845 ln->stats.n_input_bytes += scsi_bufflen(cmnd); in csio_queuecommand()
1853 cmnd->host_scribble = (unsigned char *)ioreq; in csio_queuecommand()
1854 cmnd->SCp.Message = 0; in csio_queuecommand()
1874 scsi_dma_unmap(cmnd); in csio_queuecommand()
1879 cmnd->scsi_done(cmnd); in csio_queuecommand()
1909 csio_eh_abort_handler(struct scsi_cmnd *cmnd) in csio_eh_abort_handler() argument
1912 struct csio_lnode *ln = shost_priv(cmnd->device->host); in csio_eh_abort_handler()
1918 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_eh_abort_handler()
1920 ret = fc_block_scsi_eh(cmnd); in csio_eh_abort_handler()
1924 ioreq = (struct csio_ioreq *)cmnd->host_scribble; in csio_eh_abort_handler()
1934 ioreq, cmnd, *((uint64_t *)cmnd->cmnd), rn->flowid, in csio_eh_abort_handler()
1935 cmnd->device->lun, csio_q_physiqid(hw, ioreq->iq_idx)); in csio_eh_abort_handler()
1937 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) != cmnd) { in csio_eh_abort_handler()
1968 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) { in csio_eh_abort_handler()
1975 scsi_dma_unmap(cmnd); in csio_eh_abort_handler()
1981 cmnd->result = (DID_ERROR << 16); in csio_eh_abort_handler()
1982 cmnd->scsi_done(cmnd); in csio_eh_abort_handler()
1988 if (host_byte(cmnd->result) == DID_REQUEUE) { in csio_eh_abort_handler()
1991 cmnd->device->id, cmnd->device->lun, in csio_eh_abort_handler()
1992 scsi_cmd_to_rq(cmnd)->tag); in csio_eh_abort_handler()
1997 cmnd->device->id, cmnd->device->lun, in csio_eh_abort_handler()
1998 scsi_cmd_to_rq(cmnd)->tag); in csio_eh_abort_handler()
2015 struct scsi_cmnd *cmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); in csio_tm_cbfn() local
2025 cmnd->SCp.Status = req->wr_status; in csio_tm_cbfn()
2048 cmnd->SCp.Status = FW_SUCCESS; in csio_tm_cbfn()
2058 csio_eh_lun_reset_handler(struct scsi_cmnd *cmnd) in csio_eh_lun_reset_handler() argument
2060 struct csio_lnode *ln = shost_priv(cmnd->device->host); in csio_eh_lun_reset_handler()
2063 struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata); in csio_eh_lun_reset_handler()
2076 cmnd->device->lun, rn->flowid, rn->scsi_id); in csio_eh_lun_reset_handler()
2082 ln->vnp_flowid, cmnd->device->lun); in csio_eh_lun_reset_handler()
2087 ret = fc_block_scsi_eh(cmnd); in csio_eh_lun_reset_handler()
2102 rn->flowid, cmnd->device->lun); in csio_eh_lun_reset_handler()
2122 csio_scsi_cmnd(ioreq) = cmnd; in csio_eh_lun_reset_handler()
2123 cmnd->host_scribble = (unsigned char *)ioreq; in csio_eh_lun_reset_handler()
2124 cmnd->SCp.Status = 0; in csio_eh_lun_reset_handler()
2126 cmnd->SCp.Message = FCP_TMF_LUN_RESET; in csio_eh_lun_reset_handler()
2143 sld.oslun = cmnd->device->lun; in csio_eh_lun_reset_handler()
2159 while ((((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) in csio_eh_lun_reset_handler()
2164 if (((struct scsi_cmnd *)csio_scsi_cmnd(ioreq)) == cmnd) { in csio_eh_lun_reset_handler()
2166 cmnd->device->id, cmnd->device->lun); in csio_eh_lun_reset_handler()
2177 if (cmnd->SCp.Status != FW_SUCCESS) { in csio_eh_lun_reset_handler()
2179 cmnd->device->id, cmnd->device->lun, cmnd->SCp.Status); in csio_eh_lun_reset_handler()
2199 " returned %d\n", cmnd->device->lun, retval); in csio_eh_lun_reset_handler()
2210 cmnd->device->id, cmnd->device->lun); in csio_eh_lun_reset_handler()