• Home
  • Raw
  • Download

Lines Matching refs:scmnd

785 				struct scsi_cmnd *scmnd,  in storvsc_handle_error()  argument
801 switch (scmnd->cmnd[0]) { in storvsc_handle_error()
804 set_host_byte(scmnd, DID_PASSTHROUGH); in storvsc_handle_error()
807 set_host_byte(scmnd, DID_TARGET_FAILURE); in storvsc_handle_error()
821 set_host_byte(scmnd, DID_REQUEUE); in storvsc_handle_error()
834 set_host_byte(scmnd, DID_TARGET_FAILURE); in storvsc_handle_error()
847 struct scsi_cmnd *scmnd = cmd_request->cmd; in storvsc_command_completion() local
848 struct hv_host_device *host_dev = shost_priv(scmnd->device->host); in storvsc_command_completion()
852 struct stor_mem_pools *memp = scmnd->device->hostdata; in storvsc_command_completion()
863 copy_from_bounce_buffer(scsi_sglist(scmnd), in storvsc_command_completion()
865 scsi_sg_count(scmnd), in storvsc_command_completion()
871 scmnd->result = vm_srb->scsi_status; in storvsc_command_completion()
873 if (scmnd->result) { in storvsc_command_completion()
874 if (scsi_normalize_sense(scmnd->sense_buffer, in storvsc_command_completion()
880 storvsc_handle_error(vm_srb, scmnd, host, sense_hdr.asc, in storvsc_command_completion()
883 scsi_set_resid(scmnd, in storvsc_command_completion()
887 scsi_done_fn = scmnd->scsi_done; in storvsc_command_completion()
889 scmnd->host_scribble = NULL; in storvsc_command_completion()
890 scmnd->scsi_done = NULL; in storvsc_command_completion()
892 scsi_done_fn(scmnd); in storvsc_command_completion()
1235 static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) in storvsc_host_reset_handler() argument
1237 struct hv_host_device *host_dev = shost_priv(scmnd->device->host); in storvsc_host_reset_handler()
1285 static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd) in storvsc_scsi_cmd_ok() argument
1288 u8 scsi_op = scmnd->cmnd[0]; in storvsc_scsi_cmd_ok()
1298 scmnd->result = ILLEGAL_REQUEST << 16; in storvsc_scsi_cmd_ok()
1307 static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd) in storvsc_queuecommand() argument
1318 struct stor_mem_pools *memp = scmnd->device->hostdata; in storvsc_queuecommand()
1320 if (!storvsc_scsi_cmd_ok(scmnd)) { in storvsc_queuecommand()
1321 scmnd->scsi_done(scmnd); in storvsc_queuecommand()
1340 cmd_request->cmd = scmnd; in storvsc_queuecommand()
1342 scmnd->host_scribble = (unsigned char *)cmd_request; in storvsc_queuecommand()
1348 switch (scmnd->sc_data_direction) { in storvsc_queuecommand()
1362 vm_srb->path_id = scmnd->device->channel; in storvsc_queuecommand()
1363 vm_srb->target_id = scmnd->device->id; in storvsc_queuecommand()
1364 vm_srb->lun = scmnd->device->lun; in storvsc_queuecommand()
1366 vm_srb->cdb_length = scmnd->cmd_len; in storvsc_queuecommand()
1368 memcpy(vm_srb->cdb, scmnd->cmnd, vm_srb->cdb_length); in storvsc_queuecommand()
1370 cmd_request->sense_buffer = scmnd->sense_buffer; in storvsc_queuecommand()
1373 cmd_request->data_buffer.len = scsi_bufflen(scmnd); in storvsc_queuecommand()
1374 if (scsi_sg_count(scmnd)) { in storvsc_queuecommand()
1375 sgl = (struct scatterlist *)scsi_sglist(scmnd); in storvsc_queuecommand()
1376 sg_count = scsi_sg_count(scmnd); in storvsc_queuecommand()
1379 if (do_bounce_buffer(sgl, scsi_sg_count(scmnd)) != -1) { in storvsc_queuecommand()
1381 create_bounce_buffer(sgl, scsi_sg_count(scmnd), in storvsc_queuecommand()
1382 scsi_bufflen(scmnd), in storvsc_queuecommand()
1390 ALIGN(scsi_bufflen(scmnd), PAGE_SIZE) >> in storvsc_queuecommand()
1396 scsi_sg_count(scmnd)); in storvsc_queuecommand()
1408 } else if (scsi_sglist(scmnd)) { in storvsc_queuecommand()
1410 virt_to_phys(scsi_sglist(scmnd)) & (PAGE_SIZE-1); in storvsc_queuecommand()
1412 virt_to_phys(scsi_sglist(scmnd)) >> PAGE_SHIFT; in storvsc_queuecommand()
1434 scmnd->host_scribble = NULL; in storvsc_queuecommand()