scmnd 1242 drivers/infiniband/ulp/srp/ib_srp.c static void srp_unmap_data(struct scsi_cmnd *scmnd, scmnd 1251 drivers/infiniband/ulp/srp/ib_srp.c if (!scsi_sglist(scmnd) || scmnd 1252 drivers/infiniband/ulp/srp/ib_srp.c (scmnd->sc_data_direction != DMA_TO_DEVICE && scmnd 1253 drivers/infiniband/ulp/srp/ib_srp.c scmnd->sc_data_direction != DMA_FROM_DEVICE)) scmnd 1279 drivers/infiniband/ulp/srp/ib_srp.c ib_dma_unmap_sg(ibdev, scsi_sglist(scmnd), scsi_sg_count(scmnd), scmnd 1280 drivers/infiniband/ulp/srp/ib_srp.c scmnd->sc_data_direction); scmnd 1297 drivers/infiniband/ulp/srp/ib_srp.c struct scsi_cmnd *scmnd) scmnd 1302 drivers/infiniband/ulp/srp/ib_srp.c if (req->scmnd && scmnd 1303 drivers/infiniband/ulp/srp/ib_srp.c (!sdev || req->scmnd->device == sdev) && scmnd 1304 drivers/infiniband/ulp/srp/ib_srp.c (!scmnd || req->scmnd == scmnd)) { scmnd 1305 drivers/infiniband/ulp/srp/ib_srp.c scmnd = req->scmnd; scmnd 1306 drivers/infiniband/ulp/srp/ib_srp.c req->scmnd = NULL; scmnd 1308 drivers/infiniband/ulp/srp/ib_srp.c scmnd = NULL; scmnd 1312 drivers/infiniband/ulp/srp/ib_srp.c return scmnd; scmnd 1323 drivers/infiniband/ulp/srp/ib_srp.c struct scsi_cmnd *scmnd, s32 req_lim_delta) scmnd 1327 drivers/infiniband/ulp/srp/ib_srp.c srp_unmap_data(scmnd, ch, req); scmnd 1337 drivers/infiniband/ulp/srp/ib_srp.c struct scsi_cmnd *scmnd = srp_claim_req(ch, req, sdev, NULL); scmnd 1339 drivers/infiniband/ulp/srp/ib_srp.c if (scmnd) { scmnd 1340 drivers/infiniband/ulp/srp/ib_srp.c srp_free_req(ch, req, scmnd, 0); scmnd 1341 drivers/infiniband/ulp/srp/ib_srp.c scmnd->result = result; scmnd 1342 drivers/infiniband/ulp/srp/ib_srp.c scmnd->scsi_done(scmnd); scmnd 1564 drivers/infiniband/ulp/srp/ib_srp.c dev_name(&req->scmnd->device->sdev_gendev), sg_nents, scmnd 1783 drivers/infiniband/ulp/srp/ib_srp.c if (desc_len != scsi_bufflen(req->scmnd) || scmnd 1784 drivers/infiniband/ulp/srp/ib_srp.c mr_len > scsi_bufflen(req->scmnd)) scmnd 1786 drivers/infiniband/ulp/srp/ib_srp.c scsi_bufflen(req->scmnd), desc_len, mr_len, scmnd 1800 drivers/infiniband/ulp/srp/ib_srp.c static int srp_map_data(struct scsi_cmnd *scmnd, struct srp_rdma_ch *ch, scmnd 1818 drivers/infiniband/ulp/srp/ib_srp.c if (!scsi_sglist(scmnd) || scmnd->sc_data_direction == DMA_NONE) scmnd 1821 drivers/infiniband/ulp/srp/ib_srp.c if (scmnd->sc_data_direction != DMA_FROM_DEVICE && scmnd 1822 drivers/infiniband/ulp/srp/ib_srp.c scmnd->sc_data_direction != DMA_TO_DEVICE) { scmnd 1825 drivers/infiniband/ulp/srp/ib_srp.c scmnd->sc_data_direction); scmnd 1829 drivers/infiniband/ulp/srp/ib_srp.c nents = scsi_sg_count(scmnd); scmnd 1830 drivers/infiniband/ulp/srp/ib_srp.c scat = scsi_sglist(scmnd); scmnd 1831 drivers/infiniband/ulp/srp/ib_srp.c data_len = scsi_bufflen(scmnd); scmnd 1836 drivers/infiniband/ulp/srp/ib_srp.c count = ib_dma_map_sg(ibdev, scat, nents, scmnd->sc_data_direction); scmnd 1843 drivers/infiniband/ulp/srp/ib_srp.c scmnd->sc_data_direction == DMA_TO_DEVICE) { scmnd 1965 drivers/infiniband/ulp/srp/ib_srp.c if (scmnd->sc_data_direction == DMA_TO_DEVICE) scmnd 1974 drivers/infiniband/ulp/srp/ib_srp.c if (scmnd->sc_data_direction == DMA_TO_DEVICE) scmnd 1982 drivers/infiniband/ulp/srp/ib_srp.c srp_unmap_data(scmnd, ch, req); scmnd 2119 drivers/infiniband/ulp/srp/ib_srp.c struct scsi_cmnd *scmnd; scmnd 2137 drivers/infiniband/ulp/srp/ib_srp.c scmnd = scsi_host_find_tag(target->scsi_host, rsp->tag); scmnd 2138 drivers/infiniband/ulp/srp/ib_srp.c if (scmnd && scmnd->host_scribble) { scmnd 2139 drivers/infiniband/ulp/srp/ib_srp.c req = (void *)scmnd->host_scribble; scmnd 2140 drivers/infiniband/ulp/srp/ib_srp.c scmnd = srp_claim_req(ch, req, NULL, scmnd); scmnd 2142 drivers/infiniband/ulp/srp/ib_srp.c scmnd = NULL; scmnd 2144 drivers/infiniband/ulp/srp/ib_srp.c if (!scmnd) { scmnd 2155 drivers/infiniband/ulp/srp/ib_srp.c scmnd->result = rsp->status; scmnd 2158 drivers/infiniband/ulp/srp/ib_srp.c memcpy(scmnd->sense_buffer, rsp->data + scmnd 2165 drivers/infiniband/ulp/srp/ib_srp.c scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt)); scmnd 2167 drivers/infiniband/ulp/srp/ib_srp.c scsi_set_resid(scmnd, -be32_to_cpu(rsp->data_in_res_cnt)); scmnd 2169 drivers/infiniband/ulp/srp/ib_srp.c scsi_set_resid(scmnd, be32_to_cpu(rsp->data_out_res_cnt)); scmnd 2171 drivers/infiniband/ulp/srp/ib_srp.c scsi_set_resid(scmnd, -be32_to_cpu(rsp->data_out_res_cnt)); scmnd 2173 drivers/infiniband/ulp/srp/ib_srp.c srp_free_req(ch, req, scmnd, scmnd 2176 drivers/infiniband/ulp/srp/ib_srp.c scmnd->host_scribble = NULL; scmnd 2177 drivers/infiniband/ulp/srp/ib_srp.c scmnd->scsi_done(scmnd); scmnd 2340 drivers/infiniband/ulp/srp/ib_srp.c static int srp_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd) scmnd 2353 drivers/infiniband/ulp/srp/ib_srp.c scmnd->result = srp_chkready(target->rport); scmnd 2354 drivers/infiniband/ulp/srp/ib_srp.c if (unlikely(scmnd->result)) scmnd 2357 drivers/infiniband/ulp/srp/ib_srp.c WARN_ON_ONCE(scmnd->request->tag < 0); scmnd 2358 drivers/infiniband/ulp/srp/ib_srp.c tag = blk_mq_unique_tag(scmnd->request); scmnd 2377 drivers/infiniband/ulp/srp/ib_srp.c scmnd->host_scribble = (void *) req; scmnd 2383 drivers/infiniband/ulp/srp/ib_srp.c int_to_scsilun(scmnd->device->lun, &cmd->lun); scmnd 2385 drivers/infiniband/ulp/srp/ib_srp.c memcpy(cmd->cdb, scmnd->cmnd, scmnd->cmd_len); scmnd 2386 drivers/infiniband/ulp/srp/ib_srp.c if (unlikely(scmnd->cmd_len > sizeof(cmd->cdb))) { scmnd 2387 drivers/infiniband/ulp/srp/ib_srp.c cmd->add_cdb_len = round_up(scmnd->cmd_len - sizeof(cmd->cdb), scmnd 2393 drivers/infiniband/ulp/srp/ib_srp.c req->scmnd = scmnd; scmnd 2396 drivers/infiniband/ulp/srp/ib_srp.c len = srp_map_data(scmnd, ch, req); scmnd 2406 drivers/infiniband/ulp/srp/ib_srp.c scmnd->result = len == -ENOMEM ? scmnd 2416 drivers/infiniband/ulp/srp/ib_srp.c scmnd->result = DID_ERROR << 16; scmnd 2423 drivers/infiniband/ulp/srp/ib_srp.c srp_unmap_data(scmnd, ch, req); scmnd 2432 drivers/infiniband/ulp/srp/ib_srp.c req->scmnd = NULL; scmnd 2435 drivers/infiniband/ulp/srp/ib_srp.c if (scmnd->result) { scmnd 2436 drivers/infiniband/ulp/srp/ib_srp.c scmnd->scsi_done(scmnd); scmnd 2975 drivers/infiniband/ulp/srp/ib_srp.c static int srp_abort(struct scsi_cmnd *scmnd) scmnd 2977 drivers/infiniband/ulp/srp/ib_srp.c struct srp_target_port *target = host_to_target(scmnd->device->host); scmnd 2978 drivers/infiniband/ulp/srp/ib_srp.c struct srp_request *req = (struct srp_request *) scmnd->host_scribble; scmnd 2988 drivers/infiniband/ulp/srp/ib_srp.c tag = blk_mq_unique_tag(scmnd->request); scmnd 2993 drivers/infiniband/ulp/srp/ib_srp.c if (!srp_claim_req(ch, req, NULL, scmnd)) scmnd 2997 drivers/infiniband/ulp/srp/ib_srp.c if (srp_send_tsk_mgmt(ch, tag, scmnd->device->lun, scmnd 3005 drivers/infiniband/ulp/srp/ib_srp.c srp_free_req(ch, req, scmnd, 0); scmnd 3006 drivers/infiniband/ulp/srp/ib_srp.c scmnd->result = DID_ABORT << 16; scmnd 3007 drivers/infiniband/ulp/srp/ib_srp.c scmnd->scsi_done(scmnd); scmnd 3013 drivers/infiniband/ulp/srp/ib_srp.c static int srp_reset_device(struct scsi_cmnd *scmnd) scmnd 3015 drivers/infiniband/ulp/srp/ib_srp.c struct srp_target_port *target = host_to_target(scmnd->device->host); scmnd 3022 drivers/infiniband/ulp/srp/ib_srp.c if (srp_send_tsk_mgmt(ch, SRP_TAG_NO_REQ, scmnd->device->lun, scmnd 3031 drivers/infiniband/ulp/srp/ib_srp.c static int srp_reset_host(struct scsi_cmnd *scmnd) scmnd 3033 drivers/infiniband/ulp/srp/ib_srp.c struct srp_target_port *target = host_to_target(scmnd->device->host); scmnd 128 drivers/infiniband/ulp/srp/ib_srp.h struct scsi_cmnd *scmnd; scmnd 445 drivers/s390/scsi/zfcp_dbf.h static inline void zfcp_dbf_scsi_nullcmnd(struct scsi_cmnd *scmnd, scmnd 448 drivers/s390/scsi/zfcp_dbf.h _zfcp_dbf_scsi("scfc__1", 3, scmnd, fsf_req); scmnd 910 drivers/s390/scsi/zfcp_fsf.c struct zfcp_fsf_req *zfcp_fsf_abort_fcp_cmnd(struct scsi_cmnd *scmnd) scmnd 913 drivers/s390/scsi/zfcp_fsf.c struct scsi_device *sdev = scmnd->device; scmnd 916 drivers/s390/scsi/zfcp_fsf.c unsigned long old_req_id = (unsigned long) scmnd->host_scribble; scmnd 623 drivers/scsi/aacraid/linit.c struct scsi_cmnd *scmnd = NULL; scmnd 634 drivers/scsi/aacraid/linit.c list_for_each_entry(scmnd, &sdev->cmd_list, list) { scmnd 635 drivers/scsi/aacraid/linit.c switch (scmnd->SCp.phase) { scmnd 86 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd = csio_scsi_cmnd(ioreq); scmnd 90 drivers/scsi/csiostor/csio_scsi.c if (scmnd == NULL) scmnd 95 drivers/scsi/csiostor/csio_scsi.c ((uint64_t)scmnd->device->lun == sld->oslun)); scmnd 166 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); scmnd 169 drivers/scsi/csiostor/csio_scsi.c if (likely(scmnd->SCp.Message == 0)) { scmnd 170 drivers/scsi/csiostor/csio_scsi.c int_to_scsilun(scmnd->device->lun, &fcp_cmnd->fc_lun); scmnd 174 drivers/scsi/csiostor/csio_scsi.c memcpy(fcp_cmnd->fc_cdb, scmnd->cmnd, 16); scmnd 176 drivers/scsi/csiostor/csio_scsi.c fcp_cmnd->fc_dl = cpu_to_be32(scsi_bufflen(scmnd)); scmnd 187 drivers/scsi/csiostor/csio_scsi.c int_to_scsilun(scmnd->device->lun, &fcp_cmnd->fc_lun); scmnd 188 drivers/scsi/csiostor/csio_scsi.c fcp_cmnd->fc_tm_flags = (uint8_t)scmnd->SCp.Message; scmnd 299 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); scmnd 305 drivers/scsi/csiostor/csio_scsi.c scsi_for_each_sg(scmnd, sgel, req->nsge, i) { scmnd 327 drivers/scsi/csiostor/csio_scsi.c xfer_len = scsi_bufflen(scmnd); scmnd 368 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); scmnd 378 drivers/scsi/csiostor/csio_scsi.c wr->xfer_cnt = cpu_to_be32(scsi_bufflen(scmnd)); scmnd 379 drivers/scsi/csiostor/csio_scsi.c wr->ini_xfer_cnt = cpu_to_be32(scsi_bufflen(scmnd)); scmnd 421 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); scmnd 431 drivers/scsi/csiostor/csio_scsi.c wr->xfer_cnt = cpu_to_be32(scsi_bufflen(scmnd)); scmnd 432 drivers/scsi/csiostor/csio_scsi.c wr->ini_xfer_cnt = cpu_to_be32(scsi_bufflen(scmnd)); scmnd 559 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd = csio_scsi_cmnd(req); scmnd 569 drivers/scsi/csiostor/csio_scsi.c scsi_for_each_sg(scmnd, sgel, req->nsge, i) { scmnd 608 drivers/scsi/csiostor/csio_scsi.c xfer_len = scsi_bufflen(scmnd); scmnd 1164 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd; scmnd 1171 drivers/scsi/csiostor/csio_scsi.c scmnd = csio_scsi_cmnd(ioreq); scmnd 1178 drivers/scsi/csiostor/csio_scsi.c if (scmnd != NULL) scmnd 1192 drivers/scsi/csiostor/csio_scsi.c csio_abrt_cls(struct csio_ioreq *ioreq, struct scsi_cmnd *scmnd) scmnd 1200 drivers/scsi/csiostor/csio_scsi.c if (csio_scsi_cmnd(ioreq) != scmnd) { scmnd 1238 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd; scmnd 1247 drivers/scsi/csiostor/csio_scsi.c scmnd = csio_scsi_cmnd((struct csio_ioreq *)tmp); scmnd 1248 drivers/scsi/csiostor/csio_scsi.c csio_abrt_cls((struct csio_ioreq *)tmp, scmnd); scmnd 1491 drivers/scsi/csiostor/csio_scsi.c struct scsi_cmnd *scmnd = (struct scsi_cmnd *)csio_scsi_cmnd(req); scmnd 1502 drivers/scsi/csiostor/csio_scsi.c bytes_left = scsi_bufflen(scmnd); scmnd 1503 drivers/scsi/csiostor/csio_scsi.c sg = scsi_sglist(scmnd); scmnd 923 drivers/scsi/storvsc_drv.c struct scsi_cmnd *scmnd, scmnd 947 drivers/scsi/storvsc_drv.c switch (scmnd->cmnd[0]) { scmnd 950 drivers/scsi/storvsc_drv.c set_host_byte(scmnd, DID_PASSTHROUGH); scmnd 960 drivers/scsi/storvsc_drv.c set_host_byte(scmnd, DID_ERROR); scmnd 964 drivers/scsi/storvsc_drv.c set_host_byte(scmnd, DID_NO_CONNECT); scmnd 976 drivers/scsi/storvsc_drv.c set_host_byte(scmnd, DID_REQUEUE); scmnd 989 drivers/scsi/storvsc_drv.c set_host_byte(scmnd, DID_TARGET_FAILURE); scmnd 1004 drivers/scsi/storvsc_drv.c struct scsi_cmnd *scmnd = cmd_request->cmd; scmnd 1017 drivers/scsi/storvsc_drv.c scmnd->result = vm_srb->scsi_status; scmnd 1019 drivers/scsi/storvsc_drv.c if (scmnd->result) { scmnd 1020 drivers/scsi/storvsc_drv.c if (scsi_normalize_sense(scmnd->sense_buffer, scmnd 1025 drivers/scsi/storvsc_drv.c scsi_print_sense_hdr(scmnd->device, "storvsc", scmnd 1030 drivers/scsi/storvsc_drv.c storvsc_handle_error(vm_srb, scmnd, host, sense_hdr.asc, scmnd 1041 drivers/scsi/storvsc_drv.c scsi_set_resid(scmnd, scmnd 1044 drivers/scsi/storvsc_drv.c scmnd->scsi_done(scmnd); scmnd 1471 drivers/scsi/storvsc_drv.c static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) scmnd 1473 drivers/scsi/storvsc_drv.c struct hv_host_device *host_dev = shost_priv(scmnd->device->host); scmnd 1527 drivers/scsi/storvsc_drv.c static enum blk_eh_timer_return storvsc_eh_timed_out(struct scsi_cmnd *scmnd) scmnd 1530 drivers/scsi/storvsc_drv.c if (scmnd->device->host->transportt == fc_transport_template) scmnd 1531 drivers/scsi/storvsc_drv.c return fc_eh_timed_out(scmnd); scmnd 1536 drivers/scsi/storvsc_drv.c static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd) scmnd 1539 drivers/scsi/storvsc_drv.c u8 scsi_op = scmnd->cmnd[0]; scmnd 1549 drivers/scsi/storvsc_drv.c scmnd->result = ILLEGAL_REQUEST << 16; scmnd 1558 drivers/scsi/storvsc_drv.c static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd) scmnd 1563 drivers/scsi/storvsc_drv.c struct storvsc_cmd_request *cmd_request = scsi_cmd_priv(scmnd); scmnd 1582 drivers/scsi/storvsc_drv.c if (!storvsc_scsi_cmd_ok(scmnd)) { scmnd 1583 drivers/scsi/storvsc_drv.c scmnd->scsi_done(scmnd); scmnd 1589 drivers/scsi/storvsc_drv.c cmd_request->cmd = scmnd; scmnd 1597 drivers/scsi/storvsc_drv.c if (scmnd->device->tagged_supported) { scmnd 1605 drivers/scsi/storvsc_drv.c switch (scmnd->sc_data_direction) { scmnd 1624 drivers/scsi/storvsc_drv.c scmnd->sc_data_direction); scmnd 1630 drivers/scsi/storvsc_drv.c vm_srb->path_id = scmnd->device->channel; scmnd 1631 drivers/scsi/storvsc_drv.c vm_srb->target_id = scmnd->device->id; scmnd 1632 drivers/scsi/storvsc_drv.c vm_srb->lun = scmnd->device->lun; scmnd 1634 drivers/scsi/storvsc_drv.c vm_srb->cdb_length = scmnd->cmd_len; scmnd 1636 drivers/scsi/storvsc_drv.c memcpy(vm_srb->cdb, scmnd->cmnd, vm_srb->cdb_length); scmnd 1638 drivers/scsi/storvsc_drv.c sgl = (struct scatterlist *)scsi_sglist(scmnd); scmnd 1639 drivers/scsi/storvsc_drv.c sg_count = scsi_sg_count(scmnd); scmnd 1641 drivers/scsi/storvsc_drv.c length = scsi_bufflen(scmnd); scmnd 723 drivers/scsi/virtio_scsi.c static enum blk_eh_timer_return virtscsi_eh_timed_out(struct scsi_cmnd *scmnd)